[Bleeding] NxOgre 1.0'21 released.

betajaen

02-04-2008 17:06:34

Download

http://svn.nxogre.org/branches/1.0/

Changes

1.0 '21
~ UserData class renamed to "VoidPointer".
+ CharacterSystem extended, work of porting Ageia's Character Controller code has started.
~ NxOgrePrequisites.h cleaned.
+ NxOgrePrequisitesOgre.h added.
+ Added a second delimiter to the Params class; apart from seperating each Param by a comma
it can now use a newline (\n) instead.
<code>
mass: 10, group: myGroup
</code>
<code>
mass: 10
group: myGroup
</code>
~ Betajaen SharedMap extended
+ Allocator class written
+ NxNew macro now used within NxOgre to track un-deleted pointers in Debug mode.
~ NxDelete macro rewritten to work with the Allocator.
+ New "NxOgre.leaks.html" file now generated in Debug mode.
~ Rewrote the RenderableSource code, interpolation is more centeralised and can be made of
use more easily.
+ "TimeStep" class now used instead of passing on the delta time; Any needed classes upgraded
to use this (SceneController, SceneRenderer, SceneRenderable, Scene, Machine, etc.).
~ Body render code rewritten to new RenderableSource code.
+ DeletionCallback class added.
+ Log file now only outputs HTML.
+ NxVec3/Ogre::Vector3 alternative float3,float4 classes are now more integrated into NxOgre.
+ Resource System rewritten and made simpler to use.
+ FileResourceManager added.
~ FileResourceStream changed into FileResource.
+ MemoryResourceManager added.
~ MemoryResourceStream changed into MemoryResource.
+ Mesh class added
+ ManualMesh class added
+ Can generate Triangle meshes.
+ Can generate Convex meshes.
+ Heightfield class added
+ ManualHeightfield classes added.
+ PhysXDriver massively extended.
~ PhysXDriverParams renamed to PhysXParams
+ Full support for every NxParameter and Debug visualisation preference in PhysXParams.
+ Full support for every NxParameter and Debug visualisation preference in PhysXDriver.
+ SceneControllers cleaned up, now supports the new "TimeStep" classes and adding Delta and Alpha
values if the Scene Controller used supports them.
~ Shape system simplified and rewritten
~ Wordage of "Blueprint" is removed.
~ CubeShape is now Cube
~ SphereShape is now Sphere
~ CapsuleShape is now Capsule
~ GroundShape is now Ground
~ ConvexShape is now Convex which uses the Resource System for Meshes.
- TriangleMesh stays as TriangleMesh which uses the Resource System for Meshes.
~ TerrainShape is now Terrain which uses the Resource System for Heightfields
~ WheelShape is now Wheel
- Wheels can have optional rendering using a NodeRenderable.

+ SleepCallback class added.
+ WheelContactCallback class added but inoperational.
~ World changed to use PhysXParams

Global Changes:
NxOgre can be now compiled as a static library.
-----------------------------------------------

Before embedding; read and understand the LGPL: http://www.gnu.org/copyleft/lgpl.html


But there are a few things to make clear and known;
- Once statically linking to NxOgre, your application is considered a derrived work of NxOgre and is covered by the LGPL licence.
- You must either release the source code, or include linkable object files of your work.

If you do not agree to this, then use NxOgre normal as an external library.

Using the the compiler mode "Debug_Static" or "Release_Static" will generate the NxOgreStatic_D.lib and a NxOgreStatic.lib files for statically linking to.

NxOgre can now be compiled as "small" thus create a smaller DLL to link to
--------------------------------------------------------------------------

By cutting out the Cooking, Log and some other minor features of NxOgre, the DLL
size can be halved. At a cost that any Meshes/Heightfields cannot be generated within
the DLL, or be saved to disk as a added bonus the NxCooking.dll does not need to be
bundled along side your application.

You can futher compress the size of the DLL using UPX compression.

The compiler mode "Small" will generate a Release version of the DLL as "NxOgreS.dll"

<Betajaen: 02-April-2008>


02-April-2008

The source code of Cake Bleeding and the application/installer of Flour will be released tomorrow.



Please report any specific bugs, comments, etc. about Bleeding '21 in here.

reptor

02-04-2008 18:17:37

Is it compatible with PhysX 2.8.0?

betajaen

02-04-2008 18:30:22

Yes!

reptor

02-04-2008 18:58:01

Alright.

I just compiled it against Ogre3D 1.4.7 and PhysX 2.8.0. Didn't yet try it with my application.

I used Visual C++ 2008 Express Edition. I let it upgrade the solution. And then compiled all. It gives some warnings.

If you want to look at it, the full build log is at:

