Information overload @_@

Kernle32DLL

13-07-2010 21:35:48

Hay there,

I'm working on a smaller feasibility study concerning ogre and physics right now, and by selection process, I decided to use NxOgre (as all other physics wrappers didn’t match the profile needed). However, I don't get it. There is so much confusing information, scattered everywhere. There are posts about things that don’t work, blogs about upcoming things, posts about experimental stuff, dead links, everything :cry:.

So, some clean questions, and I would be very grateful if you would answer them nice and short:

- Is NxOgre still being maintained? I find mostly posts from 2009
- How much PhysX functionality does NxOgre ACTUALLY provide? (Soft bodies, cloths, and fluids to mention some things)
- I read about some dudes going the hard way and manually combining Ogre with PhysX, are there any advantages of that Vs NxOgre?
- What’s up with all this "Bloody Mess", “Bleeding”, "Git", etc. stuff? The only interesting thing for me is the "Detritus" GIT branch, everything else seems (some by far) outdated
- I have special interest in the character controller, as this is one of the major points in my study. Does it work? Do I have to emulate it? What's with that thing?

Thanks in advance

So long,
Kernle

PS: Why do you have to keep a separate profile to the "normal" Ogre forum? And why am I allowed to use a space in my nickname there, whether I'm not here. Strange :/

betajaen

13-07-2010 22:05:33

1. Yep, I work on it almost every day.
2. Combing the basic parts with Ogre and PhysX is fairly straightforward and easy. Generally, when people get to the triangle meshes, heightfields, cloths, softbodies, it gets quite complicated in storing them efficently, load them from disk and using them with Ogre. NxOgre does all of that really well.
3. Detritus is the latest version. It uses Git as a versioning system. NxOgre doesn't "favour" Ogre, meaning it doesn't actually reference Ogre at all in it's source code. Instead it uses another library called "Critter" which acts an interface between the two. It's very minimal, and optional if you prefer to do things your own way. A lot of people like to use Critter because of it's ease of use.
4. Yep, we have the Character Controller in Detritus. I was working on implementing it in Critter the other day.

These will help you out.

http://github.com/betajaen/nxogre/tree/detritus
http://github.com/betajaen/critter
http://github.com/betajaen/nxogretutorials

Kernle32DLL

13-07-2010 22:12:19

Thank you very much, that cleared up some things :) And thanks again for the very fast answer. I think I'll read into compiling NxOgre and Critter then. Also, it’s really nice to know that there is at least one Physics implementation with Ogre, which is maintained with a lot of personal care. If you look deep enough you'll realise taht there's so much junk out there...

So long,
Kernle

PS: So, the cake is a lie after all huh?

betajaen

13-07-2010 22:28:01

PS: So, the cake is a lie after all huh?

Nope, I just ate it.

jarwulf

14-07-2010 04:10:06

Hay there,

I'm working on a smaller feasibility study concerning ogre and physics right now, and by selection process, I decided to use NxOgre (as all other physics wrappers didn’t match the profile needed). However, I don't get it. There is so much confusing information, scattered everywhere. There are posts about things that don’t work, blogs about upcoming things, posts about experimental stuff, dead links, everything :cry:.

So, some clean questions, and I would be very grateful if you would answer them nice and short:

- Is NxOgre still being maintained? I find mostly posts from 2009
- How much PhysX functionality does NxOgre ACTUALLY provide? (Soft bodies, cloths, and fluids to mention some things)
- I read about some dudes going the hard way and manually combining Ogre with PhysX, are there any advantages of that Vs NxOgre?
- What’s up with all this "Bloody Mess", “Bleeding”, "Git", etc. stuff? The only interesting thing for me is the "Detritus" GIT branch, everything else seems (some by far) outdated
- I have special interest in the character controller, as this is one of the major points in my study. Does it work? Do I have to emulate it? What's with that thing?

Thanks in advance

So long,
Kernle

PS: Why do you have to keep a separate profile to the "normal" Ogre forum? And why am I allowed to use a space in my nickname there, whether I'm not here. Strange :/


Yeah, if you're working with Ogre you'll have to get used to that. IMO documentation is only fair for the main library and difficult to find once you get out into the extensions. Newbies are used to big business class help and are turned off when most of the easy to find google results, website links, and wiki point to information in varying states of obsolescence. Most of the maintainers are busy with the coding itself and have no time for the ancillary stuff so its better to rely on the forum.

