Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 559 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Shadows Flickering #465801
05/12/17 22:58
05/12/17 22:58
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
I'm using A7 (Still) with stencil shadows.
Certain objects, large ones usually, have this bad tendency to show shadows flickering when the camera moves, especially on the light side of the object, which should not be receiving shadows at all.

Is there a way to prevent this without turning off self-shadow, or has this issue been resolved in A8?

Re: Shadows Flickering [Re: Dooley] #465804
05/13/17 05:33
05/13/17 05:33
Joined: Feb 2011
Posts: 124
Germany Nrw Herford
HenWoll Offline
Member
HenWoll  Offline
Member

Joined: Feb 2011
Posts: 124
Germany Nrw Herford
Close your meshes and the flickering goes ,

Re: Shadows Flickering [Re: HenWoll] #465806
05/13/17 06:40
05/13/17 06:40
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Meshes are closed, but they may be intersecting other models. Would that be a factor?

Re: Shadows Flickering [Re: Dooley] #465808
05/13/17 11:35
05/13/17 11:35
Joined: Feb 2011
Posts: 124
Germany Nrw Herford
HenWoll Offline
Member
HenWoll  Offline
Member

Joined: Feb 2011
Posts: 124
Germany Nrw Herford
are you played allready with the camera.clip_near/far ?

Re: Shadows Flickering [Re: HenWoll] #466029
05/22/17 07:00
05/22/17 07:00
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
I have clip levels set for the models.

my.eflags |= CLIP1;

Like this... Each model currently has a main LOD (_0) and a secondary (_1).

I'm using "shadow_lod = 0;" but I have also tried setting to 1. In both cases there is flickering.

Re: Shadows Flickering [Re: Dooley] #466052
05/23/17 05:36
05/23/17 05:36
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline 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 Offline OP
User
Dooley  Offline 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.
Re: Shadows Flickering [Re: Dooley] #466092
05/24/17 15:57
05/24/17 15:57
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Final Update:

I did not realize I had shadow_decal set for the objects in question. This somehow stopped the engine from using the 2nd LOD model to cast shadows. Works great now!


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1