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
3 registered members (Ayumi, NewbieZorro, TipmyPip), 13,888 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
ODE vs shadow_stencil = 2; #255530
03/11/09 04:15
03/11/09 04:15
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline OP
User
rojart  Offline OP
User

Joined: Oct 2004
Posts: 900
Lgh
Hello

I noticed a shadow anomalies, when I use the ODE Physic with shadow_stencil = 2; (see the screenshot), btw in Manual i found a mistake about "ph_selectgroup ( var bitmask );" under Remarks: Here's a sample bitmask for ph_selectgroup( 6 ), where 6 corresponds to the bits 1010: <- should be a 0110 bits.



Thanks


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: ODE vs shadow_stencil = 2; [Re: rojart] #255623
03/11/09 15:49
03/11/09 15:49
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
You're right with the mistake in the manual. But it's hard to judge from the screenshot whether the shadows are wrong or not. Can you post a close up screenshot from the shadow of a single object where the problem is more clear?

Re: ODE vs shadow_stencil = 2; [Re: jcl] #255633
03/11/09 16:08
03/11/09 16:08
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
JCL: See the horizontal pole, suspended from the ceiling by two bars? See how the pole penetrates the bars?
Look at its shadow to the left. The shadow of the pole does not penetrate the shadows of the bars.
Also on that bar, two blocks are attached to it, but their shadows dont touch its shadow.

Thats all I can see (and be able to explain) ...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: ODE vs shadow_stencil = 2; [Re: EvilSOB] #255637
03/11/09 16:20
03/11/09 16:20
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
I think you must set shadow_stencil to 1 or 3 when you want stencil shadows to be cast from a close light. Or, you must put that light more far away.

With shadow_stencil 2 or 4, the shadow volume is a column and not a cone. So when shadows are cast in different directions, they move aways from each other but the shadow does not get bigger, I hope you understand what I mean. This way, shadows from different meshes will come apart with close lights, it was always this way.

Re: ODE vs shadow_stencil = 2; [Re: jcl] #255658
03/11/09 19:10
03/11/09 19:10
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline OP
User
rojart  Offline OP
User

Joined: Oct 2004
Posts: 900
Lgh
@JCL
Yes, of course here is it.
JCL I will send the project source file to you.


@EvilSOB
I can´t better explain this. wink

@Spirit
Yes, I´ve casted any entities for the example, but finally I use it the stencil_shadow = 2; without cast flag for the entities.


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: ODE vs shadow_stencil = 2; [Re: rojart] #255660
03/11/09 19:37
03/11/09 19:37
Joined: Mar 2009
Posts: 40
MokyjeBrute Offline
Newbie
MokyjeBrute  Offline
Newbie

Joined: Mar 2009
Posts: 40
That's kool. Which with program have you done this wich? I harly get anything like that done with 3D GameStudio! i "guess" it has something to do with programming? Woah..

Re: ODE vs shadow_stencil = 2; [Re: MokyjeBrute] #255718
03/12/09 07:30
03/12/09 07:30
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Rojart: I don't see anything wrong in your screenshots. What you see is just the difference of z-fail shadows that are always parallel, and z-pass shadows that are not parallel. Z-fail treats any light source as if it were infinitely far away. This is visible in your shot. It's perfectly normal, and not a bug.

http://manual.3dgamestudio.net/shadow_stencil.htm

Re: ODE vs shadow_stencil = 2; [Re: jcl] #255778
03/12/09 14:39
03/12/09 14:39
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline OP
User
rojart  Offline OP
User

Joined: Oct 2004
Posts: 900
Lgh
You're right, I read a lot, but I forget most of what I just read eg. about differences between z-pass & z-fail shadows, now work it (see the screenshot, the dynamic light is far far away)

In Manual under remarks about stencil shadows:
> Z-fail stencil shadows ... "A script can be used for tracing a ray from a light source to the camera, and automatically switching to z-fail (You mean to z-pass or I´m wrong?) shadows when the ray hits an obstacle.
Perhaps is there possible to add this as new features like this:
shadow_stencil = -2; or shadow_stencil = -4;
The z-fail stencil shadows will be automatic switching to the z-pass stencil shadows when the light source come close to the camera, without extra coding?


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: ODE vs shadow_stencil = 2; [Re: rojart] #255827
03/12/09 20:44
03/12/09 20:44
Joined: Jun 2008
Posts: 151
Ukraine
XD1v0 Offline
Member
XD1v0  Offline
Member

Joined: Jun 2008
Posts: 151
Ukraine
Quote:
What you see is just the difference of z-fail shadows that are always parallel, and z-pass shadows that are not parallel. Z-fail treats any light source as if it were infinitely far away. This is visible in your shot. It's perfectly normal, and not a bug.

Why Z-fail is always parallel, what can you do with this?
z-pass shadow is impossible to use in first-person shooter, shadow drawn wrong if camera in the shadow.
For example in Doom 3 stencil shadow is camera independent, can you do that in A7 ?
For example
z-pass - shadows draw correctly

Z-fail - WRONG!!

Waiting for answer. Thanks.


A7 Commercial cool
Celeron 1700, GeForce 5500 FX 256mb, 1 Gb Ram
Re: ODE vs shadow_stencil = 2; [Re: XD1v0] #255861
03/13/09 02:12
03/13/09 02:12
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline OP
User
rojart  Offline OP
User

Joined: Oct 2004
Posts: 900
Lgh
Yes, why and I think that the z-fail algoritm is wrong?
Here an example with cpp sources that use it the z-fail algorithm with wonderful stencil shadow.




Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P

Moderated by  jcl, Nems, Spirit, Tobias 

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