<temporary link expired>

But no errors this far.

betajaen

02-04-2008 19:05:02

That's all normal.

luis

03-04-2008 08:25:26

congratulations for the new version!
does it include the modifications in the interpolation/simulate code ? (jittering bug)

betajaen

03-04-2008 09:37:59

congratulations for the new version!
does it include the modifications in the interpolation/simulate code ? (jittering bug)


Yes, yes it does.

Dutchie

03-04-2008 12:53:40

congratulations on this version :)

how long do you think it will take to implement the character system? I am waiting for using this version till that is in... And i have enough time, so don't hurry with it :P

luis

03-04-2008 14:02:08

i'm in my work now so i couldn't test the new version (and it seems to have lots of interface changes so, i'll take some time to migrate my code).
But from what i saw so far the interpolation code is ok except the fact that you're saving the last position every frame which is why it didn't work in previous versions.

see:

/////////////////////////////////////////////////////////////
void RenderableSource::render_Interpolate(const TimeStep& ts) {
Pose sourcePose = getSourcePose(ts);
mRenderPose = NxInterpolate(mAlphaPose, sourcePose, ts.Alpha);
mRenderable->setPose(mRenderPose);
mAlphaPose = sourcePose; /// \note May be mRenderPose, need to check with Luis.
}


Exactly in the comment 'need to check with Luis' ;) you should save the last value ONLY if there was a physics simulation step... something like this:


see my next post ;)


One last thing, since mAlphaPose is reseted in the ctor it should work ok even when RenderableSource::render_Interpolate is called by the first time (and probably at that time a simulation step will be made anyway).

betajaen

03-04-2008 14:17:14

Okay. Sounds good, I'll add the necessary changes to TimeStep, SceneControllers and RenderableSource.

I found this yesterday and read up on Extrapolation. I am considering adding it into NxOgre as a third way of "polation", it seems quite suited to fast moving Actors such as cars or missiles.

luis

03-04-2008 14:47:40

i made a mistake, the last pose has to be saved before interpolating, in that way you'll use the current position for that frame...


/////////////////////////////////////////////////////////////
void RenderableSource::render_Interpolate(const TimeStep& ts) {
Pose sourcePose = getSourcePose(ts);
if( ts.physicsSimulated )
mAlphaPose = sourcePose;
mRenderPose = NxInterpolate(mAlphaPose, sourcePose, ts.Alpha);
mRenderable->setPose(mRenderPose);
}



I found this yesterday and read up on Extrapolation. I am considering adding it into NxOgre as a third way of "polation", it seems quite suited to fast moving Actors such as cars or missiles.


great, the more ways of "polation" the better...
Perhaps adding more frame latencies and using a spline would do the trick....

Caphalor

03-04-2008 16:22:39

I just changed my application so that is compiles with the new NxOgre, but I get a crash when I try to delete a NxOgre::Body:
mScene->destroyBody(mBody->getName());
The Application crashes here:
BETAJAEN_CC_INLINE void _delete_range(Iterator begin, Iterator end)
{
for (; begin != end; ++begin) {
BETAJAEN_CC_DELETE(*begin); //HERE
}
}


...Which is called here:

mCollisionModel.DestroyAll();


Call Stack:

Betajaen::Flat<NxOgre::Shape*,Betajaen::SharedAllocator>::_delete_range(NxOgre::Shape** begin=0x07c415b0, NxOgre::Shape * * end=0x07c415b4) Line 285 + 0x48 bytes
Betajaen::SharedList<NxOgre::Shape,Betajaen::SharedAllocator>::DestroyAll() Line 607
NxOgre::Actor::_destroyActor() Line 354
NxOgre::Actor::~Actor() Line 249