Kernle32DLL

14-07-2010 13:55:17

Guess what, compiling NxOgre didn't work. I installed the PhysX SDK, and set the path appropriate to it. Then i tried to compile NxOgre using the VC9 solution file. It may be noted that my stupid Visual Studio 2010 converted the original solution file somehow, so I don't know if the problem is related to that. Anyway, everything compiles fine, but then it stops multiples times with all projects. I use the Detritus git release from yesterday. Errors as followed:

NxOgre: Linker error that "NxCooking.lib" can't be found
GLUTRenderSytem: Fails 3 times with the message that it can't find "NxOgre.h"
OGRE3DRenderSystem: same as GLUTRenderSytem
NxOgreAddonCharacterController: Linker error that "NxOgre.lib" can't be found

Oh, and Critter won't compile, too. The error simply states that the command line options "/ZI" and "/O2" are incompatible.

Is there anything I missed? Ogre is set up correctly (even if it shouldn't matter right now), and the PhysX SDK (2.8.3 btw) is working totally fine.

Hope you can help me.

So long,
Kernle

Fr0stY

14-07-2010 15:21:43

Guess what, compiling NxOgre didn't work. I installed the PhysX SDK, and set the path appropriate to it. Then i tried to compile NxOgre using the VC9 solution file. It may be noted that my stupid Visual Studio 2010 converted the original solution file somehow, so I don't know if the problem is related to that. Anyway, everything compiles fine, but then it stops multiples times with all projects. I use the Detritus git release from yesterday. Errors as followed:

NxOgre: Linker error that "NxCooking.lib" can't be found
GLUTRenderSytem: Fails 3 times with the message that it can't find "NxOgre.h"
OGRE3DRenderSystem: same as GLUTRenderSytem
NxOgreAddonCharacterController: Linker error that "NxOgre.lib" can't be found

Oh, and Critter won't compile, too. The error simply states that the command line options "/ZI" and "/O2" are incompatible.

Is there anything I missed? Ogre is set up correctly (even if it shouldn't matter right now), and the PhysX SDK (2.8.3 btw) is working totally fine.

Hope you can help me.

So long,
Kernle

Hello,
I also had the same problems.

-go to project settings and change the .lib from NxCooking.lib to PhysXCooking.lib ( the latest physx sdk appears to have changed the name ).
-NxOgre.h error, i suggest checking if you have $(NXOGRE_DIR)\sdk folder correctly included in the project and if the folder itself exists.
-NxOgre.lib doesn't compile because you need to have NxOgre correctly compiled in order to ... compile ... the character controller plugin : P


hope this helps: )

Kernle32DLL

14-07-2010 19:09:16

Hi Fr0stY,

Yeah, it did. First, renaming NxCooking.lib to PhysXCooking.lib did the trick. NxOgre compiled with no probs, so did the Character Controller and the GLUT Render System. However, the Ogre3D Render system still fails. First because it didn’t find Ogre.h (had to adjust one of the include declarations from $(OGRE_HOME)\include to $(OGRE_HOME)\include\OGRE, so it works with Ogre 1.7 I guess. Please takt note that nowhere in the actual setup of NxOgre (or the rendersystem for that matter) setting up OHRE_HOME is mentioned. I guess everyone working with Ogre did anyway, but just to be sure...), then I had this error here:

2>------ Build started: Project: OGRE3DRenderSystem, Configuration: Debug Win32 ------
2> OGRE3DRigidBodyPrototype.cpp
2>d:\ogresdk\include\ogre\threading\ogrethreadheadersboost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> OGRE3DRenderable.cpp
2>d:\ogresdk\include\ogre\threading\ogrethreadheadersboost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> OGRE3DRenderSystem.cpp
2>d:\ogresdk\include\ogre\threading\ogrethreadheadersboost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> OGRE3DPointRenderable.cpp
2>d:\ogresdk\include\ogre\threading\ogrethreadheadersboost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> OGRE3DKinematicBody.cpp
2>d:\ogresdk\include\ogre\threading\ogrethreadheadersboost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> OGRE3DBody.cpp
2>d:\ogresdk\include\ogre\threading\ogrethreadheadersboost.h(29): fatal error C1083: Cannot open include file: 'boost/thread/tss.hpp': No such file or directory
2> Generating Code...
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I have not the slightest idea what an “hpp” file is supposed to be. I know a bit boost's purpose, but just... I don't get what's going on there. Also, I wanted to know Critters purpose again. I don’t quite get what I am supposed to do with it, as it's not mentioned in any tutorial I’ve read so far. It just don’t fit in the overall picture yet.

So long,
Kernle

betajaen

14-07-2010 19:17:52

Looks like your using Bloody Mess a really old version. You need to use Detritus.

http://github.com/betajaen/nxogre/tree/detritus


Just think of Bloody Mess as NxOgre 1.5 and Detritus as 1.6

Kernle32DLL

14-07-2010 19:30:34

DON'T ask me how it is possible, but yes, betajaen is right. I used the "Bloody Mess" Git instead of the desired Detritus. Oh well, that clears at least that up. But there is still work to do *sigh*. I tried to compile Critter again (now on a different pc, with a (thanks god) english visual studio). Building as "Final Static" worked (altough it threw some warnings about dll symbols). Building as "DebugStatic" still doesn't work. Now i can provide you with an english log:

1>------ Build started: Project: Critter, Configuration: DebugStatic Win32 ------
1>cl : Command line error D8016: '/ZI' and '/O2' command-line options are incompatible
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


So long,
Kernle

betajaen

14-07-2010 19:40:43

Goto the project settings (MenuBar, Project, Properties)
On the left hand pane
Click C/C++ section
Click Optimization.
Then on the right hand larger pane.
Select the Optimization line and change it to "Disabled (/Od)"

Recompile!

Kernle32DLL

14-07-2010 20:05:03

Still fails.

1>------ Build started: Project: Critter, Configuration: DebugStatic Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1151,5): warning MSB8012: TargetPath(D:\CritterSDK\build\vc9\Critter\DebugStatic\Critter.lib) does not match the Library's OutputFile property value (D:\CritterSDK\build\vc9\Critter\DebugStatic\CritterDebugStatic.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1153,5): warning MSB8012: TargetName(Critter) does not match the Library's OutputFile property value (CritterDebugStatic). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>LINK : fatal error LNK1181: cannot open input file 'NxOgreDebug.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I checked with which way I compiled NxOgre, and it was debug. I recompiled it with debug, as well as with the final mode. The error message stayed the same. So I checked, and i realised that compiling NxOgre in Debug mode does not even create a NxOgreDebug.lib. Your opinion doctor? (Thanks by the way for the continuous suport)

