The online racing simulator
Shadow bug
(5 posts, started )
Shadow bug
This happens on pretty much all the tracks. If you're inside the pit garage and go into aerial view, you can see your car's shadow on top of the garage roof. Strange, eh? Sorry if this has been posted already.
#2 - Ian.H
Every track is _full_ of shadow bugs.. ever since S1 days. Why they've never been fixed in all this time yet is beyond me, I'd be embarrassed to release a track in the condition most are in.



Regards,

Ian
Its so cops in Shift+U mode can spot robbers in CnR
1. Author of the post is writing about the shadow of a car. Car shadows are generated with so called Shadow Mapping (creating a shadow texture and then putting it on scene objects ). It is bery common bug that a single shadow is not visible only on the nearest surface but also on every other surface in the line of light source and a shadowed object. it is very visible for example in Rigs of Rods game also.

A good solution is using stencil shadows however they are more expensive than the first method.

2. Shadows on tracks are precalculated shadows using raytracing technique. Each and every vertex is being analised if it is visible from light source. If it is it is set to white colour if not it is set to dark gray. After applying textures the white to gray colors are interpolated and mixed with textures. The reason shadows dont look very good is that not only each vertex should be precalculated (because there are not always very close to each other) however each texel (pixel on texture) (maybe not each but one per 4 texels) should be checked. This would create a precalculated shadow map for a track and shadows would be a lot more detailed.
#5 - Ian.H
Quote from himself :1

[ snip ]

2. Shadows on tracks are precalculated shadows using raytracing technique. Each and every vertex is being analised if it is visible from light source. If it is it is set to white colour if not it is set to dark gray. After applying textures the white to gray colors are interpolated and mixed with textures. The reason shadows dont look very good is that not only each vertex should be precalculated (because there are not always very close to each other) however each texel (pixel on texture) (maybe not each but one per 4 texels) should be checked. This would create a precalculated shadow map for a track and shadows would be a lot more detailed.

Some of the shadow issues look like simple non welded or overlapped vertices. This is easily spotable as the shadow is _very_ dark (not really resembling a shadow at all and in a "silly place") with hard edges.. the general track shadows themselves look similar from what we can see of the track to the method used in rF, create a simple invisible box / shape that casts a shadow rather than the higher-poly model of whatever is being represented to save resources.

I don't know how the tracks are constructed in LFS, and only have experience in creating them for rF, but have encountered some of the issues with my own stuff in the past, including car shadows being cast on vertical faces of bridges etc that I now can't remember what I did to fix.. this maybe similar to the car on the roof shadow bug mentioned in the OP.



Regards,

Ian

Shadow bug
(5 posts, started )
FGED GREDG RDFGDR GSFDG