oScene loader- Camera Problem

sk

18-07-2008 19:03:52

Hello

im having trouble loading the .osm. I make a simple scene, which contain a box with texture, a light and a camera. The export is succesful.

14:38:10: == Exporting Objects ==


14:38:10: Exporting Object: Box01


14:38:10: Object has 1 texture sets


14:38:10: Compiling material 01_-_Default


14:38:10: New texture unit GreenSkin.jpg


14:38:10: Mesh: Box01_mesh.... done


14:38:10: Exporting Object: Spot01.Target


14:38:10: Exporting Object: Camera01.Target


14:38:10:

== Exporting Materials ==


14:38:10: 01_-_Default


14:38:10: 1 material(s) exported to test.material



In the aplication, i have..


OSMScene oScene
oScene.initialise("test.osm");
oScene.createScene();
sceneMgr = oScene.getSceneManager();


But i get a black screen, but wait.
I check the things in the scene with getEntityList() , getCameraList() and getLightList() . and say that i dont have a camera.

did i miss some setCamera or something? because te exporte seem succesful.

thanks

(sorry for my english)


this is the .osm. it have the camera, but the camera dont load for some reason


<oe_scene>
<sceneManager type="0" />
<bkgcolor r="0" g="0" b="0" />
<lightColor r="0.5" g="0.5" b="0.5" />
<shadowTechnique type="0" tex_size="512" tex_count="1">
<color r="0" g="0" b="0" />
</shadowTechnique>
<entities>
<entity name="Box01" hidden="false" filename="Box01.mesh" CastShadows="yes" 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>
</entities>
<lights>
<light name="Spot01" type="spot" on="true" CastShadows="no" hotspot="43" falloff="45" intensity="1">
<position x="-4.8388991e-008" y="143.75322" z="1.1070174" />
<rotation x="-2.2162554e-008" 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" />
<target name="Spot01.Target">
<position x="-4.8388991e-008" y="-1.4760147" z="1.107011" />
<rotation x="-0.5" y="0.50000006" z="-0.5" w="-0.5" />
<scale x="1" y="1" z="1" />
</target>
</light>
</lights>
<cameras>
<camera name="Camera01" FOV="0.785398">
<position x="-4.7221256e-006" y="193.90085" z="108.02965" />
<rotation x="-0.28607595" y="2.0942281e-008" z="-6.2523884e-009" w="-0.95820695" />
<scale x="1" y="1" z="1" />
<target name="Camera01.Target">
<position x="4.4005983e-006" y="-124.46929" z="-100.67395" />
<rotation x="-0.5" y="0.50000006" z="-0.5" w="-0.5" />
<scale x="1" y="1" z="1" />
</target>
</camera>
</cameras>
</oe_scene>

Lioric

18-07-2008 22:47:31

As the Camera01 is the only camera in the scene and as you are automatically creating the scene manager (the scene loader will create the scene manager for you, you are not passing your own scene manager to the loader), the Camera01 is autoamtically set as the current camera in the created viewport

Is the scene visible in the preview viewport before exporting the scene?

sk

18-07-2008 22:58:27

yes, here is a scrennshot



(sorry, is a big image)

Lioric

21-07-2008 01:48:35

It seems you are using the Pro version, are you loading the scene with the oSceneLoader Pro or with the oSceneLoader CE?

Test by displaying the bounding boxes (when the scene is loaded, enable 'showBoundingBox' for each object in the scene)

sk

21-07-2008 02:53:45

i think im not using the pro version, i just go here...

http://www.ofusiontechnologies.com/downloads.html

and download the first two (the two say Ce version)

Tomorrow i will check the bounding box. Thanks

Evak

21-07-2008 06:43:19

The pro version camera was only recently fixed one or two builds ago but works perfectly now. We have both an FPS cam and TPS cam which matched between the app and ofusion viewport.

CE hasn't been updated in about a year and is missing a ton of features which is unfortunate.

sk

21-07-2008 20:30:54

oScene.initialise("test.osm");
oScene.createScene();
sceneMgr = oScene.getSceneManager();
sceneMgr->showBoundingBoxes(true);


Still nothing, just the black screen

Lioric

21-07-2008 23:57:11

You need to enable bounding box display of each entitiy, not the scene manager

Iterate over the entitiy list and use the showBoungBox method

In any case i will test your scene asap