So long,
Kernle

jarwulf

14-07-2010 20:55:02

Still fails.

1>------ Build started: Project: Critter, Configuration: DebugStatic Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1151,5): warning MSB8012: TargetPath(D:\CritterSDK\build\vc9\Critter\DebugStatic\Critter.lib) does not match the Library's OutputFile property value (D:\CritterSDK\build\vc9\Critter\DebugStatic\CritterDebugStatic.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1153,5): warning MSB8012: TargetName(Critter) does not match the Library's OutputFile property value (CritterDebugStatic). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>LINK : fatal error LNK1181: cannot open input file 'NxOgreDebug.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I checked with which way I compiled NxOgre, and it was debug. I recompiled it with debug, as well as with the final mode. The error message stayed the same. So I checked, and i realised that compiling NxOgre in Debug mode does not even create a NxOgreDebug.lib. Your opinion doctor? (Thanks by the way for the continuous suport)

So long,
Kernle


Are you sure you have the proper lib files specified in your linker settings and not including NxOgreDebug.lib since that's what you're trying to build not link to?

Kernle32DLL

14-07-2010 21:19:45

Edit:
Scrap it, it was an incorrect project setting for NxOgre compiling in debug mode. See this picture (the "Debug" was missing in the Target Name). Same thing with Critter, but this time "DebugStatic" in debug, and just "Static" in Release. So, having finally compiled everything, I can finally jump into coding some stuff with Ogre and NxOgre. Or so I hope at least :roll:

