oSceneLoader - problems with shadows

ebol

11-10-2006 18:42:57

Hi!

I'm having problems adding shadows to me scene. Only the STENCIL shadows are working, when I try to use RTT shadows, theres no shadows in the scene. I'm exporting me scene to OSM file and then loading it with the oSceneLoader demo.

I really would like to use RTT shadows, since they'r cheaper then the stencil ones, and if theres a posibility of doing it automaticly under oFusion it would be great :)

What am I doing wrong? Is that an oF problem, the loader code, or my :)

This is the part of ogre.log for oSceneLoader:



19:28:44: ********************************
19:28:44: ** oScene Loader Lib **
19:28:44: ********************************
19:28:44: oSceneLoader: Loading 'scene.osm' file
19:28:44: oSceneLoader: Creating scene on 'Root' node
19:28:44: WARNING: Texture instance 'Ogre/ShadowTexture0' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
19:28:44: Creating viewport on target 'rtt/2348672', rendering from camera 'Ogre/ShadowTextureCam0', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
19:28:44: Viewport for camera 'Ogre/ShadowTextureCam0', actual dimensions L: 0 T: 0 W: 512 H: 512
19:28:44: Mesh: Loading gt4 ref body.mesh.
19:28:45: Texture: gt4_ggg.jpg: Loading 1 faces(PF_B8G8R8,1024x1024x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x1024x1.
19:28:45: Texture: spheremap.png: Loading 1 faces(PF_B8G8R8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
19:28:45: Mesh: Loading Plane01.mesh.
19:28:45: Texture: rockwall.tga: Loading 1 faces(PF_R8G8B8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
19:28:45: Creating viewport on target 'OGRE Render Window', rendering from camera 'Camera01', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
19:28:45: Viewport for camera 'Camera01', actual dimensions L: 0 T: 0 W: 800 H: 600
19:28:45: ********************************
19:28:45: ** oSceneLoader: Scene loaded **
19:28:45: ********************************


Can anyone help?
Thanks in advance

Lioric

11-10-2006 21:57:47

In the Shadows demo (from the Ogre SDK), are the texture shadows working in your machine?

ebol

11-10-2006 22:53:35

Forgot to say that, but yes, no problems in the demo, so its not an hardware issue.

ebol

12-10-2006 10:09:51

I was able to fix this issue, you can say it was my fault :)

What I was working on was a groung plane and an object in the midle of it, casting shadow.

Well, in max, every object has 'cast shadows' and 'recive shadows' enabled by default. For some reason, when the plane had both enabled, only the stencil shadows were visible. After I changed the plane only to 'recive', the texture shadows also showed up :)

So sorry, my mistake :)

Lioric

12-10-2006 17:41:47

In Texture shadows an object cant be a shadow caster and receiver at the same time

To set the shadow casting property, right click on object, select "Properties..." and "Cast Shadows"

The receive shadows property is handled at the material level, upgrade or assign an oFusion material to the object to select it

Are the texture shadows visible in the preview viewport?