Mogre + oFusion

Eldritch

25-03-2007 11:06:44

Excuse me if I have misunderstood what oFusion really is... I am curious to know if oFusion can be used with Mogre. I mean, the scene loader lib..

DaCracker

25-03-2007 16:15:08

Excuse me if I have misunderstood what oFusion really is... I am curious to know if oFusion can be used with Mogre. I mean, the scene loader lib..

Yes, I'm pretty sure that the scene loader has been ported to C#.
Search in the Mogre forums.

smernesto

25-03-2007 17:51:16

There is two ports of the scene loader.

One is in the wiki page of Mogre, and the other that I ported is in the Mogre forums, I will upload it to the wiki also.

Ernesto

Eldritch

25-03-2007 19:05:17

Cool, found the OSM loader class! Thanks!

One problem has arisen now though, I do not seem to have any Ogre materials in my Material list in 3dsmax. I downloaded the top download from oFusion's site. I think I might have forgotten to download any special "Ogre addon" or something.

Eldritch

25-03-2007 23:32:10

Nevermind, I located it.

Does anybody know of any sample OSM scenes I can try out?

Eldritch

26-03-2007 15:17:50

Ehm.. tried the OSMLoader by LuRenJia from the Wiki. I see nothing but a black screen after load. Ogre.log reveals lots of exceptions being thrown when attempting to load the various parts from the OSM scene.


**********************************************
** OSM Scene Loader **
**********************************************


16:10:17: OSMLoader loading scene form file: osm_test.osm
16:10:17: OSMLoader: Creating scene on 'SceneRoot' node.
16:10:34: Mesh: Loading Plane01.mesh.
16:10:34: Texture: terr_dirt-grass.jpg: Loading 1 faces(PF_B8G8R8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
16:10:49: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode 'Plane01' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
16:11:07: Mesh: Loading Cylinder01.mesh.
16:11:07: Texture: RustyBarrel.png: Loading 1 faces(PF_B8G8R8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
16:11:12: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode 'Cylinder01' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
16:11:22: Mesh: Loading Cylinder02.mesh.
16:11:25: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode 'Cylinder02' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
16:11:31: Mesh: Loading Cylinder03.mesh.
16:11:33: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode 'Cylinder03' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
16:11:39: Mesh: Loading Cylinder04.mesh.
16:11:41: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode 'Cylinder04' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
16:11:47: Mesh: Loading Cylinder05.mesh.
16:11:49: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode 'Cylinder05' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
16:11:56: Mesh: Loading Box01.mesh.
16:11:56: Texture: WoodPallet.png: Loading 1 faces(PF_B8G8R8,256x256x1) with hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,256x256x1.
16:11:58: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode 'Box01' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
16:12:01: Mesh: Loading Box02.mesh.
16:12:02: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode 'Box02' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
16:12:05: Mesh: Loading Box03.mesh.
16:12:06: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode 'Box03' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
16:12:10: Mesh: Loading Box04.mesh.
16:12:12: An exception has been thrown!

-----------------------------------
Details:
-----------------------------------
Error #: 7
Function: SceneManager::getSceneNode
Description: SceneNode 'Box04' not found..
File: ..\src\OgreSceneManager.cpp
Line: 739
Stack unwinding: <<beginning of stack>>
16:12:25:

********************************
** oSceneLoader: Scene loaded **
********************************


The .osm file, .material file and the .mes files are all in the same folder.

Eldritch

26-03-2007 15:35:22

smernesto: I tried your port, worked like a charm! :D
Thank you very much!! :)

One thing I noticed though is that all textures have RGB on Ambient and Specular set to 0 in the .material file.

smernesto

26-03-2007 18:03:10

Yeah, I ported the OSMLoader again because the other I think has some bugs.

Some of the exceptions are because the OSMLoader try to find some nodes and another things in the scene first, then if a exception is throw then the OSMLoader loads the mesh, or the light etc. Dont worry about some of those exceptions.

I will Upload the code to the wiki now.