Edit2:
After some guesswork in conjunction with the bloody mess tutorial, I was able to initialize the world, scene and rendersystem. Yay!
By the way, there was something that cought my eye as I was trying to get my project working with NxOgre. You actually have to include $(OGRE_HOME)/include/ogre AND $(OGRE_HOME)/include. This is because (don't ask my why) Critter uses it this way. Anyway, so far everything works.

So long,
Kernle

Kernle32DLL

15-07-2010 20:18:50

Well, i got the environment running, but that's it. I can't get any further, since it's in this very part, that Bloody Mess and Detritus (I hate that word :P) differ.

Well, tinkering a bit around, this SHOULD work:

Critter::Body* testBody = mRenderSystem->createBody(new NxOgre::BoxDescription(1.0f,1.0f,1.0f),NxOgre::Matrix44::IDENTITY,"boxmeshnamehere",Critter::BodyDescription());

However, it says that there is no constructor for those parameters, even as I inserted the parameters looking up the first constructor. Open questions about this one are:

- What is the purpose of the Matrix44 thingy there, and what is it's difference to Matrix33 (and whats whith "Identity")
- Does the function only accept .nx files? Or does it also load different formats?
- What is a BodyDescription?
- Is it possible to generate Bodys inside the code? As I have no means to create a proper .nx box mesh right now

So long,
Kernle

betajaen

15-07-2010 20:32:47

Well, i got the environment running, but that's it. I can't get any further, since it's in this very part, that Bloody Mess and Detritus (I hate that word :P) differ.

Well, tinkering a bit around, this SHOULD work:

Critter::Body* testBody = mRenderSystem->createBody(new NxOgre::BoxDescription(1.0f,1.0f,1.0f),NxOgre::Matrix44::IDENTITY,"boxmeshnamehere",Critter::BodyDescription());

However, it says that there is no constructor for those parameters, even as I inserted the parameters looking up the first constructor. Open questions about this one are:

- What is the purpose of the Matrix44 thingy there, and what is it's difference to Matrix33 (and whats whith "Identity")
- Does the function only accept .nx files? Or does it also load different formats?
- What is a BodyDescription?
- Is it possible to generate Bodys inside the code? As I have no means to create a proper .nx box mesh right now

So long,
Kernle



Are you following the tutorials?

The version numbers of NxOgre used the "blood" type naming system. When Detritus came around, I decided to switch and name them characters from the books of Discworld specifcally the City watch. The next NxOgre version is called Angua, then probably Carrot. Ogre does the same thing except each release is named after an entity/god/creature thing from Lovecrafts books. "Detritus" isn't what you think it is -- it's a troll policeman.


1. Don't use "new" on Description (any class with Description in their name) classes. They are short lived and should be on the stack only. You'd have to end up deleting them anyway because NxOgre assumes them not to be pointers.
2. They are just for storing coordinates. Matrix44 and Matrix33 are different. One is a 4*4 matrix (16 floats) and one is a 3*3 (9 floats). The 44 matrix contains positional, orientation and scale information (although not used in PhysX) and the 33 is just for rotation only. You see them in Ogre too, but they are named Matrix4 and Matrix3. For ease of use both NxOgre, Ogre and PhysX use the Vector and Quaternion classes. In the case of the NxOgre matrix class, it will accept Vec3 or Quat classes as a replacement.

So you can just put Vec3(0,0,0) instead.

IDENTITY is another word for default setting. Basically a position in space that is the center of the scene (0,0,0) and not really looking at anything.

3. A BodyDescription or any Description class gives NxOgre the required information to tell it what you want your Body to be like. Such as it's mass, it's group, density, can it move in the XZ direction but not in the Y?

The BodyDescription is automatically configured to the default and most common values so you don't need to worry about it that much. You may want to play with the values once you've gotten ahead in things.

4. Your creating one now there. If you mean ".nxs" files then that's a little different.

However, I strongly recommend you read and have a tinker with my tutorials I posted. Just download the source code, open the Visual Studio project file and compile it. They will automatically copy themselves into your Ogre Samples folder, so you can play with them.

Please reply back if you have any more troubles.

Kernle32DLL

15-07-2010 21:42:29

Well, I was able to compile it now, and I even have a box in the middle of the scene, but that's about it for now (integrating that frame stuff comes next). Building the samples was yes again involved with some guesswork and tinkering (renaming my CritterSDK to critter to comply with the procjets ../critter/sdk, as well as integrating the tutorial media). Anyway, the tutorials are up and running now. So, I think I have enough reference for creating my own testapp now. If all else fails... well, I think I know where to ask ;)

Thanks for the help :)

