[Mess]NxOgre 1.5.1 and BloodyCake released - For OpenGL ONLY

betajaen

15-11-2008 01:15:11




This is NxOgre 1.5.1 and BloodyCake for OpenGL only. There is no Ogre involved apart from the name. You don't even need Ogre on your computer to run it. Just PhysX.

This release is a completely and totally brand new version of NxOgre; it's very different from the previous NxOgre we are all used to. Apart from being a complete rewrite, it does not use Ogre anymore in the core library. Support for Ogre will come soon in a form of a static library; which you include into your application.

What's in it?

- World class
- Memory Debugger and Memory allocation classes routed through Nedalloc (much faster than malloc)
- Scene class (with partial support for NxSceneDesc as SceneDescription)
- Custom Array classes
- Custom Singleton classes
- Custom String classes
- Custom StringStream classes
- Actors
- SceneGeometry
- Shapes; Boxes, Spheres, Capsules and PlaneGeometries.
- Materials

Download

I have zipped up BloodyMess and BloodyCake both in the same zip file, which can be downloaded from here - NxOgre.1.5.zip (218KB)

Install and Play

Theoretically. If you still have the PhysX environmental variable. You can unzip BloodyMess and BloodyCake into any folder and compile them both. Currently; the dlls and libs for both release and debug both called NxOgre.dll/NxOgre.lib, so be careful with that.

The NxOgre Solution is at.

- BloodyMess/compiler/windows/NxOgre.sln

Make sure you compile every project in there. BloodyCake needs GLUTRenderSystem

The BloodyCake solution is at:

- BloodyCake/BloodyCake.sln

Make sure you have NxOgre.lib and NxOgreGLUT.lib compiled.


Including and Linking to NxOgre and NxOgreGLUT.

For now on all you have to do is link and include to the BloodyMess/sdk/ folder. Both the headers and libs will be copied into there.

Don't bother with the real headers folders; because eventually each platform will have their own specific headers.

You don't need to link or reference to PhysX at all. Don't even need the DLLs anymore. Seriously.

BloodyCake

Once you've compiled them both, go into the release or debug folder in the BloodyCake folder. Just run the application; it should be good to go.

By default will spawn 401 NxActors; 400 Actors and 1 SceneGeometry at once. Obviously you can look at the source code to see how it works.

There are no camera controls or any keys. Just click on the exit button to quit.

If you want benchmarks. I used Fraps on it, and it stayed steady at 30FPS, with no slowdown.

A very quick tutorial

Everything is a little rough at the moment; But it's fun to play with:


World is created via a static function now.

World* mWorld = World::createWorld();

Destroying via:

World::destroyWorld()

If you don't destroy world, or you cause a crash. The MemoryDebugger will dump a log to the console. In the future it will be logged to a file.

Parameters are replaced by descriptions.

WorldDescription wd;
wd.mNoHardware = true


Scenes are almost like the old ones; they can be created via a description or prototype.

mWorld->createScene();

Actors are now split into four categories, linked together via a common class called RigidBody.

- Dynamic (Actor); Moves around
- Geometry (SceneGeometry); Never moves at all.
- Kinematic (KinematicActor); Moves around but doesn't do physics
- Trigger (Trigger); Never moves around, and things can move through it.

Creating an Actor; is almost like before. Names aren't important, so they've been demoted into the RigidBodyDescription (if you have to use them).

Actors:

Can only use Boxes, Capsules, Spheres, Wheels and Convexes.

mScene->createActor(new Box(1), Matrix44(0, 1, 0));


SceneGeometries:

SceneGeometries can only use Meshes and Terrain. It is designed to be a multi-shape Actor. So it is best to dedicate most of the geometry of a room to it.

Shapes shapes;
shapes.insert(new PlaneGeometry(0, real3(0, 1, 0));
mScene->createSceneGeometry(shapes, Matrix44(Matrix44::T_Identity));


"Bodies" are up to what ever the RenderSystem names them, and implements them. The GLUTBody that comes with the GLUTRenderSystem; is a more traditional body. It only does dynamic actors and can only render boxes, spheres or capsules.

You'd want to look at BloodyCake and GLUTRenderSystem to see how to use it, and in the future how to make your own rendersystem.

Screenshots



Okay that's it. Usual rules apply. Do not discuss this outside this thread.

Ensced

16-11-2008 23:19:29

It's very good!!!!! Open Very Fast!!!!

Ensced

24-11-2008 15:03:23

I have test in the BloodyCake, this code


RigidBodyDescription description;
description.mType = NxOgre::Enums::RigidBodyType_Dynamic;


mScene->getMaterial(0)->setStaticFriction(0.5);

mScene->getMaterial(0)->setDynamicFriction(0.5);

Shapes shapes;
shapes.insert(new PlaneGeometry(0, real3(0, 1, 0)));
mScene->createSceneGeometry(shapes, Matrix44(Matrix44::T_Identity));


GLUTBody* mbody1 = mRenderSystem->createBody(new Box(1,4,2), real3(0, 7, 0), GLUT_Box, Size3(1,4,2), Colour(1,1,1), true, description);


I test description.mType with this:

description.mType = NxOgre::Enums::RigidBodyType_Dynamic;
description.mType = NxOgre::Enums::RigidBodyType_Kinematic;
description.mType = NxOgre::Enums::RigidBodyType_Geometry;
description.mType = NxOgre::Enums::RigidBodyType_Trigger;


But whatever I do, the result don't change. Where is my error?
ANd how, to make a static body?

I thank you

betajaen

24-11-2008 15:17:56

"mType" is read-only to the user, and quickly overriden when given to a constructor.

You need to insert the shape of whatever you want to be static in the shapes array that goes into the SceneGeometry.

Remember; Static Bodies don't exist anymore. Just SceneGeometries.

Ensced

24-11-2008 15:37:38

Thank you for your answer. I go test the SceneGeometries.
But I have bad english and I have not understand this sentence

"mType" is read-only to the user, and quickly overriden when given to a constructor.



So, we can't change "mType" default? Or I don't make the good code?

betajaen

24-11-2008 15:40:47

No. Nobody touches mType including you.

Use SceneGeometries for static and Bodies or Actors for Dynamic.

Ensced

27-11-2008 11:45:28

Hi every body, today I have test to render capsule with this code:




GLUTBody* mbody1 = mRenderSystem->createBody(new Capsule(1,0.5), real3(0, 7, 0), GLUT_Capsule, Size3(1,0.5,0), Colour(1,1,1), true, description1);

the capsule exist, but we can't see it.

betajaen

27-11-2008 11:48:56

I didn't write the GLUT code to render a capsule, as I forgot how to do it.

Ensced

27-11-2008 11:57:19

ok :lol: , now I understand why! I suppose that .mesh, .nxs and .cfg's render is the same? Because I haven't found how make code for this too.

I like very much Bloody Mess!!!! I 'm very impatient to see the next updated 8)

betajaen

27-11-2008 12:01:11

Mesh is Ogre. This is OpenGL.
NXS cannot be rendered it's a physics mesh.
CFG's I assume you mean terrain, then again it's OpenGL not Ogre.

I'm planning an Ogre release of BloodyCake with my changes to Bloody Mess in a few days.

Ensced

27-11-2008 12:08:29

Great!!!! You make a very Good job Betajaen. I Thank you, you and you team(if you're not alone :) )