[Bleeding]NxOgre 1.0'19; New Terrain overhaul and '20 news.
betajaen
05-12-2007 13:56:39
This is the thread dedicated to the releases of NxOgre 1.0'17 "Bleeding Edge".
Bleeding Edge should never be used with new users of NxOgre or who have an invested amount of code in their application due to the massive changes of the interface. Please see this
thread for more information and download information for the stable version 0.9.
Version information
This is considered as the 3.5-Generation NxOgre, with the version prefix 1.0. I stress this isn't NxOgre 1.0, it's the versions just before that. In between 0.9 and 1.0 if you will. When NxOgre 1.0 comes out you will be told and it will come in a zip or an installer, with Cake, and some documentation.
Download information
The subversion URL is at
http://svn.nxogre.org/branches/1.0/, which can be downloaded with TortoiseSVN or SVN command line utility.
NxOgre Forum support
I will be happy to answer any new threads for bleeding edge, under one condition. The subject of the post MUST be prefixed with "[Bleeding]" there are no exceptions, if you do not follow this rule. I will lock the post for one day.
betajaen
05-12-2007 14:16:24
Brief Changes and new Structure to NxOgre
As discussed and told in the
Render Systems thread, NxOgre is opening it's horizons a little and can now work with different rendering engines or games engines, providing the developer (you) can write the interface for it. The following is a short summary of the changes from NxOgre 0.9 to Bleeding Edge.
Actors
- Actors do not have Actor::simulate or Actor::render methods.
- Actors do not have dynamic shapes.
- Actors have no references to any of the Render Systems classes, it's completely invisible.
Bodys and Inherited Actors
- Bodys inherit from Actor and RenderableSource
- Body has a __renderSelf method inherited from RenderableSource
- Body has no references to Ogre.
- Body uses a NodeRenderable which is stored in the mRenderable variable (inherited by RenderableSource).
- Body asks for a specific NodeRenderable from the Scene's RenderSystem which is setup and stored in mRenderable.
- __renderSelf tells the current Pose to the Renderable once every time render is called in the RenderSource. The pose may be altered due to the current interpolation method and/or level of detail.
- If you wish your inherited Actor to have a "simulate" function, your Inherited Actor needs to inherited from the Machine class.
- If you wish your inherited Actor to have a "render" function or visualisation, your Inherited Actor needs to inherited from the RenderableSource class, and use one of the Renderable classes to render to. (See Body constructor).
Scene
- The 0.9 Scene constructor is now depreciated and another one exists in it's place.
- The variable mSceneMgr is temporary until all of the classes in NxOgre visualise.
- "time-step-method" Param has changed to "controller" params, with the options of "Fixed", "Variable", "Null" and "Accumulator"
- A new "renderer" param is avaiable with the options of "Null", and "Ogre". Ogre is assumed if no renderer param is specified.
Character
- The new character system is a prototype and does not work.
- To use the old character system toggle the flag "NX_USE_LEGACY_NXCONTROLLER" in NxOgreStable.h
ResourceSystem
- Convex Meshes fully work with the new Resource System and the old code does not exist.
- Triangle Meshes work but untested with the new Resource System, some of the old code does not exist, and some of the Resource System code is incomplete.
Wheels
- Wheels inherited RenderableSource and use a NodeRenderable for visualisation.
Cloth
- Currently causes an invalid description exception with PhysX. May be due to 2.7.3
Fluids
- Untested.
This post should reflect the most current version of Bleeding Edge and mor is to come...
betajaen
05-12-2007 14:19:30
Some code snippets.
Using the new Scene Constructor
OLD:
mScene = mWorld->createScene("Main", mSceneMgr, "gravity: yes, floor: yes, controller: accumulator, renderer: ogre");
NEW:
mScene = mWorld->createScene("Main", "gravity: yes, floor: yes, controller: accumulator, renderer: ogre, rendererUserData: #first");
"#first" refers to the first Scene Manager created, you can use the name of the Scene Manager if you wish. Remember since you are dealing with different types of Rendering engines now, check what "rendererUserData" exactly is before you use it!
Using the RenderableSource and NodeRenderableParams with Ogre
The old system still works:
mSceneMgr->createBody("cube;cube.1m.mesh", new CubeShape(1), Vector3(0,0.5f,0), "mass: 10");
How about some scale:
mScene->createBody("Dog", new CubeShape(1), Vector3(0, 0.5f, 0), "model: photon.mesh, scale: 2 2 4", "mass: 2150");
Oh how about we use an existing entity:
Ogre::Entity* entity = mSceneMgr->createEntity("Hello", "telephone.mesh");
mScene->createBody("Telephone", new CubeShape(0.3,0.3,0.3), Vector3(0, 0.5f, 0), "model: Hello, model-type: reference", "mass: 2150");
Or even a SceneNode:
Ogre::SceneNode* node = mSceneMgr->getRootSceneNode()->createChildSceneNode("Franky");
mSceneMgr->createBody("Franky!", new SphereShape(0.2f), Vector3::ZERO, "identifier: Franky, identifier-type: reference", "mass: 3");
More to come...
twilight17
05-12-2007 14:58:05
gugus
05-12-2007 15:48:37
Very good as usual!
Thanks betajean!
betajaen
05-12-2007 18:07:33
1.0'18
> Scene Controller
+ added getAlphaValue to SceneController
> Scene
+ added getLastAlphaValue
> Added proper code for interpolation (I_Linear) in Body and Wheel
<Betajaen: 05-Decemeber-2007>
i tried to compile '18 but vc++ threw an error:
nxogreogrenoderenderable.cpp(318) : error C2664: 'Ogre::SceneManager::destroySceneNode' : cannot convert parameter 1 from 'Ogre::SceneNode *' to 'const Ogre::String &'
Reason: cannot convert from 'Ogre::SceneNode *' to 'const Ogre::String'
No constructor could take the source type, or constructor overload resolution was ambiguous
i changed line 318 of NxOgreOgreNodeRenderable.cpp to fix it:
- mSceneMgr->destroySceneNode(node);
+ mSceneMgr->destroySceneNode(node->getName());
betajaen
05-12-2007 23:09:50
Using an old version of NxOgre?
no, the latest svn revision '18
betajaen
06-12-2007 08:39:40
Sorry, I mean Ogre. Is it not Eihort (or whatever the latest one is called)?
betajaen
06-12-2007 10:26:11
Alright. I'll put a pre-processor condition around that code for Eihort and onwards.
i was trying to run the new version, but unfortunately it crashes when calling:
m_world = new World("log: text");
errrormsg:
Unhandled exception at 0x008060b9 (NxOgre_d.dll) in ogretest.exe: 0xC00000FD: Stack overflow.
the debugger kicks in at line 56 of NxOgreUserAllocator.h:
53: void *malloc(NxU32 size)
54: #include <OgreMemoryMacros.h>
55: {
56: m++;
57: return malloc(size);
58: }
the NxOgre.log is empty apart from one line
NxOgre 0.9-39.Debug
i have no idea why it still says 0.9-39. did you just forget the change the version info? i've excanged the NxOgre_d.dll with the new one and updated the include and link paths to point at the new version, but maybe i missed something?
betajaen
06-12-2007 12:12:50
I did forget to change the version information.
Can you get any more specific with that error, the new user allocator is as simple as you can get, and hasn't crashed with me yet.
when i follow the world allocation it crashes in nxogrephysicsdriver.cpp, in PhysXDriver::_createSDK() at line 199:
mSDK = NxCreatePhysicsSDK(NX_PHYSICS_SDK_VERSION, mAllocator, mError, desc, &errorCode);
betajaen
06-12-2007 12:44:36
PhysX 2.7.2, 2.7.3?
betajaen
06-12-2007 12:53:07
And you have the most latest SystemSoftware installed? Your application you are using is the 1.0'18 DLL, and the PhysX DLL's are the 2.7.3 ones?
Please double check.
i have. i've even recompiled the '18 dll and renamed the old nxogre folder to make sure i can't accidentally include old files or anything.
i've really no idea what the problem could be.
betajaen
06-12-2007 16:42:15
Luis asked me today, how do you get a OgreNodeRenderable from an inherited Actor (without knowing exactly what it is).
OgreNodeRenderable* getRenderable(Actor* a) {
// Little hack to get the renderable without casting.
NxOgre::RenderableSource* r = a->getUserData()->RenderPtr;
if (r == 0)
return NULL;
if (r->getRenderableTypeHash() != NxHashes_OgreNodeRenderable)
return NULL;
return static_cast<NxOgre::OgreNodeRenderable*>(r->getRenderable());
}
OgreNodeRenderable has plenty of methods (nr->addEntity(), nr->removeMovableObject(), etc.) to manipulate the node, or if you want to do it yourself with nr->getNode().
gugus
06-12-2007 17:14:18
Hello.I am having trouble to compile thundercake:
..\source\ThunderCake.cpp(474) : error C2440: 'initialisation' : impossible de convertir de 'NxOgre::TriangleMeshIntermediary *' en 'NxTriangleMeshDesc'
Aucun constructeur n'a pu prendre le type de source, ou la résolution de la surcharge du constructeur était ambiguë
..\source\ThunderCake.cpp(475) : error C2664: 'NxOgre::ResourceManager::cookTriangleMesh' : impossible de convertir le paramètre 1 de 'NxTriangleMeshDesc' en 'NxOgre::TriangleMeshIntermediary *'
Aucun opérateur de conversion définie par l'utilisateur disponible qui puisse effectuer cette conversion, ou l'opérateur ne peut pas être appelé
..\source\ThunderCake.cpp(477) : error C2039: 'freeTriangleMeshDescription' : n'est pas membre de 'NxOgre::ResourceManager'
c:\ogresdk\nxogre\nxogre\include\NxOgreResourceManager.h(36) : voir la déclaration de 'NxOgre::ResourceManager'
..\source\ThunderCake.cpp(538) : error C2661: 'NxOgre::ResourceManager::cookConvexMesh' : aucune fonction surchargée ne nécessite 3 arguments
Is thundercake up to date?
betajaen
06-12-2007 17:31:57
Thundercake hasn't compiled in months.
gugus
06-12-2007 18:00:28
Ok.
- A new "renderer" param is avaiable with the options of "Null", and "Ogre". Ogre is assumed if no renderer param is specified.
Can this be used in a server application?
betajaen
07-12-2007 18:03:39
Not at the moment, no.
i had some time today to have another look at the new version. unfortunately it still crashes in the userallocator when calling
mSDK = NxCreatePhysicsSDK(NX_PHYSICS_SDK_VERSION, mAllocator, mError, desc, &errorCode);
i've set a breakpoint at void *malloc(NxU32 size) in nxogreuserallocator.h and the function gets called about 4500 times after the call to NxCreatePhysicsSDK() before it crashes:
#include <OgreNoMemoryMacros.h>
void *malloc(NxU32 size)
#include <OgreMemoryMacros.h>
{
m++;
return malloc(size);
}
m has a value of 4519 at the crash. so basically the allocation seems to work.
ideas to what could be happening welcome...
betajaen
10-12-2007 18:34:46
I think it may be due to the Ogre Memory manager, but try change mAllocator to NULL, and see what happens.
I think it may be due to the Ogre Memory manager, but try change mAllocator to NULL, and see what happens.
that works, starts now. so what's wrong with the allocator?
betajaen
10-12-2007 18:59:38
Nothing. I'm sure the Ogre Memory manager is the problem.
Nothing. I'm sure the Ogre Memory manager is the problem.
it did work with Nx 0.9 though.
another thing: how do i get the Ogre::Entity of a body with the new version? you can use the Ogre::SceneManger since the Entity name is not the same as the visualIdentifier passed to Body().
betajaen
10-12-2007 20:00:48
There is a different memory manager used in 0.9, it was provided by Ageia for tracing leaks. Mine is more simpler, it tells if it leaks but not where.
The code all the way up on the previous page will tell you how to get the node, from that you can just use a movable object iterator on mNode or if the node has an offset; mOffsetNode.
Altren
12-12-2007 17:43:01
How are things going on?
When you are plannig to release "stable" version and how log interface will be changing?
I also have several problems with compiling current SVN revision.
First of all I changed
- mSceneMgr->destroySceneNode(node);
+ mSceneMgr->destroySceneNode(node->getName());
Then I have lots of errors likenxogreworldblueprint.h(58) : error C2039: 'cookerThreadMask' : is not a member of 'NxPhysicsSDKDesc'
and some undeclared identifier like NX_TP_ABOVE_NORMAL.
P.S. I`m using Ogre 1.4.5 and PhysX SDK 2.7.3
betajaen
12-12-2007 17:49:01
Oh come on doesn't the words "bleeding edge" somewhat indicate that a stable version of it wouldn't be around for a while?
I'm using Ogre 1.5.0+ (CVS) so those errors are pretty normal for older users.
As for your PhysX errors; You may have 2.7.3 installed but it doesn't mean it was linked/included correctly.
Altren
12-12-2007 18:01:58
Sorry about PhysX errors. It was my fault. I updated only part of paths when installed new SDK.
what seems to be working wrong is when you create a body with an already created scenenode:
http://www.ogre3d.org/phpBB2addons/view ... 12&start=0
Ogre::SceneNode* node = mSceneMgr->getRootSceneNode()->createChildSceneNode("Franky");
mSceneMgr->createBody("Franky!", new SphereShape(0.2f), Vector3::ZERO, "identifier: Franky, identifier-type: reference", "mass: 3");
I tried that way and i got an Ogre error because NxOgre was trying to re-create the same scenenode with the same name.....
But perhaps it was using the createBody in a wrong way.... i'll post my code later.
I here is the code i said before:
mBodyEntity = sm->createEntity( mName + "_bodyEntity", meshFile );
mBodyEntity->setNormaliseNormals(true);
mBodyEntity->setCastShadows(true);
mBodySceneNode = sm->getRootSceneNode()->createChildSceneNode(
mName + "_bodySceneNode" );
mBodySceneNode->attachObject( mBodyEntity );
NxOgre::ActorParams ap;
ap.setToDefault();
ap.mMass = mMass;
ap.mGroupAsName = GBGlobals::PHYSICS_COLLGROUP_CARS;
NxOgre::NodeRenderableParams nrp;
mBody = mScene->createBody(
mName,
new NxOgre::CubeShape( dimentions.x, dimentions.y, dimentions.z,
"material: " + GBGlobals::PHYSICS_FRICTIONLESS_MATERIAL ),
Vector3( 100, 20.0, 120 ),
"identifier: " + mBodySceneNode->getName() + ", identifier-type: reference",
ap );
If i use that code i ogre complains about an already created scenenode with the same name as 'my' mBodySceneNode....
betajaen
13-12-2007 18:33:55
I think it's a bug with the params string thingy.
Try:
"identifier-usage: umathurman"
It'll be in identifier-type: reference in the future though.
It works perfect if i use the class interface:
NxOgre::NodeRenderableParams nrp;
nrp.setToDefault();
nrp.IdentifierType = NxOgre::NodeRenderableParams::IT_USE;
nrp.Identifier = node->getName();
NxOgre::Wheel *W = static_cast<NxOgre::Wheel*>
(mBody->addShape(new NxOgre::WheelShape(radius, sp, wp, nrp )));
danharibo
27-12-2007 19:41:20
-snip-
betajaen
21-01-2008 01:22:23
'20 is coming out soon (I'm aiming for February the 1st), and there are some massive changes.
The shape system rewrite like we've discussed above, is probably the biggest which will affect everyone.
"Betajaen's Container Classes" is being slowly integrated, the STL like vector class "SharedList" is now being used by the Params and SceneRenderer classes. For example this is the single line of code which triggers every renderable (Body, Performer, etc.) to be rendered.
void SceneRenderer::renderSources() {
mSources.Each(&RenderableSource::__renderSelf);
}
Pretty much overkill.
Then there is an entire new sub-system to handle foreign meshes; Ogre and OBJ. Which reads them in and can be converted into convex, triangle meshes, soft bodies, etc. Much better than the old system where most of the code was duplicate and only assumed you wanted to use Ogre meshes.
Oh, I made Cake again. It can switch between different Scenes now; Grid and Space themed. Your actors even migrate between them.
Anyway, just a heads up.
gugus
21-01-2008 19:54:42
Will the probleme with groups be fixed?
betajaen
21-01-2008 20:04:38
Problems?
gugus
21-01-2008 20:17:03
With you answere,I guess it's solved for a while!When Bleeding was first release,I could not manage to get actors group work.Here is the topic:
http://www.ogre3d.org/phpBB2addons/view ... ght=groups
betajaen
29-01-2008 21:59:58
Well another update:
Triggers
I'm currently working right now (this very instance in time) rewriting the Trigger system. Here are the changes and planned ones:
- Triggers do not inherit from the Actor class anymore, but the SimpleActor class; like an Actor, but doesn't have a name, doesn't use the standard shape system, and has a lesser life than normal Actors - forcefields will be SimpleActors too. SimpleActors are stored in the Betajaen's Container Class - SharedList, Hence the no name policy. But the slight speed increase may be worth it.
- An alternative method of using triggers is now possible, or or more shapes in an Actor (the normal kind) can be set up, and a TriggerContactCallback assigned to it. Should be quite handy for bumper to bumper collisions in car games, or a floating anti-gravity chamber.
- The TriggerCallback class system has been changed. It's has less redundant code, has more support functions and even some of it supports some optional callback monitoring. For example if you want to know about if something enters and exists the trigger, but don't care what happens in between. So it won't tell you about it.
Error System
I've replaced the existing error system with a new one. The code is neater and the log class has been split into three. Even the HTML code for the log has had a face lift.
Other bits
Anyway that's it on the trigger front. I've done almost thousands of little tiny things here and there. Lots of comments, and making things neater. BetajaenCC is making a bit of an impact in some of the well used portions of NxOgre. I'm hoping it may even speed it up a very tiny bit.
I would like it released on the 1st. But since Convex/TriangleMesh shape classes are empty, it may take a little longer, unless you guys really need it.
My vote would be to get it out -- release early, release often
This way the improvements you've made can be tested, and you can always add the Shape classes later (assuming that they don't cause significant API changes elsewhere)
Andy
Night Elf
31-01-2008 13:36:20
Hey, it's nice to read about all the improvements NxOgre is getting. Great work, Betajaen!
I'm starting a new project soon (we'll start prototyping in a few days.) What do you recommend? Should I stick to 0.9 or start with Bleeding?
betajaen
31-01-2008 14:14:02
Bleeding is more fun to work with, but less complete and more random than 0.9.
Try 0.9 for a while until Bleeding is a tiny bit mature, there are some interface changes but nothing drastic that a find and replace won't fix.
How are things going on getting a '20' release out
I only ask as I have some spare time over the Lunar New year and would like to get a new Python-Ogre binary out -- with the latest NxOgre support
Thanks
Andy
betajaen
05-02-2008 09:17:14
Pretty slow. See my "Chaps..." post for more information.
betajaen
05-02-2008 17:01:39
If anyone has any serious objections, I'll be SVN'ing my copy of NxOgre tommorow or thursday the latest. There won't be any support for Convex, Triangle or Terrain though. The classes simply don't exist anymore, after 20 they'll slowly appear again once I finish of the "OgreMesh" class.
I would appreciate those people who like bleeding edge software to try it out, there is a ton of new code which may have bugs which I need to squash and plenty of features for everyone to try out.
betajaen
06-02-2008 18:28:07
IT'S ALIVE!!! - NxOgre 1.0'19
Anyone who is using the following shapes for serious things should not use this release with their code; Convex, Triangle, Terrain, Wheel and Prism. However I encourage everyone to try it out and bug test it as much as possible.
1.0 '19
~ Changed every .cpp and .h file with new licence header.
+ Added NxOgreConfig.h
+ Added NxOgrePlatform.h
~ Rearranged NxOgre.h
~ Rearranged NxOgrePrequisites.h
+ Added BetajaenCC.h (See BetajaenCC.html for more information on this)
~ Amended BetajaenCC to use Allocator system.
+ Added float2, float3, float4, uint2, uint3, uint4, int2, int3, int4 types.
+ Rewrote Params class to use Betajaen::SharedList
~ Adjusted all Params classes to use SharedList iterator interface
~ SceneRenderer's moved to SharedList.
~ Rewrote the Pose class.
+ Added a bunch of String functions in NxOgreHelpers.h for the migration away from stl.
+ Added timecontroller class to control PhysXDriver::simulate, PhysXDriver::render
~ (Ogre) Added OgreTimeController class.
~ Removed framelistener inheritance from PhysXDriver.
~ Added timecontroller param to PhysXDriver ("timecontroller: ogre")
~ Rewrote the error system
~ Simplfied the error report class.
~ Shanged the NxThrow macros into NxThrow and NxThrow_AsWarning
- Removed Log class
+ Added HTMLLog class
~ Rewrote the Log html.
+ Added transitionalMesh class
+ added OgreMesh class
~ Rewrote the shapes system
New Shape class
+ Shape now uses NxUserData.
~ CubeShape renamed to Cube
~ SphereShape renamed to Sphere
~ CapsuleShape renamed to Capsule
~ Convexshape renamed to Convex
<< Only works with nxs files at the moment >>
<< other shapes will arrive in later commits. >>
+ New SimpleActor class
~ Modified NxUserData for SimpleActor.
~ Rewrote the trigger system
~ Simplified the trigger callback system
+ Added TriggerContactCallback class.
+ Added TriggerContactPtrCallback class.
~ Shapes can be triggers and use the trigger callback classes.
+ New SleepCallback class
+ Added SleepCallback class
+ Modified Scene to use SleepCallback class. (Scene::setSleepCallback, Scene::getSleepCallback).
+ New EffectsSystem class.
<< Incomplete >>
~ Rewrite of Forcefield system.
<< Incomplete >>
+ Added main Allocator class.
+ New "NxNew, NxDelete and NxWatch" macros for debug mode only.
+ Added "WatchMyPointer" class.
+ Added tracking of NxOgre made pointers.
+ Added dumping code to write non-NxDeleted pointers to a log file (NxOgre.log.html)
~ Modified some of the main classes to use NxNew and NxDelete.
<Betajaen: 06-Feburary-2008>
Some quick things. (You'll see these demo'd in Cake).
_______________________________________________________
Using a time controllers
PhysXDriver doesn't use a frame listener anymore, so you have to implement it yourself. Luckily I made one for you. See NxOgreTimeController.h to implement your own.
mWorld = new World("timecontroller: ogre");
This is what the shape system looks like
mScene->createBody("Spike; cube.1m.mesh", new NxOgre::Cube(1), Vector3(8,8,8), ActorParams("mass: 10"));
Triggers are fun, and be now used as Shapes in normal actors
mScene->createTrigger(new SimpleBox(Vector3(5,5,5), Vector3(7.5, 2.5, 0)), new Spike());
class Spikey : public TriggerContactCallback {
public:
Spikey() {
mDeletionPolicy = GC_Delete;
}
~Spikey() {}
void Stay(Shape*, Actor* actor) {
if (!actor->isDynamic())
return;
actor->addForce(NxMath::rand(-1000,1000),NxMath::rand(-1000,1000),NxMath::rand(-1000,1000));
}
};
SleepCallbacks
class Sleepy : public SleepCallback {
public:
void ActorSleep(Actor* actor) {
printf("Awww. %s has fallen asleep.\n", actor->getName().c_str());
}
void ActorWake(Actor* actor) {
printf("You woke up %s!!\n", actor->getName().c_str());
}
};
mScene->setSleepCallback(new Sleepy(), GC_Delete);
Hopefully, the remaining shapes will be in '20 or '21.
betajaen
06-02-2008 18:41:21
I've also uploaded Cake to the SVN. It's full of my testing code at the moment, but you can get rid of that.
There are some fun things you can try out which will be part of Cake. Press "1" to change the Scene to a space theme, then press "2" to go back to the grid theme. Hopefully in the future the theme system and some other things will really make Cake what it is.
And for my Cake '19 testing code:
Press "3" to jiggle all of the Franky named Actors, and "4" prints out all of the positions of the actors. Press "5" to really jiggle all the Frankies then finally press "6" to jiggle down the Spike Actor (who has a trigger attached to it, which will push away all actors that go near it.
manus
12-02-2008 17:20:32
I can't build NxOgre, I get many error like those:
error C2470: 'CompoundActorBlueprint' : looks like a function definition, but there is no parameter list; skipping apparent body ****\include\nxogrecompoundactorblueprint.h 29 NxOgre
error C2653: 'CompoundActorBlueprint' : is not a class or namespace name ****\source\nxogrecompoundactorblueprint.cpp 27 NxOgre
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int ****\source\nxogrecompoundactorblueprint.cpp 27 NxOgre
....
What I use:
Windows Vista 32bit
Visual Studio 2008 Professionnal
PhysX SDK 2.7.3
PhysX Engine v2.7.4 and others, with no hardware
Ogre 3D Last from SVN (no problem to build it)
DirectX SDK November 2007
I checked many time my path (OGRE_HOME, PHYSX_DIR, C++ include, C++ linker,...)
Thanks for your help.
danharibo
18-02-2008 02:25:01
1>------ Build started: Project: Simufarm, Configuration: Debug Win32 ------
1>Compiling...
1>cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
1>BaseApplication.cpp
1>CameraSystem.cpp
1>Game.cpp
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C2146: syntax error : missing ';' before identifier 'getVertexAttachmentStatus'
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : warning C4183: 'getVertexAttachmentStatus': missing return type; assumed to be a member function returning 'int'
1>c:\users\dan\programming\simufarm\simufarm2\gui.h(4) : fatal error C1083: Cannot open include file: 'boost\function.hpp': No such file or directory
1>GameMap.cpp
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C2146: syntax error : missing ';' before identifier 'getVertexAttachmentStatus'
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : warning C4183: 'getVertexAttachmentStatus': missing return type; assumed to be a member function returning 'int'
1>c:\users\dan\programming\simufarm\simufarm2\gui.h(4) : fatal error C1083: Cannot open include file: 'boost\function.hpp': No such file or directory
1>gui.cpp
1>c:\users\dan\programming\simufarm\simufarm2\gui.h(4) : fatal error C1083: Cannot open include file: 'boost\function.hpp': No such file or directory
1>InputManager.cpp
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C2146: syntax error : missing ';' before identifier 'getVertexAttachmentStatus'
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : warning C4183: 'getVertexAttachmentStatus': missing return type; assumed to be a member function returning 'int'
1>c:\users\dan\programming\simufarm\simufarm2\gui.h(4) : fatal error C1083: Cannot open include file: 'boost\function.hpp': No such file or directory
1>Player.cpp
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C2146: syntax error : missing ';' before identifier 'getVertexAttachmentStatus'
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : warning C4183: 'getVertexAttachmentStatus': missing return type; assumed to be a member function returning 'int'
1>c:\users\dan\programming\simufarm\simufarm2\gui.h(4) : fatal error C1083: Cannot open include file: 'boost\function.hpp': No such file or directory
1>Simufarm2.cpp
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C2146: syntax error : missing ';' before identifier 'getVertexAttachmentStatus'
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : warning C4183: 'getVertexAttachmentStatus': missing return type; assumed to be a member function returning 'int'
1>c:\users\dan\programming\simufarm\simufarm2\gui.h(4) : fatal error C1083: Cannot open include file: 'boost\function.hpp': No such file or directory
1>Trailer.cpp
1>TrailerScript.cpp
1>Vehicle.cpp
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C2146: syntax error : missing ';' before identifier 'getVertexAttachmentStatus'
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : warning C4183: 'getVertexAttachmentStatus': missing return type; assumed to be a member function returning 'int'
1>c:\users\dan\programming\simufarm\simufarm2\gui.h(4) : fatal error C1083: Cannot open include file: 'boost\function.hpp': No such file or directory
1>VehicleManager.cpp
1>VehicleScript.cpp
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C2146: syntax error : missing ';' before identifier 'getVertexAttachmentStatus'
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\dan\programming\libs\nxogre\include\nxogrecloth.h(241) : warning C4183: 'getVertexAttachmentStatus': missing return type; assumed to be a member function returning 'int'
1>Generating Code...
1>Build log was saved at "file://c:\Users\Dan\Programming\Simufarm\Simufarm2\obj\Debug\BuildLog.htm"
1>Simufarm - 28 error(s), 8 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Vc2008
Vista32bit
betajaen
24-02-2008 01:52:43
Delayed Actors
Video (Xvid codec, 7 MB).
The large number on the bottom right indicated how many Actors in the Scene, during the death animation the number remains constant - until the animation is finished and all those actors are destroyed.
This feature came around a few days ago whilst I was working on the new Character System (which is coming along nicely), I was thinking if and how death animations could be handled by NxOgre; Could the destruction of the Character be delayed a little for the animation to be finished?
Turns out it can. I turned my attention to the Actor system and wrote a clever little class, and a bunch of efficient code into Scene, which when needed will delay the destruction of an Actor for you to do some work on it. Such as make it explode, fall over or something else. You can keep pushing back when to delete as long as you like.
The implementation is rather simple:
class FadeOut : public DeletionCallback {
void onActorDelayDeleteBegin(DelayedActor* da) {
// An actor is wanting to be deleted. I shall assign the Actor's SceneNode to that lovely fade material and shader I have in the video.
}
bool onActorDelayDelete(DelayedActor* da) {
// This actor is still in the process of fading out and moving around, so I'll put it off for now. But when it's finished, I'll return a "true" and it'll be deleted.
}
void onActorDelayDeleteEnd(DelayedActor* da) {
// I am the last function to see this Actor before it's sentenced to death, to avoid memory leaks I should clean up anything which I created in DeleteBegin
}
};
Tell the Scene, I want to use my own DeletionCallback:
mScene->setDeletionCallback(new FadeOut());
Then use this function at will:
Actors spoons = mScene->getActorsFromIdentifier(SO_STARTS_WITH, "Spoon");
for (Actor* spoon = spoons.begin();spoon = spoons.next();) {
mScene->destroyActorDelayed(spoon);
}
Not a bad little addition I think, that can be easily encompassed to other parts of NxOgre.
Also, did anyone notice that moving platform in the background. That's a feature of Bleeding that has been around for a while - machines.
betajaen
11-03-2008 22:41:29
Apart from the tons of features I've been implementing, I've just finished adding a new feature to NxOgre.
Small
Small is a third project configuration; which when compile will reduce NxOgre to the smallest DLL it can be.
Of course it makes some cuts:
- Any form of cooking and no references to the NxCooking.dll
- No ManualMesh and ManualMeshUtil.
- No generation of CCD Skeletons (they must be loaded from a Resource)
- HTML Log is removed. (Just really simple dump to a file)
- Leak Log is removed, again it's just a dump with no formatting or HTML.
- No Remote Debugger. Nobody debugs in release mode anyway, and you wouldn't want or need the remote debugger in a production game anyway.
Using UPX compression, the DLL is reduced to 237KB way over half what the release version is. Since the single DLL dependency is PhysXLoader, we are talking a PhysX implementation of around 300k.
Not bad for mini-games or demos like Cake, and the best thing. It's just two click compile process.
betajaen
14-03-2008 23:35:10
So some people have been asking for this feature for a while, and here is the first part of the implementation.
Manual Meshes
Manual Meshes, are quite similar to Ogre's ManualObject. You build up a Mesh using very simple and easy to use functions, build it then use it in NxOgre.
So let's build a Convex mesh as a shape of a pyramid:
NxOgre::Resources::ManualMesh* manual_mesh = new Resources::ManualMesh(Resources::MT_Convex);
NxOgre::Resources::Mesh* mesh;
manual_mesh->begin();
manual_mesh->vertex(0,1,0);
manual_mesh->vertex(1,0,1);
manual_mesh->vertex(-1,0,1);
manual_mesh->vertex(1,0,-1);
manual_mesh->vertex(-1,0,-1);
mesh = manual_mesh->end();
That mesh can be loaded into the ResourceSystem, or if you really have to directly into a Convex shape. As with nearly all PhysX meshes you can share it with other Convex shapes, and if you want to save it to disk for later.
mesh->save("file://pyramid.nxs");
This feature will be part of many features to the extension and rebuilding of the Resource System including manual meshes for Triangle, Convex, Cloth, SoftBody and CCD Skeletons and a class that may please people ManualTerrain.
mScene->createActor("Bobby", new Convex("file://pyramid.nxs"), Vector3(0,5,0), "mass: 15");
mScene->createActor("Bobby's twin", new Convex(mesh), Vector3(0,5,0), "mass: 15");
These functions and classes will be the core of a program that will be replacing the nearly useless program "ThunderCake" with a better program called "Flour".
Flour amongst many features it will do is convert all Ogre meshes for you into the PhysX meshes as well as bundle rendering information and Ogre material to NxOgre material lists, and if I can pull it off - Download NxOgre from the SVN for you.
Stay tuned.
betajaen
15-03-2008 22:00:59
And it's alive!
mesh->save("file://pyramid.nxs");
Resources::ResourceSystem::getSingleton()->addMeshAs("file://pyramid.nxs", "Frank");
mScene->createBody("convex-test;cube.1m.mesh", new Convex("Frank"), Vector3(16,4,6), ActorParams("mass: 10"));
mScene->createBody("convex-test;cube.1m.mesh", new Convex("Frank"), Vector3(16,8,6), ActorParams("mass: 10"));
Next up is Triangle Meshes, I am well on the road of releasing '20 the end of this month.
betajaen
19-03-2008 22:38:55
And Triangle meshes are complete. Anyway.....
Terrain!!
Terrain is always a big request, it's also the most annoying and fiddly parts of NxOgre. It's always been implemented in some sort of way; in 0.9 it's a few functions and a class that reads in images. It's a little hacky, quite restrictive but works.
Well in Bleeding, it's very different. The "terrain mesh" is called a Heightmap and is managed through the resource system. The heightmap is used in a Terrain class (a type of shape) inside an Actor. The heightmap can be shared between terrains many times without the need of cooking or duplicating - just like how the new Mesh system works too.
You can even build heightmaps within the code; without an image - infact NxOgre doesn't use images for heightmaps anymore*.
Let's make one.
// Create a ManualHeightfield, it's like the Ogre's ManualObject.
Resources::ManualHeightfield* manual_hf = new Resources::ManualHeightfield();
// Make the terrain 16 x 16 rows and columns - length isn't defined here,
// a unit may be a centimetre to a kilometre.
unsigned int mx = 16, my = 16;
manual_hf->begin(mx,my);
// I want the terrain quads to switch direction every other row, so I need
// a bool.
bool tesselate_tl2br = false;
for (unsigned int x = 0; x < mx;x++) {
for (unsigned int y = 0;y < my;y++) {
// Calculate the height. Which varies from -32768 to 32768 units.
short height = -32768 + (y * (65536 / my));
// Add my height sample with some tesselation.
manual_hf->sample(height, tesselate_tl2br);
}
// Switch rows.
tesselate_tl2br = !tesselate_tl2br;
}
// Set the height thickness to 1.0 metre
manual_hf->setThickness(-1.0);
// And turn this into an actual Heightfield we can use.
Resources::Heightfield* hf = manual_hf->end();
// Finished with the Manual Heightfield
delete manual_hf;
// Let's use it in an actor.
// Notice; The Terrain shape class.
// - No more horrible conversions for scale. You define the exact size you want the terrain to be. NxOgre works out the scale for you!
// - Terrain has params.
// - It can even center the terrain for you. XZ only, or in all directions!
// - It can even have holes!
mScene->createActor("Trotters", new Terrain(hf, float3(32,5,32), "", "centering: xz-above, hole-material: 65535"), Ogre::Vector3(0, 0, 0), "static: yes");
The terrain system will also have something that PhysX does not provide. Saving and loading them to disk - something very useful.
What's next
Wheel Shapes will be next - which will complete the Shape system overhaul. After that, I'm going to work all night and day with the character system. Regardless if I finish it by the end of the month or not. '20 will be out, and I encourage everyone who uses 0.9 to try and even migrate to bleeding.
It is really awesome.
* A seperate application called Flour will be released with '20/21 which will convert RAW images into heightfields for you amongst cooking Ogre meshes.
dbrock
19-03-2008 22:47:36
It is really awesome.
I'm sold.
betajaen
19-03-2008 22:59:26
It is really awesome.
I'm sold.
I don't think many people appreciate or even know how much work I've put into Bleeding.
I just compared file sizes between the current 0.9 everyone is using and my copy of bleeding. Bare in mind this is just plain text files, nothing like images or movies - plain text. Typed by myself in the last 3-4 months on my own.
Total .h and .cpp file stats:
- 0.9 - 883KB, Bleeding - 1505KB
- 0.9 has 144 .h/cpp files, Bleeding has 254 files!
- The largest file: NxOgreScene.h is 33.8KB, in Bleeding it has grown to 50.5KB.
You guys better enjoy it.
Pottej
19-03-2008 23:08:45
Nice work betajaen! I haven't used NxOgre in a while and so I'm looking forward to trying out all the new stuff you've implemented!
Caphalor
19-03-2008 23:41:10
I will upgrade when shapes and the character system are working, the new features sound great!
dbrock
20-03-2008 00:46:14
Whats the news on being able to visualize actors in Bleeding, or are you carrying over the same debug renderer you've already implemented.
betajaen
20-03-2008 00:49:27
It's been like that for a long time.