[solved..moreless]problems with ofusion+ogre + linux

marc_antoine

31-05-2008 18:29:00

ok, i have been using ogre in linux and i tested the ofusion library, after a few adjustments of code i got it to compile, but i have some problems in windows and linux the scene looks like these pics:






the scene has a omni light, and has the cast shadows on, i don't know why it looks like this, i even turned off the cast shadows directly from the .OSM file.

heeelp!!

Lioric

01-06-2008 23:33:32

Are you using shaders?

This might be a driver issue between the platforms

marc_antoine

02-06-2008 04:51:37

hi lioric, not at all it is a scene with a plane and a tube, the plane has a grass textures and the tube a concrete texture, both are jpg. also the scene has a free camera, and an omni light. as a start point i used the code from tutorial 6, just added the following snippet, in order to use oFusion:

// Create the scene loader

OSMScene oScene(mRoot->createSceneManager(ST_GENERIC, "Default SceneManager"),mRoot->getAutoCreatedWindow());
// Create an oE_Loader Callback object to post-process created objects

OSMSceneCallbacks oe_Callback;

// Initialises with the scene to be loaded and the callback if requiered

oScene.initialise("test.OSM", &oe_Callback);

// create and setup the scene in the root node

oScene.createScene();
SceneManager *mSceneMgr = oScene.getSceneManager();
OSMScene::CameraList camList = oScene.getCameraList();
//Camera *mCamera = mSceneMgr->createCamera("Camera");
Camera *mCamera =camList[0];



tha'ts all the code i have to load the scene, if there's something wrong please tell me... when i see the ogre.log seems everything goes fine

15:58:39: ********************************
15:58:39: ** oScene Loader Lib **
15:58:39: ********************************
15:58:39: oSceneLoader: Loading 'test.OSM' file
15:58:39: oSceneLoader: Creating scene on 'Root' node
15:58:39: Mesh: Loading Plane01.mesh.
15:58:39: WARNING: Plane01.mesh is an older format ([MeshSerializer_v1.30]); you should upgrade it as soon as possible using the OgreMeshUpgrade tool.
15:58:39: Texture: Grass2.jpg: Loading 1 faces(PF_R8G8B8,756x512x1) with 5 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x512x1.
15:58:39: Mesh: Loading Tube01.mesh.
15:58:39: WARNING: Tube01.mesh is an older format ([MeshSerializer_v1.30]); you should upgrade it as soon as possible using the OgreMeshUpgrade tool.
15:58:39: Texture: Concgray.jpg: Loading 1 faces(PF_R8G8B8,756x512x1) with 5 hardware generated mipmaps from Image. Internal format is PF_X8R8G8B8,1024x512x1.
15:58:40: Creating viewport on target 'Tutorial Render Window', rendering from camera 'Camera01', relative dimensions L: 0.00 T: 0.00 W: 1.00 H: 1.00 ZOrder: 0


but it is weird that the scene doesn't start where it should, i mean the camera seems to be in another position different from the one i set in 3dsMAx, also in windows i have the same error... the same "black scene" and the misplaced camera, the scene is very simple... maybe somebody has a snippet or a very very very small example of how to use oFusion ..??..


thanx any help!..
:( :roll:

Lioric

02-06-2008 17:28:06

What kind of shadows are you using?

Test with different shadow types

Do a test by using the autocreated scene manager (dont create a scene manager manually)

marc_antoine

03-06-2008 03:27:08

i wish could say my suffering is over, buuuuut..... it is not, i got it to work in windows..i created a new scene with a plane and 4 boxes... changed the code to the code of the tutorial number 2, and in the createScene method, used this code:

OSMScene oScene(mRoot->getSceneManager("ExampleSMInstance"),mRoot->getAutoCreatedWindow());

// Initialises with the scene to be loaded and the callback if requiered



oScene.initialise("test.OSM");

// create and setup the scene in the root node

oScene.createScene();

mSceneMgr= oScene.getSceneManager();

mSceneMgr->setAmbientLight(ColourValue(0, 0, 0));

mSceneMgr->setShadowTechnique(SHADOWDETAILTYPE_MODULATIVE);



i'll try this on linux as soon as i can hope it works.... :S... meanwhile is there any step by step procedure i should be aware of, about using the oFusion library?... i know you all guys already have one please..show me the moneeyyyy..!! ok kidding now seriously, it would be great if some one could show me a snippet or something, thanks in advance, i will post what i found in linux, i hope it is not a driver issue ....if anyon also has a clue for this let me know .... i know guys you rock,...

Lioric

04-06-2008 22:35:56

There is not a specific way to use the loader, use as you need, the methods you need (your current usage is correct)

This is mostly related to your scene materials or harware support (drivers)

marc_antoine

08-06-2008 20:14:39

ok everything gets resolved if disable the ATI accelerated 3d graphics drivers from third party (that means ATI) they are needed if you want compiz and compiz fusion and all that candy and nice effects... :cry: even the flick that appers in the sample demos disappeared, if someone has a step by step ATI drivers installation would be great meanwhile i think i can live with all that eye candy..... :( i hope...... oh by the way seems that as a matter of fact a camera and a scenemanager has to be created before making something with oFusion in a while i will post the full code a very simple code to help start someone :) ...