shadowsystem bugs ?

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
Kristian
Hobgoblin
Posts: 542
Joined: Sun Jan 12, 2003 7:35 pm
Location: Copenhagen, Denmark

shadowsystem bugs ?

Post by Kristian » Fri May 20, 2005 4:35 pm

Hello,

I got a scene with 2 models (shaddowcaster and a shadow reciever) and 1 shadowcasting spotlight.
( The shadowcaster is a playermodel and the shadow reviecer is the "world" mesh. )

1.
When rendering a transparent object (player) with shaddows setting the the transparent factor to zero the object seem to be be recieving its own shaddow in quite a strange way.
Its like the shadow shown on the world is "inverted" in the areas where the transparent player model should be visible if it "was" visible. (shadow recieving for the player material is set to off).

2.
When I first tested this I used to place the light on the same position and direction as the camera and then I noticed that the shaddow didnt showup at all before I even moved the camera but the model was transparent as expected.
The next frame where i changed the position of the camera the shadow became visible along with the selfshadowing thing.

The following has been tested with SHADOWTYPE_STENCIL_ADDITIVE and SHADOWTYPE_STENCIL_MODULATIVE on the Ogre 1.01 cvs branch as i recall.
0 x
Kristian, crying out loud: "If it works. Don't fix it!" :p
HCA
HCA2
GuppyLife

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Fri May 20, 2005 5:03 pm

1. Stencil shadows don't play well with transparency, because they are geometry based and rely on consistent depth writing. Most of the time you have to turn shadow casting / receiving off for them.

2. See 1.
0 x

User avatar
Kristian
Hobgoblin
Posts: 542
Joined: Sun Jan 12, 2003 7:35 pm
Location: Copenhagen, Denmark

Post by Kristian » Fri May 20, 2005 5:32 pm

Is it possible to render a stencil shadow casted from an object which is has the option setVisible ( false ) set on it ? By doing some hack or something...
0 x
Kristian, crying out loud: "If it works. Don't fix it!" :p
HCA
HCA2
GuppyLife

User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD » Fri May 20, 2005 6:50 pm

Are you asking whether it is possible to render only the shadow of an invisible object?

I don't know, but I think that should be possible somehow; maybe you can skip the rendering of the object itself. Just a shot in the dark, try turning depth write off for the object in addition to making it transparent. That way it shouldn't affect the frame buffers at all AFAIK.
0 x

User avatar
Kristian
Hobgoblin
Posts: 542
Joined: Sun Jan 12, 2003 7:35 pm
Location: Copenhagen, Denmark

Post by Kristian » Fri May 20, 2005 6:58 pm

Allready tryed that. Didnt work.
0 x
Kristian, crying out loud: "If it works. Don't fix it!" :p
HCA
HCA2
GuppyLife

Post Reply