Help! SHADOWTYPE_STENCIL_ADDITIVE doesn't work in my level

Problems building or running the engine, queries about how to use features etc.
limbo
Kobold
Posts: 27
Joined: Fri Dec 10, 2004 7:08 am

Help! SHADOWTYPE_STENCIL_ADDITIVE doesn't work in my level

Post by limbo »

Hi all,

I'm testing different kinds of lighting. I create two directional lights, one is red and one is blue. When I tried STENCIL_ADDITIVE shadow. I met a problem. First, I tested it with a plane I made directly in Ogre and the shadow worked well. Then I loaded a BSP map made in Radiant, the ADDITIVE shadow didn't work in this circumstance. It casts no shadow. But other shadows, like STENCIL_MODULATIVE and TEXTURE_MODULATIVE works well. Anybody knows what happened? Thanks!
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67

Post by sinbad »

Since Quake3 levels already have pre-baked lighting, you can't use them with additive shadows. Additive shadows work by building up the light in the scene but masking out areas in shadow. Since the lighting is already baked in, it's too late for that. You can ony use 'darkening' ie modulative shadows.
limbo
Kobold
Posts: 27
Joined: Fri Dec 10, 2004 7:08 am

Post by limbo »

I didn't add light in BSP map, 'cause I want to test lighing in Ogre. The two lights, red & blue, are added in Ogre.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67

Post by sinbad »

The reasons are the same. The rendering technique used for Quake3 assumes pre-baked lighting. Whether you added light to the level or not is irrelevant, the rendering technique does not dynamically light the level.