BTW, noticed unpretty hard shadow on the tree here. Theese usualy look ok on opaque surfaces, but weird on translucent objects, especially directly facing the light source. Not a bug though. Soft shadows could fix it maybe?
Oh, I see. Take your time.
About performance and gpu bandwith, though: Your lighting is already in pixel shader, one more function not really gonna hurt, vertex data for binormal calculation weights nothing in todays term. Only perfomance sensitive part is GPU memory filled with bump maps, but that I think can be configurable. Anyway, once you nail the physical based shader with all basic texture inputs (albedo,metalness/spec,roughness,bump,AO), you're golden for another decade I think. PBR was going strong for almost a decade in current gen, and there no signs for it to change in next gen at least from texturing/material definition standpoint. From that point you could only add bells and whistles to your renderer without any additional work from Eric.
Let us know, if you'll find something interesting. I've been looking for good cloud rendering system too, and didn't find good compromise yet in terms looks/performance.
Really good job, guys! Physical sky, SH lighting, HDR, ect...
You took a deep dive into graphics programming. LFS is looking really good. Can't wait to play!
One thing I noticed — I didn't saw any bump mapping. Is it work in progress or You are happy with it at current state?
For cloud rendering solution, are you want to go for fully dynamic volumetric system or something simple pre-baked?
Nice proof of concept, Scawen!
Do you realise, you are opening a pandora box of dynamic lighting with this?
You're gonna need a dynamic(probably procedural) sky system, HDR support for proper lighting, light texture support for headlights, dynamic light probes for non static objects and hella lot of other things to make it look good as your daylight static lighting.
I mean there a lot of stuff to cover, so if you want, I can give some links to technical papers and Siggraph/GDC presentations about this topic.
It's more looks like a lack of dynamic range in reflection.
@Scawen, Does your new render supports HDR? Because in scenarios like this, 8-bit environment textures cant handle bright reflections on low reflective smooth surface
Nice work, Scawen!
Any plans on non directional sun light bounce?
BTW, you can also use color gradient or spherical harmonics probe based on world space normal for adding variation on ambient lighting.
Sometimes cracked online servers makes game last a little longer.
Usually it happens when development and supporting stops, and game become supported by it's fans.
But now I see the opposite.
I remember when pereulok was a small community, pretty closed one.
We had racing and drifting events with prizes like s2 vouchers, to bring some people to big world of licensed servers.
People who really loved lfs, actually bought their license to support development, but still was playing on pereulok because of that small closed community.
What i see now, it's not that pereulok anymore. And more important, that it now can really hurt development.
So i think it's time for Pereulok to leave. At least until the development stops and official servers will shut down. I hope it will be not soon.
Indeed. To make it work correctly, 2 things needs to be done.
First, adjust all textures for linear color space. Not impossible, just some routine work.
And second, and most important - somehow readjust and recalibrate all baked lighting. If this can be done, all shadows and highlights will have more natural look.
Another shading experiment:
Tried to swicth rendering to linear color space.
All input values are converted to linear color space, and after all caculations in shaders are done, outputs returned to sRGB in post-processing shader.
So, here's result:
Old sRGB gamma rendering :
Linear rendering:
If someone interested in using this, here's zip with shaders. Just drop these files in shaders folder and switch on post processing shader in game options. https://www.lfs.net/attachment/135759
Warning: Shaders was written in a dirty way, and contains a lot of pow() functions, which pretty heavy for computing. There also a lot pop up warnings in console, and on old tracks lighting may look pretty weird because it's not calibrated for linear rendering.
The surface should not reflect more light than was received.
This rule is simple: More reflection lighting - less diffuse lighting, and conversely.
Because of fresnel effect, reflection on the edges comes to 100%, and base color with diffuse lighting should be compensated. This is not happening in the shader, but it should be.
UPD: I checked out shader more closely, and found that diffuse compensation already there. So, this is not the cause of this issue.
Scawen said that facing reflectivity of car paint is about 4%, and with all honest he set the reflection value to 0.04, but he probably didn't knew that it's a linear value.
Since LFS rendering pipeline is not in linear color space, this value is wrong. Corrected value for sRGB color space is 0.23.
And now, when Scawen trying to use values from real physical world, things like this happens.
So, here is quick fix for that: Open the shader file "Car2.psh", find the lines:
#ifdef ALPHA const float facing_reflectivity = 0.08f; // reflectivity of glass (parallel to normal) #else const float facing_reflectivity = 0.04f; // reflectivity of paint (parallel to normal) #endif
and change it to:
#ifdef ALPHA const float facing_reflectivity = 0.317f; // reflectivity of glass (parallel to normal) #else const float facing_reflectivity = 0.231f; // reflectivity of paint (parallel to normal) #endif
UPD:
I already fixed this issue, and only things been left to do is generate new corrected reflection textures for all tracks and conditions.
I counted how much time i need to do that, and it's about 3-4 days like full time job. It was too much for me.
Anyway, it's doesn't matter anymore, because of new real-time reflection system. I can't even access old reflection textures through shader. It's not used anymore. So we need to figure out a workaround for this.
Oh, come on. We live in the world where pre-ordering games become a trivial thing. You pay a lot of money and get nothing until whole product will come out.
In case of LFS S3 you already get content that already done, and there will more things later. I think it's a better deal than most publishers and companies offers these days.
Okay, I got your point.
Usually for full environment mapping, cubemap camera renders a scene with low detalied objects(some of them even excluded from rendering), and low camera far plane (not more than 100-150 meters). It's don't even need to update whole cubemap every frame, just one side of it. These optimisations in most cases saves a lot of resources.
Maybe I just used to work with physically based rendering, where full environment cubemaps are important, and maybe because of that, inaccurate reflections and lighting makes my eyes hurt.
I don't know the way you going to push LFS graphics, I'm just trying to point on things that already used in game industry. Anyway, keep it up, Scawen!
Here's another alternative for full environment reflections that you may like:
It's called a box-projected cubemap. It doesn't require to render environment in real time. It designed to add volume to static cubemap reflections. With a bunch of static cubemaps with box projection and blending betwen them you can make nice faked dynamic reflections. http://www.gamedev.net/topic/5 ... emap-environment-mapping/
Nice patch, Scawen!
BTW, I looked to the shader code and I see you are using the same hemisphere mapping as before. Maybe it's time to switch to full sphere mapping (I described it here https://www.lfs.net/forum/post/1876319#post1876319) or dual parabaloid mapping? (http://graphicsrunner.blogspot.ru/2008/07/dual-paraboloid-reflections.html)
And one more thing. You don't really need to render envirovment for every car. One single map rendered for active\nearest to camera car and shared with other cars is enough. It's better to use resourses for higher draw distance. For example gran turismo 5/6 uses single env map for all cars. Asetto Corsa renders one single map from camera position.
I already found a way to work around transformation matrices with new sphere map projection, it looks not so good as I want, but still better than default.
The only problem is that I do not have much time to finish it.
To be honest, the use of third-party engine as Unity3d can inhibit the development of even more than the further development of the existing engine. The use of such engines seems very easy at first, but when it comes to rewriting some built-in stuff or adding new, you may encounter a bunch of restrictions that can not be avoided because of the lack of access to the source code.
For example, for a demo with the car from LFS I had to rewrite part of the rendering pipeline, and many times to step on a rake, before I was able to achieve results.
If the only problem is the outdated graphics, this problem is not in whole engine, but only part of the rendering, which can be modified and rewritten. Scawen just need some time to fully explore the graphics programming and choose the right direction. A recent move to DirectX 9 allows to make a lot of things.
I'm glad to see this. Keep it up!
But what? Just one pass?
The best solution i saw yet is dual paraboloid which takes two passes.
Did you figured this out by yourself or used any reference?
I'd really like to read the technical details about this method.
There's nothing special, just variables that every renderer have. Transformation matrices and internal variables.