ahmedali
21-09-2008 09:02:53
I just tried NxOgre in one of ogre's samples and created the debugRenderer and I could see the Shapes outlines and contact points etc
But I ported the same code to one of my custom application and I could not see any Visual Debug Shapes, no axis points etc. What could possibly be the reason?
NxOgre 1.0.20 Bleeding Edge started. Working with
- PhysX => 2.8.0 (280)
- Ogre => 1.4.7 (Eihort)
mcaden
21-09-2008 09:15:22
"the same code"...what code?
ahmedali
21-09-2008 09:43:16
Well its just 4 lines, thats make me wonder what could possible go wrong.
mNxWorld = new NxOgre::World("time-controller:ogre, log:yes");
mNxScene = mNxWorld->createScene("NxOgreScene", mSceneMgr, "gravity:yes, floor:no, renderer:ogre");
mNxWorld->createDebugRenderer(mSceneMgr);
gameWorld->nxScene()->createBody("basic_infantry.mesh", new NxOgre::Cube(100), Vector3(0,200,0), "mass:10");
The simulation is running fine but no debug visuals at all.
mcaden
21-09-2008 11:24:59
You're creating the DebugRenderer correctly.
I'm assuming gameWorld->nxScene() is your own function that returns your Scene* mNxScene?
Cube(100) is huge though...possibly bigger than your camera has in view. You might try setting it to simply 2, or conform it to the bounding box of your mesh.
betajaen
21-09-2008 11:41:50
Agreed. A 100 metre cube only weighing 10 kilograms is an impressive feat of craftmanship and materials but lower the size of the cube.
If that doesn't help; there are at least 100 different functions in PhysXDriver(mWorld->getPhysXDriver()) to configure the DebugRenderer to your evil bidding.
ahmedali
21-09-2008 12:28:42
Yes I have reduced the size but thats not relevant.
There is no display for actor's axis and even the FLOOR's axis .
createDebugRenderer turns all the options on, it works in ogre sample but not in my custom app?
I have also commented out OgreOde from my app, to make sure its not interfering.
I also disabled PagingGeometry, I will try disabling CEGUI to see...
Would Shoggoth might solve this problem?
==
Here the ogre head is attached to a box actor, but no debug rendering at all.
This is ETM Demo sample file, showing all debug renderings.
mcaden
21-09-2008 14:42:09
floor:no
explains why your floor isn't rendering...there isn't one.
and the NxOgre DebugRenderer only shows actors...doesn't do anything for Ogre meshes.
Is that Ogre head a body, or at least have an actor connected to it? And is the shape that makes up the collision shape small enough that some part of it is on the screen?
With "gravity: yes, floor: no" and without a static actor under it your actor probably fell out of sight the moment it loaded.
betajaen
21-09-2008 15:21:32
Are you using multiple scene managers? Perhaps you've passed the wrong one over that isn't been shown on the screen.
ahmedali
21-09-2008 21:29:03
I have finally identified the problem, but no proper fix.
I have a very basic main EXE which loads a LashBasicComponents.DLL file, all kinds of stuff ETM, PagedGeomtery, CEGUI etc and all the things are created & managed in it except the Ogre+the basic OctreeSceneManger(required by etm) which are initialized in main app just like Ogre samples.
I moved the NxOgre setup code from my DLL to main app, and accessed it through a Singleton. NOW ITS WORKING!!! I can see the debug renderings.
But that breaks my standard for keeping this functionality in the DLL. Should i further look whether its OgreNx::World or OgreNx::Scene thats requires to be created in Main Exe?
Any one tested this case?