Texture shadow problem

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
ggunhouse
Kobold
Posts: 28
Joined: Tue May 17, 2005 2:10 pm
Location: Atlanta, Georgia

Texture shadow problem

Post by ggunhouse »

Hi, everyone,

I'm helping to test the OGRE-based web-3D program now known as Blink 3D (http://www.pelicancrossing.com). I've encountered a problem with texture shadows that I'm hoping someone in this forum can help me understand. I have created a simple scene made up of a ground plane, a wall, and the ninja. The whole scene is lit by a single distant light set to cast shadows. The shadows are texture_modulative. When the ninja approaches the wall, his shadow falls on it in a very natural-looking way. However, when the ninja passes through the wall (collision detection is off) his shadow still appears on the wall behind him. Here is an image showing three stages:

Image

It appears that the shadow volume extends both away from the light source and towards it, and that it affects materials on both sides of the shadow-casting object (the ninja). Is this the way texture shadows work? Or can something be done to fix this problem? The same scene with stencil shadows works fine, by the way. You can see both live in Internet Explorer (the Blink 3D plug-in should load automatically, though you will probably have to lower your IE security level temporarily to medium).

Keep in mind that Blink is currently only an alpha release. It has some bugs and limitations. Don't load these worlds if you have important work open in another IE window.

The URL of the texture shadow test is:

http://www.blink3dworld.com/environment ... shadow.htm

The URL of the stencil shadow test is:

http://www.blink3dworld.com/environment ... shadow.htm

Thanks in advance.
Last edited by ggunhouse on Thu Jul 27, 2006 2:29 pm, edited 1 time in total.
Glenn
Krulspeld
Kobold
Posts: 35
Joined: Tue Apr 05, 2005 9:51 pm

Post by Krulspeld »

This is a known difficulty with shadow textures as described in the following post, where Sinbad also suggests a solution for this problem.
http://www.ogre3d.org/phpBB2/viewtopic.php?t=4257
ggunhouse
Kobold
Posts: 28
Joined: Tue May 17, 2005 2:10 pm
Location: Atlanta, Georgia

Post by ggunhouse »

OK, thanks.
I did search the forum for posts on the topic, but somehow missed that thread.
People on the Blink forum were interested in texture shadows because they had soft edges. They didn't like the sharp edges of the stencil shadows (though they don't bother me that much).
Glenn
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

Nice effect, though! :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
BlasterN
Gnome
Posts: 378
Joined: Thu Mar 24, 2005 1:07 am
Location: Spain

Post by BlasterN »

I only have to say something...

http://developer.nvidia.com/object/robu ... lumes.html <-- see it!
Works:
MapToMesh | Bengine B9 @ www.sourceforge.net/projects/maptoogremesh/
3DWorldStudio exporter@ www.blastern.info
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2

Post by Kencho »

Yes, this article has been mentioned many times here :)
Image
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

also, it's about stencil shadows, not texture shadows
ggunhouse
Kobold
Posts: 28
Joined: Tue May 17, 2005 2:10 pm
Location: Atlanta, Georgia

Post by ggunhouse »

OGRE stencil shadows work very well in Blink. If you have the Blink plug-in installed, you can see an example at:
http://www.gsu.edu/~artwgg/blink3d/loggiamod.htm
Glenn