kintaro
06-02-2007 14:59:20
Hi, I am having a problem with shadows using oSceneLoader.
To show the problem I made a simple scene with a white box and a blue plane.
A added manually shadows in the code, and the shadow type is SHADOWTYPE_TEXTURE_MODULATIVE.
mSceneMgr->setShadowTechnique(SHADOWTYPE_TEXTURE_MODULATIVE);
mSceneMgr->setShadowTextureSize(512);
mSceneMgr->setShadowColour(ColourValue(0.6, 0.6, 0.6));
Depending on angle or rotation of camera, the shadows are ok, Screenshot 1, but many times shadows comes to be strange, bugged, Screenshot 2 and 3.
Screenshot 1:
Screenshot 2:
Screenshot 3:
How can I fix it?
Thanks for help
Lioric
06-02-2007 15:47:44
What are the results if you define the shadow type in the preview viewport (via "Scene" settings panel)?
Is the "Build edge list" option selected?
You are using Texture shadows, are the scene correctly setup for this shadow type (i.e. objects cant cast and receive at the same time)?
What is the light position when the shadow issue is displayed?
kintaro
06-02-2007 16:19:14
What are the results if you define the shadow type in the preview viewport (via "Scene" settings panel)?
Using SHADOWTYPE_TEXTURE_MODULATIVE, in preview viewport does not appear any shadow.
Is the "Build edge list" option selected?
In above screenshots, no. But I tried it now, selecting "Build edge list" option, but the same bug occurs again.
You are using Texture shadows, are the scene correctly setup for this shadow type (i.e. objects cant cast and receive at the same time)?
Yes.
What is the light position when the shadow issue is displayed?
Difficult question, I putted a small sphere where the omni light is, there show the light position, as the screenshots below shows:
Here is the osm file:
<oe_scene>
<sceneManager type="1" />
<bkgcolor r="0.490196" g="0.490196" b="0.490196" />
<lightColor r="0.5" g="0.5" b="0.5" />
<entities>
<entity name="Plane01" hidden="false" filename="Plane01.mesh" CastShadows="no" ReceiveShadows="yes">
<position x="0" y="0" z="-0" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
</entity>
<entity name="Box01" hidden="false" filename="Box01.mesh" CastShadows="yes" ReceiveShadows="no">
<position x="0" y="0" z="-0" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
</entity>
<entity name="Sphere01" hidden="false" filename="Sphere01.mesh" CastShadows="no" ReceiveShadows="no">
<position x="0" y="100" z="-100" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
</entity>
</entities>
<lights>
<light name="Omni01" type="omni" on="true" CastShadows="yes" intensity="1">
<position x="0" y="100" z="-100" />
<rotation x="0" y="0" z="-0" w="-1" />
<scale x="1" y="1" z="1" />
<color r="1" g="1" b="1" />
<specular r="1" g="1" b="1" />
</light>
</lights>
</oe_scene>
Thanks for your fast reply.
kintaro
08-02-2007 13:35:03
Hi, I made a video with a screen recorder showing how the shadows are behaving, made this explain better what is happenning with my application.
Here is the link for download the video:
http://www.savefile.com/files/475604
Thanks for help
Lioric
08-02-2007 16:58:32
This is not an issue in oFusion, is more related to the shadow system used in Ogre
Have you tested with directional lights (omni lights are not recommended)?
Is this issue related to this specific object or with any object?
Have you tested on another machine? with updated video drivers?
Gucman
01-03-2007 09:01:14
Hi. Texture shadows don't work well with omni lights. Try changing ligt to spot.