New Renderer (OpenGL 3.3)
-
After the short teaser image here is a video of the current state including the new shadows:
http://www.flnu.net/downloads/fl0512.mkv
Edit: Here is another one.
http://www.flnu.net/downloads/fl0512_2.mkv -
So after some fixes and tweaks I am now at the graphics quality level I wanted to achieve. Only one feature is missing, which will even add more to the atmosphere, but I decided to add this after everything is working and maybe even after the initial release.
Here are two videos of the current state:
http://www.flnu.net/downloads/fl1912.mkv
http://www.flnu.net/downloads/fl1912_2.mkvWhat’s left is getting the performance back again, as the shadows are tanking the fps (it’s not optimized yet) plus the remaining fixes. There also seem to be some glitches with the new shadows I need to figure out.
Feedback is as always welcome!
-
Thats a nice breakthrough! You definitely have to test this with some modern models (preferably a ship, with a white light source to negate some misperception) to reveal and test the potential of the stuff.
Some blur on the shadows will be cool too, i mean this:
-
Skotty has asked for the same thing. The shadows are currently PCF filtered, but since the resolution is so good now it only has an antialiasing effect.
But shouldn’t be shadows in space only hard shadows anyway? The sun is so far away you basically get a point light and there is no atmosphere which scatters the light. This might be different in a nebula, though.
I will see if I can get a high poly model with good textures somewhere. The problem is ideally it also hast height maps since otherwise the self shadowing of the textures does not work. So it would have to use real geometry to make up for this.
@eigos: You’ll have to wait a little bit more, but good to know there is nothing in the videos you find unfitting or something like that
-
As a game is a simulation with its own issues on every step of evolution of visualisation technology corresponding with perception of a viewer, i can agree that hard shadows are real in an IRL space, but as modern engines are unable to simulate full realism (we still use textures, whether IRL there is no textures but a game of color and reflection of every surface particle we are able to see), and as if this feature provides an advancement on perception of a product compared to a previous generation, that in my opinion may be considered as realistic. We see such shadows every day so i think it is a good option to go. I want to say that sometimes it’s ok to implement something that looks better than it is IRL and it may be called realistic if viewer finds it so. Also, FL was never known as real space simulator (like KSP) and i see it shiny and beauty-overkill (what fits its spirit very well) in an aspect of graphics, like an Everspace for example.
Suns in a game or a theoretical game have various sizes with various distances of objects that are near to them as well as brightness, also you’ve mentioned clouds, so with some dynamic adjustment i see this as a good feature. -
I think I know what you mean. Basically you see things more from an artists viewpoint. I personally like the more realistic touch (which is a matter of opinion) and am not a fan of applying lots of effects (like bright bloom etc). So for me it would look really irritating if I don’t get hard shadows in space with no nearby larger light source like a planet. But I suppose since I am used to rendering and image processing I have a lot more trained eyes than the usual user.
I already had started to look for soft shadow solutions, since FL has fake light sources placed at planets (fake reflection) and since they are so close the shadows would indeed be soft. But this isn’t an easy topic plus it is not so much important. I’d rather add this after the initial release. For now I need to polish the rest and get it into a usable shape (including ingame GUI for settings etc).
While we’re at this topic, since the new shadows have so much higher resolution I was able to enable point lights again and let them cast perspective projected shadows (FL uses them for e.g. fake planet reflections). This works surprisingly well since usually you would have to use cube map shadows. But we are most of the time not so close that this is really visible. So now even the FL explosions cast shadows. There might be cases, where they are wrong, though (being close enough to the light source).
-
While I did not have much time I managed to implement rough cubemap reflections. They are way more fitting now
Also I think I have found a way so that you can use the lighting model in blender and probably port it from there to other modeling software. It is actually quite easy to build your shader pipeline in blender. When I am sure it is really accurate I’ll post it here. Then you can see how it will look in your modeling software itself.
-
Yes, it looks really beautiful!
My plan is to try this one:
https://www.turbosquid.com/3d-models/3d-starship-spacecraft-model-1277308
Already got it working in blender with the mentioned shader pipeline. Or do you have a better one? -
if you have Discord, hit me up, I will hook you up with this: https://sketchfab.com/models/e7a1b0d441c74d848f6744fb273eb38e
I have a more detailed model in the works, but it isnt textured yet.
Im experimenting with PBR on bits of the ship, though: https://p3d.in/eodqrP.S. my discord is eigos #4005
-
That is only partially true, since I only found the crash because I have a notebook with a 970m. Only happens when you undock, not when in space. And it is after the frame was rendered. So it is not the typical bug. But I will find the cause, don’t worry
-
Here are some new screenshots with the new material system (based on a json file). Also with it in place I now can use alpha test for shadows. As a result textures now don’t block the light completely if they have transparent parts (and you set the right parameter for the material). The space domes also have glass material parameters as you can see at the reflections.
-
Currently there is the base texture (RGBA) and greyscale for roughness, specular intensity (mixes between diffuse and specular so it basically is percent) and metalness. For the last ones you can also set fixed parameters in the material library file, so you don’t necessarily need textures for those.
And of course there are the heightmap and normalmap textures. The heightmap should only contain very rough heights, as the fine details are in the normal map. It is also used to bake the self shadowing into the normal map (Valve’s ssbumps). You can consider replacing them with real geometry so you don’t need them at all.
I will try to post the blender shading pipeline graph soon when I got the time for it.
Edit: Forgot the standard FL texture variants. They did not change, so emissive and detail texture etc. is of course supported, since FL uses it.
-
Okay ty. But i still cant figure out what is roughness and metalness.
In my workflow i have:
reflection - map for a color and intensity of reflection, somehow multiplied by Fresnel IOR value with base of 1.6. I guess full mechanics of this is almost something as your specular intensity, but using a falloff of Fresnel type. Is that possible in games?
reflection glossiness - a grayscale map or value for smoothness of reflection, where value of 1 making reflection sharp as plain reflection map without modification, and values around 0.75-0.65 making it much more realistic for metals;
asssigning a map allows this at certain places. Is that the one you call roughness?edit: i’ve just found that one: https://docs.chaosgroup.com/display/CWVRAYMAX/Metalness
but i still cant get why roughness shall be used in some “glossiness” in BRDF (not the same as reflection glossiness i told above, i dont know what is that). Anyway i dont own that version of vray that has “metalness”, although i still can attempt to draw it, but for that i need to figure out what exactly it does. -
Glossiness is just the opposite of roughness, so if you invert the texture / value it means the same. In you picture the value of 1 glossiness is 0 roughness and 0.1 glossiness is 0.9 roughness. There might be some differences how some BRDF formulas treat those values, though. So depending on the light model, the same roughness value can look different.
Your reflection RGB texture is also a way to do it (actually I had it included in my shader), but I came to the conclusion that it is easier just to use one base colour texture for everything and do the rest with the greyscale textures / material parameters. This also saves memory and bandwidth.
Metalness just defines how much of the reflection is based on the color texture. If it is 0 the reflection will just be pure white colour like plastic.
If you find a case where the material can not be recreated with my current setup I can adapt it.
-
Your reflection RGB texture is also a way to do it (actually I had it included in my shader), but I came to the conclusion that it is easier just to use one base colour texture for everything and do the rest with the greyscale textures / material parameters. This also saves memory and bandwidth.
Yeah i also do this and to differ it (for scratches or worn effects f.e.) i use material blending by some dirt masks, where almost same materials have different reflection values.
Got ya, just my inverted reflection glossiness.Metalness just defines how much of the reflection is based on the color texture. If it is 0 the reflection will just be pure white colour like plastic.
So its a kind of linear dodge multiplier of typical reflection map? Dont get it.
I’ve found a pic how Fresnel reflections work with an IOR value. So it basically applies that mechanics to reflection map and power of reflection is defined by IOR value.
I am not aware if rasterisation engines is capable of this or it is RT only, but would like to hear your opinion:
As i know that mechanics is considered most realistic in term of reflections. -
Fresnell is only part of today’s lightning models. So yes it is included, but it is only one term of the whole equation. If you really want to know the whole model, look for the GGX stuff, which even blender uses.
You can imagine the metallness as a blend between white texture and the base colour texture. The more it becomes zero, the more the base colour for the reflection is going to be white. Imagine a billiard ball. The reflection is always white no matter what colour it has. So metalness is 0. If you choose a golden colour as base colour texture you will get colour shifts etc. when you set metalness to 1. If it is zero it only will have white reflections and it will look like plastic with gold colour.