Wraithdrit wrote:My next big hurdle is to get Nogredex and the Terrain Scene Manager talking and to make a mesh object for Nogredex for the terrain.
I made this a few weeks ago... However, I didn't really made Nogredex and the Bsp Scene Manager communicate, as I didn't found a way to access the index and vertex data from outside the plugin. I created a new plugin instead, by copying BspSceneManager, with a function returning the entire mesh computed from inside. If you find a easier or more "nice-looking" way (I mean, with no need to make a separate bsp scene manager), tell me.
And if you want to have a look on my (completed) work, tell me too ^^. I imagined some ways to greatly optimise the terrain meshes, and the general physics performances, but I have no time to implement it for now. Maybe you could do that ?
Hai, I have a question about the Novodex scale again. If I would like to make a 3D model in Max, then later I export that to Ogre .Mesh, how big should I make the scale in the Max i order to have the same size with
the Novodex world scale (say eveything is by default have SCALE 1 ). Sometimes happens to me that I made something, and it got displayed very big in OGRE, then I extract the mesh position to make trimesh out of it, but the size of the object in physics world is actually smaller.
I hope this is clear hehehehe
THanks,
Dark
Engineers aren't boring people, but they got excited over boring things and they make it fun. www.freewebs.com/gpkfontys
Gfm has updated Nogredex to compile with the latest version of Ogre but most of the source is still legacy code from Rocketman's implementation (which had a few problems beyond not being updated for Ogre v1.0.1). For instance, AdvancedInputReader.* is no longer required. Also, his mesh import introduces additional memory leaks and doesn't correctly deal with shared vertices.
Features:
No memory leaks.
Uses CEGUI.
Novodex debug rendering through the main frame listener.
Novodex exception checking.
Mesh import, including the option to create a Novodex PMap (more robust collision processing for smooth, highly tessellated meshes).
Multiple world scenes maintained concurrently (I only need two, but this is easily extensible).
--------------------Configuration: simulator - Win32 Release--------------------
Compiling...
Debugger.cpp
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Foundation\include\NxFoundationSDK.h(114) : error C2955: 'allocator' : use of class template requires template argument list
C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Physics\include\NxPhysicsSDK.h(321) : error C2955: 'allocator' : use of class template requires template argument list
C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
SceneCreator.cpp
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Foundation\include\NxFoundationSDK.h(114) : error C2955: 'allocator' : use of class template requires template argument list
C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Physics\include\NxPhysicsSDK.h(321) : error C2955: 'allocator' : use of class template requires template argument list
C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.h(54) : error C2639: compiler generated default constructor required by unnamed class
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2252: 'moveSpeed' : pure specifier can only be specified for functions
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2252: 'rotateSpeed' : pure specifier can only be specified for functions
Simulator.cpp
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Foundation\include\NxFoundationSDK.h(114) : error C2955: 'allocator' : use of class template requires template argument list
C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Physics\include\NxPhysicsSDK.h(321) : error C2955: 'allocator' : use of class template requires template argument list
C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.h(54) : error C2639: compiler generated default constructor required by unnamed class
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.cpp(15) : error C2955: 'pair' : use of class template requires template argument list
C:\STLPORT-4.6.1\STLPORT\stl/_pair.h(57) : see declaration of 'pair'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.cpp(69) : error C2374: 's' : redefinition; multiple initialization
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.cpp(46) : see declaration of 's'
SimulatorApplication.cpp
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Foundation\include\NxFoundationSDK.h(114) : error C2955: 'allocator' : use of class template requires template argument list
C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Physics\include\NxPhysicsSDK.h(321) : error C2955: 'allocator' : use of class template requires template argument list
C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.h(54) : error C2639: compiler generated default constructor required by unnamed class
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2252: 'moveSpeed' : pure specifier can only be specified for functions
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2252: 'rotateSpeed' : pure specifier can only be specified for functions
SimulatorFrameListener.cpp
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Foundation\include\NxFoundationSDK.h(114) : error C2955: 'allocator' : use of class template requires template argument list
C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
E:\Programming SDKs\NovodeX SDK 2.1.2\SDKs\Physics\include\NxPhysicsSDK.h(321) : error C2955: 'allocator' : use of class template requires template argument list
C:\STLPORT-4.6.1\STLPORT\stl/_alloc.h(371) : see declaration of 'allocator'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\Simulator.h(54) : error C2639: compiler generated default constructor required by unnamed class
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : error C2252: 'moveSpeed' : pure specifier can only be specified for functions
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2258: illegal pure syntax, must be '= 0'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(28) : error C2252: 'rotateSpeed' : pure specifier can only be specified for functions
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.cpp(70) : error C2039: 'moveSpeed' : is not a member of '__unnamed'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : see declaration of '__unnamed'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.cpp(72) : error C2039: 'rotateSpeed' : is not a member of '__unnamed'
C:\Main\Tutorial Programming\Novodex Implementations\simulator\SimulatorFrameListener.h(27) : see declaration of '__unnamed'
Error executing cl.exe.
Creating browse info file...
Simulator.exe - 30 error(s), 0 warning(s)
appart from some typical vc 6 errors like multiple redefs, there seems to be a problem with my stlport (4.6.1), but up until now it hasnt shown any problems. Can you help out?
I've compiled successfully with Visual Studio 7.1. I can't really help with the STLPORT related errors. Besides that, it looks like your compiler is having a problem with defining static const data members in the nested struct inside of my SimulatorFrameListener class. To get around this, move the definitions to the constructor of the class. You might also need to define an empty default constructor for the struct to placate your compiler.
As a test I'm trying to pass in my own model and have it create the pMap for collisions. However the collission mesh seems to be totally wack! OR its not liking my .mesh for some reason...
See what it looks like...
This is a render of the car im using in that scene. You can't really see it though...
Because that collision mesh is all totally stuffed in that image above it just makes the hotrod shoot up in the air as soon as it touches the ground plane - funny but not whats is supposed to happen.
I had a similar problem using simulator when loading the ninja mesh from the ogre demos. I didn't try any other mesh files, I was just having a look at simulator at the time. The original nogredex doesn't seem to have this problem. I didn't look into it much further because I'm using convex mesh shapes for my novodex collision detection as pmap doesn't appear to work with heightmaps [the object just falls through.. the only real information on this I could find was in the novodex physics SDK documentation, where there was a table showing compatible collision types].
I tried the Nogredex build before this one and has some mixed results... I did however get that hotrod model into it. However it was buggy in some other areas and I'd thought I'd give Psycho's version a try.. Espacially since it was so nice a clean...
It seems that passing my mesh through to generate the trimesh for the objects is buggy at best. So i think I will have to just use the primitive shapes instead.
My only problem is I wanted to use dotsceneoctree for loading in my levels and I was hoping I could just pass the .mesh file from the dotscene loader into the Trimesh generator and everything would be sweet. (ie my hotrod would collide with the level) - IS THIS POSSIBLE?
I basically have a race track around a city level and I have my hover cars which will race around that track. However the physics is holding me back atm.
Now I'm fairly new to OGRE and novodex so please, If I'm going about this completely the wrong way then let me know?
CapBBeard, I couldn't replicate your problems with loading Ogre's ninja mesh into simulator (I tried it both with & without pmap generation). The only possible difference is that I'm using Ogre's latest mesh file format?
MrBigs, Novodex has some restrictions concerning arbitrary mesh creation like correctly defining the face normals, avoiding t-joints and non-manifold edges, etc. I would like to replicate your setup if only I could get my grimy paws on your hotrod. What modeler did you create it in and how do you export it to Ogre's mesh format?
Hmm, that may be a possibility although I'm not too sure at the moment. It may be something to do with novodex. I'm running on 2.2 so I had to modify the code a little to cook the trimesh instead of just passing to the create trimesh function, although I'm pretty sure I didn't mess with anything else. The original simulator is using a pre 2.2 version, so maybe the problem could lie there?
I've used Maya 5 with Ogre's Maya exporter tool. However, I've replaced OgreXMLConvertor.exe with the latest available.
Nope, I haven't played with DotSceneOctree at all.
I do have a version of simulator that works with Novodex 2.2 (but it's more specific to a project I've been working on), but as far as the rules for mesh creation goes there're no changes. And pmaps are best for highly tesselated smooth meshes.
After updating my OgreXMLConveter and getting the latest Maya 6.5 exporter the Hotrod came into the "Simulator" nicely... There are some pics below.
I noticed the the physics simulation seemed to not work properlly when i had maya open in the background(no surprise there), it was like the slow fps would make it drop simulations or something, because the wood blocks would collide with the hotrod but then gradually fall through.. it was wierd, I don't have a screen shot of it tho.. anyway, here ya go..
Trimesh/pmap with heightmaps doesn't work though right? I'm still trying to get simulator to give me a good mesh, I'll report back when I find anything. I'm now getting it to make a convex hull instead of trimesh, but it's giving the same result [but I'm going after a convex hull, so I'll try to fix it that way]
Cubes/Spheres/capsules can collide with all
Convex shapes with all
Heightfields with cubes/shperes/capsules and convexs
Pmaps with cubes/spheres/capsules , convexs and other pmaps
Other meshes cubes/spheres/capsules and convexs.
It seems pmaps are the best route however they must be closed but they can't collide with other meshes, so they'd be best for boxey/bsp type maps.
I suppose the other route would be to build multiple shape actors from primatives.
Last edited by betajaen on Fri Aug 05, 2005 3:51 pm, edited 1 time in total.
Convex/convex works [wahoo ] and pmap/pmap apparently works [just looking in the doc now, there's a table in the PhysicsSDK.pdf manual if you're wondering where I'm reading this], but I'm not sure. It's somewhat annoying pmap doesn't work with heightmaps though, however convex do, which is the main reason I want to use them. I figure if I make several submeshes then put convex hulls around them, I can hopefully get decent collision. I'm not having much luck at the moment though, but that's just my lack of skill
Although the documentation says that pmap-pmap collision is robust, it really is only for smooth, highly tesselated meshes; the wood pieces in Simulator are not. In fact, for such meshes, I've had great success with composing them as a bunch of convex submeshes (Novodex has great convex-convex collision detection without using pmaps). And in case you were wondering, here's my Simulator function (for Novodex 2.2 & Ogre 1.0.2):