• Dear visitors,

    The email issue has been finally solved.
    Thank you for your patience and happy browsing.

    Team ACM.

QUESTION Track lines not taking skidmarks

Fuzo

Member
Guys I recently realized that when I am using ksPerPixel shader with alpha blending and transparency flag for white lines in my track projects, they look as I want them to look but they are not getting skidmarks from cars. Using ksPerPixelAT solves this issue but I don't like the appearance of the lines in this mode because alpha testing makes them look very strange.

So I started my research and found out that Kunos track use ksPerPixel or ksPerPixelNM, but they use different depth mode (eNoZwrite or something like that), not only for line meshes but for groves as well. I usually did not touch this at all because honestly, I don't know what it does and whats the difference but I tried to recreate exact settings like on Kunos track and guess what, Kunos track was OK, mine was not. I have no idea what could be the problem but I want to know, when to use different blend modes than eDepthNormal, what are the rules in setting shaders for lines and groves and other transparent objects which should receive skidmarks from the cars driving over them? Anyone knows? I have an idea that it has something to do with draw order and z-buffer but I would need some comprehensive explanation :)
 

Johnr777

Moderator
Guys I recently realized that when I am using ksPerPixel shader with alpha blending and transparency flag for white lines in my track projects, they look as I want them to look but they are not getting skidmarks from cars. Using ksPerPixelAT solves this issue but I don't like the appearance of the lines in this mode because alpha testing makes them look very strange.

So I started my research and found out that Kunos track use ksPerPixel or ksPerPixelNM, but they use different depth mode (eNoZwrite or something like that), not only for line meshes but for groves as well. I usually did not touch this at all because honestly, I don't know what it does and whats the difference but I tried to recreate exact settings like on Kunos track and guess what, Kunos track was OK, mine was not. I have no idea what could be the problem but I want to know, when to use different blend modes than eDepthNormal, what are the rules in setting shaders for lines and groves and other transparent objects which should receive skidmarks from the cars driving over them? Anyone knows? I have an idea that it has something to do with draw order and z-buffer but I would need some comprehensive explanation :)
eNoZwrite makes it so the mesh can be occluded my other meshes but not itself. It helps with Z fighting it many cases.

If you are using alpha blend, then the Transparent flag must also be turned on, did you do that?
 

Fuzo

Member
eNoZwrite makes it so the mesh can be occluded my other meshes but not itself. It helps with Z fighting it many cases.

If you are using alpha blend, then the Transparent flag must also be turned on, did you do that?
Sure, I even tried different combinations, Kunos settings, my own settings... changing priorities, still the result was the same, skidmarks were under the line object. So I guess I am missing some step in the process. I tried to move the object up in the hierarchy, then down, nothing helped. It worked only with ksPerPixelAT shader for some reason.
 

Fuzo

Member
Is it possible that CSP is interfering with the line objects properties? Because even though I set the shader in the same way like Kunos did, CSP object debug app shows different tags for Kunos lines and lines in my project. Is CSP autoguessing track objects as well? Only difference between my lines and Kunos lines were in the name of the object, Kunos named it whitelines, I just had lines1... I used Redbull Ring as a reference and checked if there is something special in CSP config which would modify the white lines in any way but found nothing... I should probably test the lines in vanilla mode first...
 

Fuzo

Member
so guys if someone would be interested, the fix for my issue was to put lines into separate kn5 file. Then everything works as I wanted. Thx Lilski for advice.
 
Top