1 registered members (AndrewAMD),
559
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Shadows Flickering
[Re: Dooley]
#466052
05/23/17 05:36
05/23/17 05:36
|
Joined: May 2005
Posts: 868 Chicago, IL
Dooley
OP
User
|
OP
User
Joined: May 2005
Posts: 868
Chicago, IL
|
I have figured out how to stop the flickering shadows. Remember this is the A7 Engine, so you may not need to do this.
First: Create your model - LOD 0 Second: Create a lower poly 2nd model for LOD 1 Third: Create a third low poly model for LOD 2, but scale the model down about .05, so it will be 95% of the original size. Fourth: Use shadow_lod = 2 so the slightly smaller model is used to cast shadows. This model is never actually seen in my game.
Result: The shadow polygons do not intersect the actual model polygons. It casts and receives shadows, but there is no flickering!
If you wanted the extra LOD step, I guess you could do this with LOD 3 instead of 2. In this case, make sure your shadow range is low enough that shadows will not show on distant LOD 3 models (or you'll see them flickering)
If this is fixed in A8, no problem, but I thought it might help others with the same problem.
|
|
|
Re: Shadows Flickering
[Re: Dooley]
#466070
05/23/17 23:26
05/23/17 23:26
|
Joined: May 2005
Posts: 868 Chicago, IL
Dooley
OP
User
|
OP
User
Joined: May 2005
Posts: 868
Chicago, IL
|
Okay, the above description is accurate and is working mostly. However, when trying to do this with other models, the engine does not seem to recognize LOD steps for some of my models.
I have made the following files: Ruins_Pillar1_0.mdl Ruins_Pillar1_1.mdl Ruins_Pillar1_2.mdl
I set the following flag in the object's action: my.eflags |= CLIP1;
I set the shadow LOD in the main function: shadow_lod = 2;
I set the object's shadow: set(my,SHADOW);
It is casting a shadow, but the shadow appears to be using LOD 0, instead of LOD 2. This results in the flickering issue. For some models, the LOD 2 is working, and they are noticeably smaller than the object. However, with other objects, like the pillar mentioned above, it is not using LOD 2 to cast shadows.
This happened actually the first time I tried to implement this solution. I'm not sure what I did to activate LOD 2 shadows, but it started working right after I changed the shadow_range to 5 (from 10). Now, however, it still works even if I switch the shadow range back to 10, but only for those objects in which it recognizes the LOD 2 model.
I will keep trying to fix this...
Last edited by Dooley; 05/23/17 23:27.
|
|
|
|