Edit: I forgot to write down the error message:
"Debug Error!
HEAP CORRUPTION DETECTED: after Normal block (#73039) at 0x07C5EF90.
CRT detected that the application wrote to memory after end of heap buffer."

betajaen

03-04-2008 16:37:01

Interesting. I'm going to re-create the error and come up with a solution.

[Edit]

Okay, this does not crash. I've used SharedList for months and it's been pretty stable.

hover = mScene->createBody("Hover;cube.1m.mesh", new NxOgre::Cube(1), Vector3(0,0.5,0), "mass: 10");

if (mKeyboard->isKeyDown(KC_7) && !dHover) {
mScene->destroyBody(hover->getName());
dHover = true;
}


Are you sure your using the new NxOgre dll's, lib's, includes, etc. with your application?

Caphalor

03-04-2008 17:07:42

Edit: Ok it works now, I forgot to replace a PhysX lib (lib, not dll...), although I don't understand why other things like PhysX initialisation and body creation worked.

[EDIT 2]
I managed to load a static body with a Triangle Shape, but I had to change the following in NxOgre, NxOgreMesh.cpp:

Mesh::Mesh(const ResourceIdentifier& ri) {
mMesh.zero(); //!!!
load(ri);
}

/////////////////////////////////////////////////////////////

Mesh::Mesh(Resource* rs) {
mMesh.zero(); //!!!
load(rs);
}

//...

void Mesh::MeshData::zero() {
mTriangleMesh = 0;
mConvexMesh = 0;
mSkeletonMesh = 0;
mClothMesh = 0;
mSoftBodyMesh = 0;
mType = MT_Unknown;
mNbReferences = 0;
mMaterialAlias = 0; //!!!
}

That was necessary because otherwise this condition alway was true:

void Mesh::load(Resource* resource) {

ResourceSystem::getSingleton()->getCallback()->MeshLoading(this, resource);

if (!mMesh.isZero()) { //!!!
ResourceSystem::getSingleton()->getCallback()->MeshLoadingFailed(this, resource, R_HasMesh);
return;
}

Maybe you should check it.

mr.Zog

06-04-2008 13:46:10

Just for the slow ones again: has the new cake been released?
I've pulled everything from SVN, but get errors like:


1>------ Build started: Project: Cake, Configuration: Debug Win32 ------
1>Compiling...
1>Cake.cpp
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cakeogre.h(216) : error C2039: 'Identifier' : is not a member of 'NxOgre::NodeRenderableParams'
1> d:\_ogre\nxogre_current\branches\1.0\nxogre\include\nxogrenoderenderable.h(36) : see declaration of 'NxOgre::NodeRenderableParams'
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cakeogre.h(217) : error C2039: 'IdentifierType' : is not a member of 'NxOgre::NodeRenderableParams'
1> d:\_ogre\nxogre_current\branches\1.0\nxogre\include\nxogrenoderenderable.h(36) : see declaration of 'NxOgre::NodeRenderableParams'
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cakeogre.h(217) : error C2039: 'IT_CREATE' : is not a member of 'NxOgre::NodeRenderableParams'
1> d:\_ogre\nxogre_current\branches\1.0\nxogre\include\nxogrenoderenderable.h(36) : see declaration of 'NxOgre::NodeRenderableParams'
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cakeogre.h(217) : error C2065: 'IT_CREATE' : undeclared identifier
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cakeogre.h(322) : error C2065: 'NxHashes_OgreNodeRenderable' : undeclared identifier
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cake.cpp(100) : error C2146: syntax error : missing ';' before identifier 'Spikey'
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cake.cpp(162) : error C2039: 'Identifier' : is not a member of 'NxOgre::NodeRenderableParams'
1>
... etc



Do you have an idea what I am missing?

betajaen

06-04-2008 13:56:02

Just for the slow ones again: has the new cake been released?
I've pulled everything from SVN, but get errors like:

Do you have an idea what I am missing?

New Cake hasn't been released yet. I'm aiming for Tuesday for Cake Bleeding and a new release of NxOgre (because of changes to the Raycaster).

zrixter

06-04-2008 15:44:04

Just for the slow ones again: has the new cake been released?
I've pulled everything from SVN, but get errors like:

Do you have an idea what I am missing?


Betajaen changed a few names/params, check NxOgreNodeRenderableParams for the updated names,

example : Identifier should be mIdentifier now.

betajaen

06-04-2008 16:54:35

I'm all for standardisation.

Rope

08-04-2008 12:20:20

What about Character2Character collisions. Is it implemented in bleeding? :S :(

betajaen

08-04-2008 12:24:39

There is no Character system in Bleeding for a Character to Character collision to occur.

FriedChicken

14-04-2008 07:23:44

has Cake Bleeding come out ?

Where can I download it ?

Fred

14-04-2008 20:52:15

Mhm in a former version of NxOgre I used:

m_pBody->getNode()


But I don't find this function in the new version. Is there an alternative?

Caphalor

14-04-2008 21:43:27

((NxOgre::OgreNodeRenderable*)(mBody->getRenderable()))->getNode()

betajaen

14-04-2008 22:01:13

That is the naughty way of doing it, but that'll work. Unless you use your own renderable system.

Caphalor

15-04-2008 13:53:34

What is the way you envisioned?

betajaen

15-04-2008 18:09:58

Well like "Body" is an example on how use visualization in NxOgre. So is the provided Ogre render system. I would imagine people would want to attach more visualisation information to the NodeRenderable; shader parameters, material fallback, any skeleton animation, etc. You may want different sub-types of NodeRenderables for different functions of Actors.

Which is why the Ogre RenderSystem provided in NxOgre is an example and can be completely ignored and an alternate implemented by the user.

gugus

26-04-2008 13:53:26

when i do this
mWorld = new NxOgre::World("time-controller: ogre , log : yes");
mWorld->createDebugRenderer(mSceneMgr);//comment
mScene = mWorld->createScene("Test","renderer: ogre, controller: accumulator, gravity: yes, floor: no");

NxOgre::Resources::ResourceSystem::getSingleton()->addMesh("file://wrong file name.nxs");

with a wrong file name,NxOgre.html is created but is empty.
Shouldn't the log tell me that the file doesn't exist?(well,i probably ill configured the log)

betajaen

26-04-2008 18:23:18

Yes. It should. I'll add a fix.

nexus

04-05-2008 13:17:08

hello all,
sorry for the question, but i'm having some problems in passing from nxogre0.9 with physx2.7.3 to the new configuration. Are the steps to follow the same or are there changes?
Thank you

RedEyeCoder

09-05-2008 00:14:26

Edit: Ok it works now, I forgot to replace a PhysX lib (lib, not dll...), although I don't understand why other things like PhysX initialisation and body creation worked.

[EDIT 2]
I managed to load a static body with a Triangle Shape, but I had to change the following in NxOgre, NxOgreMesh.cpp:

Mesh::Mesh(const ResourceIdentifier& ri) {
mMesh.zero(); //!!!
load(ri);
}

/////////////////////////////////////////////////////////////

Mesh::Mesh(Resource* rs) {
mMesh.zero(); //!!!
load(rs);
}

//...

void Mesh::MeshData::zero() {
mTriangleMesh = 0;
mConvexMesh = 0;
mSkeletonMesh = 0;
mClothMesh = 0;
mSoftBodyMesh = 0;
mType = MT_Unknown;
mNbReferences = 0;
mMaterialAlias = 0; //!!!
}

That was necessary because otherwise this condition alway was true:

void Mesh::load(Resource* resource) {

ResourceSystem::getSingleton()->getCallback()->MeshLoading(this, resource);

if (!mMesh.isZero()) { //!!!
ResourceSystem::getSingleton()->getCallback()->MeshLoadingFailed(this, resource, R_HasMesh);
return;
}

Maybe you should check it.


I am using NxOgre 1.0 (rev21) and PhysX 2.8.1 and I am unable to create a TriangleMesh/TriangleMeshShape - Has the previously mentioned issue been resolved?

gugus

09-05-2008 09:47:55

I had the same probleme,and I "solved" it not in a very beatiful way,i just commented the line:
if (!mMesh.isZero()) { //!!!
ResourceSystem::getSingleton()->getCallback()->MeshLoadingFailed(this, resource, R_HasMesh);
return;
}


And i have added the Caphalor's fix.
As I said,not very beatiful,but if you don't load twice the same mesh in the ressource manager,it should be OK.

irado

10-05-2008 01:03:10

I am wating fix for the error:


c:\ogresdk\nxogre\cake\source\CakeOgre.h(322) : error C2065: 'NxHashes_OgreNodeRenderable' : undeclared identifier
1>.\Cake.cpp(100) : error C2146: syntax error : missing ';' before identifier 'Spikey'
1>.\Cake.cpp(162) : error C2039: 'Identifier' : is not a member of 'NxOgre::NodeRenderableParams'
1> c:\ogresdk\nxogre\include\NxOgreNodeRenderable.h(36) : see declaration of 'NxOgre::NodeRenderableParams'
1>.\Cake.cpp(163) : error C2039: 'IdentifierType' : is not a member of 'NxOgre::NodeRenderableParams'


thanks

RedEyeCoder

10-05-2008 07:59:45

Yeah I had the same problems with Cake so I have just left it for now, seems like a nice example none the less.

RedEyeCoder

10-05-2008 08:21:31

Edit: Ok it works now, I forgot to replace a PhysX lib (lib, not dll...), although I don't understand why other things like PhysX initialisation and body creation worked.

[EDIT 2]
I managed to load a static body with a Triangle Shape, but I had to change the following in NxOgre, NxOgreMesh.cpp:

Mesh::Mesh(const ResourceIdentifier& ri) {
mMesh.zero(); //!!!
load(ri);
}

/////////////////////////////////////////////////////////////

Mesh::Mesh(Resource* rs) {
mMesh.zero(); //!!!
load(rs);
}

//...

void Mesh::MeshData::zero() {
mTriangleMesh = 0;
mConvexMesh = 0;
mSkeletonMesh = 0;
mClothMesh = 0;
mSoftBodyMesh = 0;
mType = MT_Unknown;
mNbReferences = 0;
mMaterialAlias = 0; //!!!
}

That was necessary because otherwise this condition alway was true:

void Mesh::load(Resource* resource) {

ResourceSystem::getSingleton()->getCallback()->MeshLoading(this, resource);

if (!mMesh.isZero()) { //!!!
ResourceSystem::getSingleton()->getCallback()->MeshLoadingFailed(this, resource, R_HasMesh);
return;
}

Maybe you should check it.


I am using NxOgre 1.0 (rev21) and PhysX 2.8.1 and I am unable to create a TriangleMesh/TriangleMeshShape - Has the previously mentioned issue been resolved?


I made the changes by Caphalor and yet I still get a crash during the creation of NxOgre::TriangleMesh.

Perhaps I am creating the TriangleMesh wrong?

NxOgre::Body * terrainBody = mScene->createBody( "terrain.mesh", new NxOgre::TriangleMesh("terrain.mesh"), Ogre::Vector3::ZERO, "static: yes" );

The crash I get is in the file nxgoreshapemeshes.cpp on line 195;
mShapeDescription.meshData = mMesh->mMesh.mTriangleMesh;

mMesh has a value of 0xcdcdcdcd (uninitialised?) and crashes because of that.

Is there a known working combination of nxogre and physx which I can just roll back to? I have spent the very few spare hours I have during this week on issues like this.

betajaen

10-05-2008 09:08:43

This "terrain.mesh", is an Ogre Mesh? Or a PhysX NXS Mesh Or a NxOgre Heightfield?

RedEyeCoder

10-05-2008 09:38:04

Its an Ogre mesh.

I have made some progress by converting the ogre mesh to an nxs.

I had to add these changes to get it working;

void Convex::createShape(NxArray<NxShapeDesc*>& shapes, NxShapeIndex index, Scene* scene) {

extendedParamsToDescription(scene, mParams, &mShapeDescription);
mVoidPointer = new VoidPointer(this, NxOgreClass_Shape);
mShapeDescription.userData = mVoidPointer;

mMesh = 0; // ADDED
if (mMesh == 0) {

Resources::ResourceSystem* rs = Resources::ResourceSystem::getSingleton();
NxString mesh_identifier = rs->removeResourcePrefix(mResourceIdentifier);
mMesh = rs->getMesh(mesh_identifier);

if (mMesh == 0) {
mMesh = new Resources::Mesh(rs->get(mResourceIdentifier));
rs->addMesh(mesh_identifier, mMesh);
}

}

mShapeDescription.meshData = mMesh->mMesh.mConvexMesh;

if (!isValid(mShapeDescription) || !isConvexShapeValid())
return;

shapes.push_back(&mShapeDescription);
mShapeIndex = index;

}

void TriangleMesh::createShape(NxArray<NxShapeDesc*>& shapes, NxShapeIndex index, Scene* scene) {

extendedParamsToDescription(scene, mParams, &mShapeDescription);
mVoidPointer = new VoidPointer(this, NxOgreClass_Shape);
mShapeDescription.userData = mVoidPointer;

std::cout << "TriangleMesh::createShape(" << mMesh << ")" << std::endl;

mMesh = 0; // ADDED
if (mMesh == 0) {

Resources::ResourceSystem* rs = Resources::ResourceSystem::getSingleton();
std::cout << "rs => " << rs << std::endl;

NxString mesh_identifier = rs->removeResourcePrefix(mResourceIdentifier);
std::cout << "mesh identifier => " << mesh_identifier << std::endl;

mMesh = rs->getMesh(mesh_identifier);

std::cout << "mMesh => " << mMesh << std::endl;

if (mMesh == 0) {
mMesh = new Resources::Mesh(rs->get(mResourceIdentifier));

std::cout << "mMesh => " << mMesh << std::endl;

rs->addMesh(mesh_identifier, mMesh);
std::cout << "Mesh!! ......." << std::endl;

}

}

mShapeDescription.meshData = mMesh->mMesh.mTriangleMesh;

if (!isValid(mShapeDescription) || !isTriangleMeshShapeValid()) {
std::cout << "Not VALID!" << std::endl;
return;
}

shapes.push_back(&mShapeDescription);
mShapeIndex = index;





Note the two mMesh = 0; // ADDED . I still get the feeling I am doing something else wrong..

betajaen

10-05-2008 09:51:10

*Cough*

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=7178

mgoodman

22-05-2008 19:08:34

Hello again physics master,

I've decided to try to switch from 0.9 to Bleeding because our game has to work on Linux and 0.9 is a bitch to get to work on Linux from my experience. By reading some posts here and there, it seems Bleeding with Flour-cooked meshes should work on Linux so I'm trying that out.

I have a problem though. We're using the Boost library in our project and it's spitting out the following error:

1>c:\planet2\boost\include\boost\asio\detail\socket_types.hpp(27) : fatal error C1189: #error : WinSock.h has already been included


Here's the exact code in Boost that's giving the error:

#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
# if defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
# error WinSock.h has already been included
# endif // defined(_WINSOCKAPI_) && !defined(_WINSOCK2API_)
(...)


I have very little NxOgre code in my project (creating a world and a scene basically), and if I comment out the NxOgre code and includes, the error goes away.

So here's my question: is it the wrapper that's defining _WINSOCKAPI_ or is it PhysX? And do you have any suggestions to fix the problem?

Thanks!

betajaen

22-05-2008 19:18:12

Neither. NxOgre doesn't include anything but Ogre and PhysX, and quick search through all the PhysX files for the word "winsock" comes up with nothing. My first thought would of been the remote debugger using it, but PhysX is clean.

mgoodman

23-05-2008 19:35:45

Hello again,

The WinSock issue has been fixed (by fiddling around with includes), but bleeding (21) is not compiling at all on Linux. For now, most of the errors are in betajaencc.h and nxOgreAllocator.h. Furthermore, I'm having much more trouble accessing Ogre::Root in Bleeding. If you remember, our project has a GameRoot class that inherits from Ogre::Root and we need NxOgre to connect to it.

If it's impossible to help us compile Bleeding on Linux (which I understand), could you explain the steps required to use 0.9 with pre-cooked meshes? Would this be done with Cake? What are the functions to load .nxs meshes in 0.9?

betajaen

23-05-2008 19:58:28

You don't have to use cooked meshes in 0.9, it will convert them on the fly. It's rather a slow process though and each time you need a mesh, it will convert it, regardless if it has been cooked before.

I believe there has been a thread or two discussing BetajaenCC and the Allocator on the Linux.

mgoodman

23-05-2008 20:27:56

You don't have to use cooked meshes in 0.9, it will convert them on the fly.
Moving my reply to the Linux thread, since it's not related to Bleeding anymore: http://www.ogre3d.org/phpBB2addons/viewtopic.php?p=42614#42614

Gatekeeper

25-05-2008 14:08:47

I see that it is compatible with 2.8.0. The latest version of physx seems to be 2.8.1.

Are there any known issues integrating NxOgre with 2.8.1?

betajaen

25-05-2008 14:43:27

Shouldn't be. I use 2.8.1 with '22, which is based on '21 (obviously).

aoos

16-06-2008 19:36:58

hi, i got a crash when i add this:

Body *mBody = mScene->createBody("ninja.mesh", new NxOgre::Cube(1), Vector3(0,0.5,0), "mass: 10");

it builds fine but when i run my app it crashes!

See my code:


World *mWorld = new World("time-controller: ogre");
Scene* mScene = mWorld->createScene("Main",mSceneMgr, "gravity: yes, floor: yes");

Body *mBody = mScene->createBody("ninja.mesh", new NxOgre::Cube(1), Vector3(0,0.5,0), "mass: 10");


i'm using the ExampleApplication framework Can u help;

Gohla

16-06-2008 20:21:07

You need to give the body a name in the first parameter; change "ninja.mesh" to "Ninja; ninja.mesh"

NxOgre will make the name unique by adding a counter at the end if you're creating an actor/body with a name that already exists.

aoos

16-06-2008 23:08:42

um.. Nope! my app still crashes as before! What's wrong! :cry: :cry:

betajaen

17-06-2008 00:09:58

What do the last few lines of both logs say?

aoos

20-06-2008 12:30:44

The last lines of "Log of NxOgre" say:

- PhysX => 2.8.1 (281)
- Ogre => 1.4.8 (Eihort)
- Hardware => Probably
- Platform => Windows (Debug)

The NxOgre.leaks is empty!

aoos

22-06-2008 00:03:05

well. i debugged my app and see that im getting an unhandled exception : "Unhandled exception at 0x0045c50d (NxOgre.dll) in (application).exe: 0xC0000005: Access violation reading location 0x00000000." in my app.go(); instance!

Maybe this is more helpful information for my problem??

betajaen

22-06-2008 00:19:40

It's a null or uninitialised pointer causing the crash.

I have some suspects but can I see the entire file which you use NxOgre.

aoos

22-06-2008 10:27:16

Here:


#include "ExampleApplication.h"
#include <NxOgre.h>

using namespace NxOgre;
using namespace Ogre;

class App : public ExampleApplication
{
public:

void App::createScene()
{
//Initialise Physics
World *mWorld = new World("time-controller: ogre");
Scene* mScene = mWorld->createScene("Main",mSceneMgr, "gravity: yes, floor: yes");
Body *mBody = mScene->createBody("Ninja;ninja.mesh" , new NxOgre::Cube(1), Vector3(0,0.5,0), "mass: 10");


}



protected:
Shape *mShape;

};


#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#define WIN32_LEAN_AND_MEAN
#include "windows.h"

INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
#else
int main(int argc, char **argv)
#endif
{
// Create application object
App app;

try {
app.go();
} catch( Exception& e ) {
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
MessageBoxA( NULL, e.what(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
#else
fprintf(stderr, "An exception has occurred: %s\n",
e.what());
#endif
}

return 0;
}


Do you see something wrong in my code??

betajaen

22-06-2008 10:47:00

Just try this:

World *mWorld = new World("time-controller: ogre");
Scene* mScene = mWorld->createScene("Main", "gravity: yes, floor: yes, renderer: ogre");
Body *mBody = mScene->createBody("Ninja;ninja.mesh" , new NxOgre::Cube(1), Vector3(0,0.5,0), "mass: 10");

aoos

22-06-2008 12:54:40

it worked !thanks!

urosidoki

01-08-2008 11:50:15

Hi BetaJaen.

In the latest version of the NxOgre(0.9) was so easy to create a Heighmap, like I could see in the luis example:

NxOgre::ActorParams ap;
ap.setToDefault();
ap.mMass = 0.0; // <--- make it static
ap.mDensity = 0.0;
NxOgre::ShapeParams sp;
sp.setToDefault();
sp.mMaterialAsIndex = 0;
sp.mMeshScale = NxVec3( Scale, 1.0, Scale );
mTerrainCollision = mNxScene->createActor( Globals::TERRAIN_ACTOR_NAME, new NxOgre::TerrainShape(
heightMapFile,
Globals::TERRAIN_MAXHEIGHT, sp ),
Vector3::ZERO,
ap );






But I cann't create a heigmap in your new version a heigmap.

I have .png file with a heighmap, could you give me some information?

Will you make some help file or somethig?

Regards!

mcaden

01-08-2008 19:57:32

Unless I'm mistaken you must use flour to turn a RAW image into a .xhf file

Caphalor

03-08-2008 17:17:26

I don't want to bother you, but when can we expect the next version of NxOgre? Are you working on it? I'm thinking of completing your character system on my own (and maybe you can use some parts of my code?), unless you are working on it right now.

betajaen

03-08-2008 17:29:50

I work on NxOgre around 8-12 hours everyday. I'm always working on it.

xadh00m

04-08-2008 12:52:14

I work on NxOgre around 8-12 hours everyday. I'm always working on it.

Thank you Betajaen!

reptor

04-08-2008 14:20:29

I work on NxOgre around 8-12 hours everyday. I'm always working on it.

:shock:

...but there is 24 hours per day!

You can't have something better to do :x




Just kidding, betajaen! :lol:

Thank You for all the work you have done. It is very much appreciated.

betajaen

04-08-2008 14:36:00

I work on other things. But I always have the NxOgre.sln and Cake.sln always open.

njguy

04-08-2008 23:14:34

is physx 2.8.1 compatible with nxogre???

betajaen

04-08-2008 23:19:34

Yes.

Caphalor

07-08-2008 18:49:21

I work on NxOgre around 8-12 hours everyday. I'm always working on it.
Don't exaggerate it! :shock:
I will wait with the character / Physics stuff, thank you for the information and the time you spend on developing NxOgre. :)

betajaen

07-08-2008 19:11:10

Alright. Not quite 8-12 hours, recently as I have my secret Ogre project that I'm developing and a Ruby on Rails implementation to replace a certain website we know about love.

But I do work on NxOgre everyday. About an hour ago in fact I was testing the ActorParams system and found a bug.

Blitzprog

17-08-2008 15:40:49

I don't know if someone already did this but i uploaded the doxygen documentation (current SVN version) in case someone needs it:

http://blitzprog.de/doc/nxogre/

btw, thanks for this great add-on, i use nxogre in my current project and it's very easy to use :)
Though I had to write my own heightmap shape generator because "TerrainShape" doesn't exist in 1.0 anymore...

betajaen

17-08-2008 15:44:26

Thanks. I should really put a copy on NxOgre.org one day.

jomunoz

19-08-2008 00:52:28

Hi, i see body->getEntity(); is not working, ¿any replacement for that?

nargil

19-08-2008 10:27:32

how about:
mSceneMgr->getEntity(body->getName());

But i think it's much slower, than the old style

betajaen

19-08-2008 10:54:05

Sometimes the entity name will be different from the Actor's name. You should use the OgreNodeRenderable directly as it's more friendly to NxOgre (and Ogre), and provides a ton SceneNode and Entity functions to use.

((NxOgre::OgreNodeRenderable*)(mBody->getRenderable()))->function_name()

jomunoz

19-08-2008 14:51:23

Sometimes the entity name will be different from the Actor's name. You should use the OgreNodeRenderable directly as it's more friendly to NxOgre (and Ogre), and provides a ton SceneNode and Entity functions to use.

((NxOgre::OgreNodeRenderable*)(mBody->getRenderable()))->function_name()


I tried that and the closest i got was
((NxOgre::OgreNodeRenderable*)(mBody->getRenderable()))->getNode()->getAttachedObject()

But didn't know what parameter to pass into the method. :(

betajaen

19-08-2008 15:05:34

As there is probably only one entity attached to that SceneNode; then "0" is the argument to pass on.

((NxOgre::OgreNodeRenderable*)(mBody->getRenderable()))->getNode()->getAttachedObject(0)

Jallen

02-09-2008 15:39:53

Just for the slow ones again: has the new cake been released?
I've pulled everything from SVN, but get errors like:


1>------ Build started: Project: Cake, Configuration: Debug Win32 ------
1>Compiling...
1>Cake.cpp
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cakeogre.h(216) : error C2039: 'Identifier' : is not a member of 'NxOgre::NodeRenderableParams'
1> d:\_ogre\nxogre_current\branches\1.0\nxogre\include\nxogrenoderenderable.h(36) : see declaration of 'NxOgre::NodeRenderableParams'
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cakeogre.h(217) : error C2039: 'IdentifierType' : is not a member of 'NxOgre::NodeRenderableParams'
1> d:\_ogre\nxogre_current\branches\1.0\nxogre\include\nxogrenoderenderable.h(36) : see declaration of 'NxOgre::NodeRenderableParams'
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cakeogre.h(217) : error C2039: 'IT_CREATE' : is not a member of 'NxOgre::NodeRenderableParams'
1> d:\_ogre\nxogre_current\branches\1.0\nxogre\include\nxogrenoderenderable.h(36) : see declaration of 'NxOgre::NodeRenderableParams'
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cakeogre.h(217) : error C2065: 'IT_CREATE' : undeclared identifier
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cakeogre.h(322) : error C2065: 'NxHashes_OgreNodeRenderable' : undeclared identifier
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cake.cpp(100) : error C2146: syntax error : missing ';' before identifier 'Spikey'
1>d:\_ogre\nxogre_current\branches\1.0\nxogre\cake\source\cake.cpp(162) : error C2039: 'Identifier' : is not a member of 'NxOgre::NodeRenderableParams'
1>
... etc



Do you have an idea what I am missing?

I get that exact same error.

Also, what are the risks of me using 1.0?
I want to use the newest PhysX SDK, because that's what I have. How buggy can I expect it to be? (since you said to use 0.9 in the FAQ)

mcaden

02-09-2008 16:38:14

From what I understand the big downside to 1.0 is that the character system isn't completed. Otherwise there's improvements to the structure and performance.

There are a few bugs that affect pretty much everybody, but as I understand it there's set to be a new release within the next few days with those bugs fixed and maybe some new features.

I'm no expert as I've only been using NxOgre/PhysX for about a month, but as I understand it, PhysX 2.8.1 and NxOgre 1.0 is the better choice.

Karan

16-10-2008 22:34:00

Hi,

I just started using NxOgre and I've got a problem that only occurs in release mode and only when I start the program outside Visual Studio.
There seems to be a null pointer exception (Access violation reading location 0x00000000) in the second line of ResourceSystem::addResourceManager(), which is called (indirectly) from the constructor of NxOgre::World:

void ResourceSystem::addResourceManager(ResourceManager* rm) {
mResourceManagers.Insert(rm->getType(), rm);
-> mCallback->ResourceManagerAdded(rm);
}

That's what the debugger tells me at least, I don't see how there could be a null pointer as mCallback should be initialized int the ResourceSystem-constructor.

What could be the problem? And why does it happen only outside VS when the working directory in VS is set to the directory where the executable lies?

betajaen

16-10-2008 22:35:17

There seems to be a null pointer exception (Access violation reading location 0x00000000)

It's a known problem with this release.

You should use NxOgre 1.0.22T5, I know it says unstable, but really it's not.

Karan

17-10-2008 17:44:27

Hmm...are you serious or do you just want to laugh at me? ;)

Thanks anyway :)

mcaden

17-10-2008 19:41:56

I think most of the bugs are out so the "I will laugh at you" part has expired.

He's posted that he plans on moving it to [stable] within the next week or so.