Edit:
Yep, everythings fine now. I have some falling boxes. I think i have never ever in my life been so happy about some boxes falling over the place :lol:
Some questions (e.g. positioning and scaling the body) I was able to clear myself. The only question left is how to change the bodys material. And I'm not yet speaking about the "physical" material, but more of the "graphical".

Edit2:
Oh, and something else that crossed my mind. NxOgre uses a metre system for it's collision stuff. Thats fine by me, expect one tiny problem: I tought of my game to be build around 64x64x64 grids. And a 64m x 64m plate... Well, thats a bit to much. Looking down on the (tiled) floor on my room, I think a 64x64 plate in 3D-space would be around 30cm x 30cm in real life. So, now for the juicy part: I could in fact just scale all meshes down the factor, but that just seems wrong. I thought rather about multiplying the forces in a admirable way. Currently, i multiply the (earth-)gravity by 25, and that works fine for my 64x64x64 boxes (gave them a weight of 40kg). And toughts on that matter?

So long,
Kernle

PS: Uhm, the cloth tutorials seem to work kinda strange on my PC. I don't know if it's a buggy implementation, or if I'm just comparing it to much to the "original" cloth SDK demo. Strange behavior comprised of cloth beeing stuck in boxes for example.

jarwulf

16-07-2010 01:25:50

Well, i got the environment running, but that's it. I can't get any further, since it's in this very part, that Bloody Mess and Detritus (I hate that word :P) differ.

Well, tinkering a bit around, this SHOULD work:

Critter::Body* testBody = mRenderSystem->createBody(new NxOgre::BoxDescription(1.0f,1.0f,1.0f),NxOgre::Matrix44::IDENTITY,"boxmeshnamehere",Critter::BodyDescription());

However, it says that there is no constructor for those parameters, even as I inserted the parameters looking up the first constructor. Open questions about this one are:

- What is the purpose of the Matrix44 thingy there, and what is it's difference to Matrix33 (and whats whith "Identity")
- Does the function only accept .nx files? Or does it also load different formats?


You mean .nxs? Thats the standard physx format afaik. Nvidia is incredibly not on the ball about supporting their own product so you'll have to do varying amounts of digging to convert the different mesh formats to it.

Blender: I think I've heard of a tool for converting the files directly to nxs
3dsMax: Theres a tool that converts directly to nxs from the developers site
Ogre Mesh: find an old version of flour
Maya : Most straightforward 'solution' is to use a plugin to convert to mesh than use old flour to convert to nxs.


- What is a BodyDescription? Its where you set various properties for the body.


- Is it possible to generate Bodys inside the code? As I have no means to create a proper .nx box mesh right now


I believe at least simple objects like cubes can be. There's example code floating around in one of the tutorials. But you'll need some decent modeling software if you plan on something more than those abstract geometry games.

Kernle32DLL

17-07-2010 22:24:12

Well, the question about graphical materials (In ogre you originally assign them to entities) is still open, as well are some new questions:

- How does the binding between the "holding" upper cube and the cloth in tutorial 1001 work?

- Could you tell me if the following statements are correct?
a) Convex Mesh Descriptions are used to describe the collision surface of a Rigid Body (loaded as nxs files)
b) Triangle Geometry Descriptions are used to describe the collision surface of Scene Geometry (loaded as .nxs files)
c) Scene Geometry is just unmovable, static, invisible geometry (e.g. the level of a game)
d) Rigid Bodies are what "really moves" in the scene, e.g. barrels, crates, cloth, etc.
e) Kinematic Meshes are physical objects that influence other objects, but not themselves (e.g. an simple elevator)

After digging deep into the turoaisl, i made this graphics here. Any suggestions about it?

(Click to enlarge)

Sorry for asking so many questions (again), but my current learning curve for NxOgre is quite long. There is so much stuff that is different from any system I worked before. So, yeah, it takes some time.

So long,
Kernle

Edit:
I edited out some questions I was able to resolve myself, reading into the tutorials in more detail, but edited some new in.

Edit2:
Yet another edit