Shadow problem, Lighting, alpha

Ameno

13-01-2009 16:48:47

My problem is my alpha texture cast weird shadows and I don't know why ?

The second problem is I try some settings with my basic omni and spot and the only setting ofusion is keeping is the color of my light and the far attenuation setting (I think). I try to use some 3ds max shadow settings like ray traced shadows with some colors in my shadow, but this part don't work. I kept my settings but I also tried to play with the scene option with shadow technique modulative. However, it's a general setting and works only on my spot.

I would like to configure my light seperatly because If I need (example) a lantern in the scene, I need specific shadow setting for it. Don't know exactly what is the pipeline to light a scene with 3ds max for an ofusion export but I would like a lead about that.

Texture is done in shaderFX.

Thank!

Lioric

14-01-2009 00:28:51

What shadows methods do you specifically need to configure in each light? The only non supported methods right now is the shadow far distance value and the use of a custom camera for the shadows

What are the light settings that are not mantained when exporting?

Ameno

14-01-2009 22:39:28


Ray traced shadow
Very dark blue for the shadow.

Lioric

15-01-2009 00:49:37

Raytraced shadows and per light shadow color is not supported by Ogre

For this you need to use a custom shader(s) to render the shadows, you can use the light's "shadow color" as defined in Max and automatically place it as a user property before exporting, in your application when the light is loaded, place this color value as a user defined object in the light, but you must modify Ogre to update the light's shadow color to be available as to the shaders by adding some similar to this to the "GpuProgramParameters::_updateAutoParamsLightsOnly" method:


case ACT_LIGHT_SHADOW_COLOUR:
_writeRawConstant(i->physicalIndex, source->getLightShadowColour(i->data), i->elementCount);


And in OgreAutoParamSource:


const ColourValue& AutoParamDataSource::getLightShadowColour(size_t index) const
{
return getLight(index).getShadowColour();
}


And in the light object, add the method to get the shadow color (either from the user defined object as noted above, or if you prefer by adding a "shadowColor" member where the shadow color is placed)