The online racing simulator
Searching in All forums
(51 results)
Keiichi_Tsuchiya
S3 licensed
Thats awesome news!
Important question tho, Can we add Scirocco ourselves?Big grin
Keiichi_Tsuchiya
S3 licensed
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?
Last edited by Keiichi_Tsuchiya, .
Keiichi_Tsuchiya
S3 licensed
Wow, this is unexpected. This is good news, I thought you will stick with dx9. Did you play with compute shader stuff yet?
Keiichi_Tsuchiya
S3 licensed
Quote from Scawen :
About bump mapping, Eric has asked for that a long time ago but I am not keen to develop it now, with the extra shaders and more data for every vertex, and increased data bandwidth and GPU usage for the pixel shaders. I'm very interested in trying to keep the frame rates high and see how it goes with the current version, that is already a lot heavier than the old. Also for me it doesn't seem totally straightforward to implement, when starting to think about helper functions for the normal maps and new material types to support the maps. There's too much in my mind already and I don't want to get bogged down so for now I really think the other things have a higher priority. In my mind the bump maps can be done after this release as I think Eric has made very good use of the current system with the updated tracks. Then various materials could be updated to take advantage of bump mapping.

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.

Quote from Scawen :
It's a good question and I don't know the answer but I'll try to do something simple at first and see how it looks.

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.
Last edited by Keiichi_Tsuchiya, .
Keiichi_Tsuchiya
S3 licensed
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?
Keiichi_Tsuchiya
S3 licensed
Nice proof of concept, Scawen!
Do you realise, you are opening a pandora box of dynamic lighting with this?Big grin
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.
Keiichi_Tsuchiya
S3 licensed
Quote from Degats :Comparisons of the latest screenshots:
I'm going to regret saying this, because it's another shader rabbit hole to go down (sorry if this delays the release Wink ), but for "overexposed" shine like this, it could probably do with a subtle amount of bloom.

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
Keiichi_Tsuchiya
S3 licensed
Scawen, Eric, It's a really nice work. Well done!
Keiichi_Tsuchiya
S3 licensed
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.
Keiichi_Tsuchiya
S3 licensed
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.
Keiichi_Tsuchiya
S3 licensed
So, I came to this thread and...
Keiichi_Tsuchiya
S3 licensed
Quote from lfsrm :Great result! if only you can find a solution for the exaggerated contrast because that will be a must have mod once finished !

Maybe. But for now it's just a quickly done concept
Keiichi_Tsuchiya
S3 licensed
Quote from Flame CZE :I tried it in game and overall it seems to have a bit too much contrast...

It's a good start though! And as nacim said, the textures might need some adjustment, now they look a bit dark with too much contrast - especially the interiors.

Keep it up.

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.
Keiichi_Tsuchiya
S3 licensed
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.
Last edited by Keiichi_Tsuchiya, .
Keiichi_Tsuchiya
S3 licensed
Quote from Flame CZE :
Edit: also in some cases it looks too bright.

Yes, it is.

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.
Last edited by Keiichi_Tsuchiya, .
Keiichi_Tsuchiya
S3 licensed
Hi there!
Quote from Lynce :@Lfsrm. Thank you!

Difference between new reflection system in real time by Scawen and texture reflections made in 2010....

This confuse me too much, really. There is two opposite points of view.

Well, I back to the work.

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.

I have already mentioned about importance of linear color space in one of my posts: https://www.lfs.net/forum/thread/86111
Quote from Keiichi_Tsuchiya :
All calculations that occur in a shader is already happening with the modified gamma correction. From the physical point of view it is not right, and it can be seen in many games where the light unrealistically is too bright or too dark in different situations.

(upd: Tested out switching lfs rendering to linear, and my assumptions were confirmed. More here: https://www.lfs.net/forum/post/1899014#post1899014 )

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:
Quote from nacim :There are some technical problems that made his technique not really doable correctly, because the car's reflection is going full retard when the car is flipped over for example.

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.
Last edited by Keiichi_Tsuchiya, .
Keiichi_Tsuchiya
S3 licensed
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.
Keiichi_Tsuchiya
S3 licensed
Thank you Santa Scawen for this awesome Christmas gift! Already upgraded my account!
Keiichi_Tsuchiya
S3 licensed
Quote from Scawen :
It would be nice to have a full panoramic environment map but they are massively more expensive. These hemispherical maps use a single upward facing render of nearby objects for each car. Usually there are not many objects to be rendered in each of these, so we keep the high frame rate.

If you go to a cube map or other 'full' map, you need to render the world scene in every direction, usually 6 renders of the world. Even one single render of the world that includes the horizon, means that thousands of objects must be rendered. A cube map for one single car requires four of these 90 degree full world renders, plus an up and a down render. Several optimisations could be made but it would still be a huge frame rate cost. It's not worth it if we are going to focus on racing. I do not agree that it is OK to render one environment map for the nearest car and apply it to all cars. I want to see the tunnel or nearby objects reflected on top of each car as it goes through the tunnel. I don't want the tunnel to be seen on all cars just because the nearest car goes under the tunnel, then not see the tunnel reflection on the other cars when they go through.

So, this single render seemed the best thing. Undoubtedly the most important reflection on a car is the sky reflection. That is a light source. I know that in real life you can see white and yellow lines on the road, and nearby bright objects reflected in the car, but it's really things passing over the top of cars, blocking the sky, that are highly visible and most important and I wanted that generated individually for each car.

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/

https://seblagarde.wordpress.c ... rallax-corrected-cubemap/
Last edited by Keiichi_Tsuchiya, .
Keiichi_Tsuchiya
S3 licensed
Tested out post processing, it seems working fine. Already tried to create sharpening filter and fake motion blur.


Keiichi_Tsuchiya
S3 licensed
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.
Keiichi_Tsuchiya
S3 licensed
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.
Keiichi_Tsuchiya
S3 licensed
Quote from pigmeu :I was wondering, why doesn't LFS use a third party engine like Unity3D? I see the price is $1500 or $76/month if i understand correctly. Also, I remember reading somewhere there are older engines that have become free. Can't the physics engine be added to such game engine? Are there other limitations?

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.
Keiichi_Tsuchiya
S3 licensed
Quote from Scawen :
I have a work in progress on my computer, which involves various changes to the default car shader. It includes a real time rendered version of the environment map, drawn from the car's position. It's not a cube map, it's just a single wide angle vertical view, distorted into a circle. In a car game this is by far the most important thing as the most visible reflections on a car are of the sky and objects that block the sky. At least it only requires one vertical draw of the environment per car, instead of 6 images of the environment per car, as required for a cube map. It's nice to see the trees and buildings zipping past the car as you drive.

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.
Quote from Scawen :
If you could tell me, on your thread, exactly which extra data you need, maybe I can make a note to see if it can be included in my planned update.

There's nothing special, just variables that every renderer have. Transformation matrices and internal variables.
Last edited by Keiichi_Tsuchiya, .
Keiichi_Tsuchiya
S3 licensed
Quote from Scawen :
Obviously we are well aware that there are big problems with shadows, but this is still an important graphical thing that Eric has waited for, for several years.

You probably already heard that, but you may try lightmaps. It's not so hard to implement but result will be definitely better.

BTW, Scawen I need some help from you, I already wrote new reflections method
https://www.lfs.net/forum/post/1876319#post1876319
but i need to access some variables that are not available in default shaders. So, only you know how to access it.
I described everything here:
https://www.lfs.net/forum/thread/86880-Shader-global-variables
FGED GREDG RDFGDR GSFDG