Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Stencil Shadow Help Plz [Re: ulillillia] #76353
06/01/06 21:01
06/01/06 21:01
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
This is likely not the problem of the camera being inside the shadow volume, but instead the shadow not being drawn becasue the camera is too close or the model is being clipped.

The current Stencil shadow system (z-pass) is really only useful for games where the camera is never going to get too close to a shadow caster, such as a top-down rpg or something...in that case they will work perfectly.

Stencils shadows are by their nature going to be somewhat slow, because of fill rate demands. You can dramatically increase performance by using model LOD--the shadows will be drawn from the lower detail meshes.


Sphere Engine--the premier A6 graphics plugin.
Re: Stencil Shadow Help Plz [Re: Matt_Aufderheide] #76354
06/02/06 09:09
06/02/06 09:09
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Quote:

...only useful for games where the camera is never going to get too close to a shadow caster, such as a top-down rpg or something...in that case they will work perfectly.




I had this same issue in the RPG concept Realm of Kings, also available at the games downloads area of indiglow as above.

To be honest this was one of the reasons I bought Sphere, as it seemed to me to have a better shadow system. Still it is very puzzling as in short, this problem with the Stencil Shadows makes them useless, to me anyway.

While I see several references to the range of the camera from the object casting the shadow, in my testing this does not seem to be a factor, with the shadows switching off in this way, from quite far away. It really seems to be some issue with the angle of the camera, possibly in relation to the angle of the shadow.

Could someone from Conitec give me an official line on this problem? TIA


The Art of Conversation is dead : Discuss
Re: Stencil Shadow Help Plz [Re: indiGLOW] #76355
06/02/06 09:48
06/02/06 09:48
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
That's what I told you in my other post. Whether you're just 200 quants away from the object or just over 5000, it makes no difference and the time it seems to occur is otherwise random.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Stencil Shadow Help Plz [Re: ulillillia] #76356
06/02/06 12:25
06/02/06 12:25
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
@Ulillillia: I have since removed stencil shadows from the demo, as its clearly buggy.

I think it is to do with angles, I think when the angle from the camera to the shadow is at a certain position, the shadows turn off. Maybe you could set up some kind of test rig as you seem to be very good at creating these...if you have time and inclination that is.

I am at a loss, but considering we are most likely going to use sphere for our shadows, its not a big issue for us. It was just something I have been meaning to bring up on these forums for some time.

Thanks for your input


The Art of Conversation is dead : Discuss
Re: Stencil Shadow Help Plz [Re: indiGLOW] #76357
06/02/06 14:29
06/02/06 14:29
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
For running the experiment, you just need to know how to set them up properly. First, you often need a control. This particular experiment pretty much doesn't have one, other than shadows being enabled. This is the basis from which the experiment is carried out from. Then comes setting up the variations. What you need is to first establish where on the screen the shadow disappears. With this now in mind, try merely panning the camera around and take notes of the behavior. Explore all possible angles with the shadow in view. Quite often, there's a pattern involved which is why taking notes is important. With all the angles tested, try changing the distance from something like 256 quants away to 512 quants away or 128 and repeat taking notes as usual. Third, try changing the viewing angle. That is, instead of the camera being south of the object, move it so that the camera is to the northeast of it or something and try it there. Finally, try different-shaped models and see what happens. Compare all your notes and look for any particular patterns. Heh, try changing the field of view once and see what happens.

Edit: This is how I carry out my experiments and give the details. Sometimes when numerical values are used, charts and graphs come in handy (as with my performance graph of which uses a logarithmic scale). It's actually fairly close to the scientific method.

Last edited by ulillillia; 06/02/06 14:32.

"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Stencil Shadow Help Plz [Re: ulillillia] #76358
06/02/06 16:24
06/02/06 16:24
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
I found this in the manual:
Quote:

Take care that shadow casting lights don't cast a shadow towards the camera. This limitation is normally kept by the sun, but can be violated by low-flying lights.



It's on the cast page and is not mentioned on the shadow or shadow_stencil page. So it's not a bug but a limitation of stencil shadows. I think this should be put on the shadow_stencil page aswell since that's where limitations of stencil shadows are listed.

Re: Stencil Shadow Help Plz [Re: Excessus] #76359
06/02/06 16:45
06/02/06 16:45
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Yes it certainly should, however with stencil shadows it doesn't seem to be limited to the direction of the shadow, i.e towards camera, as this problem occurs regardless of camera location, front, side, behind or above etc...

IMHO: IF this is a real flaw in stencil shadows, they should not be included in the engine, as clearly they are next to useless.


The Art of Conversation is dead : Discuss
Re: Stencil Shadow Help Plz [Re: indiGLOW] #76360
06/02/06 16:54
06/02/06 16:54
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
Yes, in my case, the shadows were going away from the camera, not toward it. If the camera was facing due north, the shadows were going toward the northwest if I recall correctly.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Stencil Shadow Help Plz [Re: ulillillia] #76361
06/02/06 17:52
06/02/06 17:52
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
I really dont understand why you call them useless, they have always worked for me when used correctly (i.e. not near the camera, or beyond the clipping plane or frustum). I just havent seen this problem you are mentioneing, unless it was caused by the above situations, nor can I figure out why such a problem would occur technically.

The reason for the normal failures is the way z-pass shadow volumes work--if the camera enters a shadow volume, it will inverse the results, and there is no easy way to tell the renderer if the camer ais in fact in a shadow volume.

The way to solve this is of course the z-fail method. The z-fail method requires additional "caps" for the shadow volumes, which can dramatically increase the filrate requirements, so in my opinion is best implemented using vertex sahders and a special shadow mesh.


Sphere Engine--the premier A6 graphics plugin.
Re: Stencil Shadow Help Plz [Re: Matt_Aufderheide] #76362
06/02/06 18:19
06/02/06 18:19
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline OP
Serious User
indiGLOW  Offline OP
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Simply look at the screenshots I posted above. In the first shot, the shadow is visible, the 2nd its not. The camera xyz has not changed, just the camera pan, in this case a slightly raised view. So if this was a camera inside the cast zone, why would it work in the first and not the 2nd?

Note: this problem is the same, regardless of where the camera is in the level. So while I accept their are some issues with camera's inside the shadow clipping plane, I don't understand how without moving the cameras location the shadow is effected...

To clarify: If shadows are going to pop on and off with little or no warning, or reason, then they are pretty useless to me.


The Art of Conversation is dead : Discuss
Page 2 of 3 1 2 3

Moderated by  HeelX, Spirit 

Gamestudio download | 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