Texture shadows not shown in oFusion viewport (stencil are)

sebarnolds

27-10-2006 13:08:29

Hi.

I a quite new user of Ogre and oFusion. I am currently integrating Ogre3D in our application at work and everything is going (quite) smoothly. We have purchased the PRO version of oFusion for one of our graphists but I am using the CE version (as I only develop / implement Ogre, I won't be using 3D Studio Max and oFusion very much).

I recently found a problem with the oFusion viewport. When I enable stencil shadows (additive), they show correctly in the viewport (and in my application too). However when I enable texture shadows (additive), they don't show at all. If I try things such as updating the viewport, I often receive an error message ("An Exception has been raised. You are advised to save your work. Report it"). Then, if I want it to work again, I must simply disable the viewport, enable it again and update it.

Here are some lines of the log :

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getAnimation
Description: Cannot find animation with name _OVP_ANIM__OVP_CAM_NODE_MainCamera.
File: ..\src\OgreSceneManager.cpp
Line: 2706
Stack unwinding: <<beginning of stack>>
13:56:48: Texture: spot_shadow_fade.png: Loading 1 faces(PF_B8G8R8,128x128x1) with 7 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.
13:58:33: 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.
13:58:33: Creating viewport on target 'Ogre/ShadowTexture0/0/0/0', rendering from camera 'Ogre/ShadowTextureCam0', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0
13:58:33: Viewport for camera 'Ogre/ShadowTextureCam0', actual dimensions L: 0 T: 0 W: 512 H: 512
13:58:36: WARNING: Mesh instance '__OVIEWPORT_Ground_mesh' was defined as manually loaded, but no manual loader was provided. This Resource will be lost if it has to be reloaded.
13:58:36: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode '__OVIEWPORT_Ground_node' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
13:58:36: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getAnimation
Description: Cannot find animation with name _OVP_ANIM___OVIEWPORT_Ground_node.
File: ..\src\OgreSceneManager.cpp
Line: 2706
Stack unwinding: <<beginning of stack>>
13:58:36: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode '_OVP_LIGHT_NODE_OmniLight' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
13:58:36: An exception has been thrown!


Note that they are a lot of errors about nodes / cameras / animations being not found (mostly nodes). However, the viewport renders fine except when using texture shadows.

I must add that even it the viewport fails to show them, when I export the scene, it renders fine in my application (I correctly set / unset cast shadows on the various objects of the scene).

I am using 3D Studio Max 8 with SP1. Please note that I am not an expert with 3D Studio Max and it is possible that the problem come from me. The scene is a simple scene with one plane (cast shadow off), one box (cast shadow on), one light (cast shadow on) and one camera.

Do you have any idea about that problem ?

Thanks forward,
Sebastien

sebarnolds

27-10-2006 15:09:30

Hi again.

I have an update about my problem.

I can have the texture shadows shown if I do the following :
- Set shadow technique to none
- Disable the oFusion viewport
- Enable the oFusion viewport
- Update the viewport
- Set shadow technique to texture shadow

Now it works.

Note that the exceptions are still in the log.

Sebastien

Lioric

27-10-2006 16:25:00

Could you send me the scene (or a test scene where the issue can be reproduced) that produces the error message when updating

sebarnolds

27-10-2006 16:37:30

Hi.

There is the test scene which generate an exception when switching to texture shadows.
You can download it here:
http://alterface.adsl.perceval.be/oFusionTestScene/testScene.zip

I tried again and had a hard time to make it generate the exception again. However, as soon as I enabled the three options in the oFusion viewport (Auto update meshes, auto update scene on start and clear scene before updating), it generated it.

Thanks for your help,
Sebastien.

Lioric

27-10-2006 16:46:19

I will review the scene

Bear in mind that "Auto update meshes" should be used only when needed, its not a setting that is to be used by default on all cases, when enabled you can change the geometry of the object in real time, but if you are not changing the geometry or you can use the "Update Sel" button instead (recommended), it should be disabled