FriedChicken
30-04-2008 07:53:46
Now I want to add convex shape to my game.
Resources::ResourceSystem::getSingleton()->addMeshAs("file://cube.1m.nxs","cube");
playerBody = mScene->createBody("player", new Convex("cube"), Vector3(100,100,100), "model: cube.1m.mesh", "mass: 300");
But I get a error in nxogreshapemeshes.cpp at line:
mShapeDescription.meshData = mMesh->mMesh.mConvexMesh;
And when I write like this
Resources::ResourceSystem::getSingleton()->addMesh("file://cube.1m.nxs");
playerBody = mScene->createBody("player", new Convex(NxOgre::Resources::ResourceSystem::getSingleton()->getMesh("cube.1m.nxs")), Vector3(100,100,100), "model: cube.1m.mesh", "mass: 300");
I get a error in nxogreuserallocator.cpp at
void *malloc(NxU32 size)
{
m++;
return ::malloc(size);
}
I'm using Bleeding with OGRE 1.4.7 and PhysX 2.8.0 Software System.
I'm eager to know a solution.
betajaen
30-04-2008 08:20:21
I assume "cube.1m.nxs" exists and was a file created by flour?
FriedChicken
30-04-2008 09:11:18
yeah, "cube.1m.nxs" existed in my directory and was definitely created by Flour.
betajaen
30-04-2008 09:34:31
Strange bug. The only reason why malloc could fail is either size is 0, or size is an weird number. cube.1m.nxs does have a filesize right?
FriedChicken
30-04-2008 09:49:17
the size is 224783383, and cube.1m.nxs have a filesize of 10k
betajaen
30-04-2008 10:24:59
Alright. I'll try your code in Cake later and see if anything strange happens.
cube.1m.mesh is my mesh right?
I get the same error. Also if I try to create a triangleMesh. What could be wrong there? Perhaps you can send me a "nxs"-file you know for sure that it works.
Is there any version of Cake for Bleeding?
BTW: Why didn't you write, that we have to write "time-controller" from now and not "timecontroller" anymore.
betajaen
03-05-2008 16:34:31
BTW: Why didn't you write, that we have to write "time-controller" from now and not "timecontroller" anymore.
Continuity
For sample meshes, that work:
http://get.nxogre.org/flour/
Mhm it doesn't work. I'll tell you what I've done:
At first I converted the meshtest with your "Flour".
I have written this line in my cmd:
flour meshes type: triangle, in:meshtest.mesh, out: "test.nxs"
In my application I've written the line:
m_pBody = m_Level.getGameEnv().m_pScene->createBody("test; meshtest.mesh", new NxOgre::TriangleMesh("test.nxs"), Ogre::Vector3(0,0,0), "mass: 100; desity: 1.0" );
Is there anything wrong?
Thanks for help.
Fred
betajaen
03-05-2008 21:07:38
Did you to load it into the ResourceSystem first?
Something along the lines of:
NxOgre::Resources::ResourceSystem::getSingleton()->addMesh("file://test.nxs");
Mhm no I didn't. but also doing so doesn't help.
The same error on:
mShapeDescription.meshData = mMesh->mMesh.mTriangleMesh;
betajaen
03-05-2008 21:34:17
Works fine:
NxOgre::Resources::ResourceSystem::getSingleton()->addMesh("file://cube.1m.nxs");
mScene->createBody("test; cube.1m.mesh", new NxOgre::TriangleMesh("cube.1m.nxs"), Ogre::Vector3(0,2,0), "static: yes" );
BTW: You spelt "Density" wrong, and anything with a triangle mesh must be a static actor. It's probably not related to your problem though.
Either I have to wait for the new Cake and then I can check it out
or I have to go back to an olde version of NxOgre which worked fine.
betajaen
03-05-2008 22:13:45
It's nothing to do with Cake. I'm using NxOgre 1.0'22 which has the same Resource System code as the SVN does.
betajaen
04-05-2008 10:21:52
Couple of questions:
- Is meshtest.nxs in the same directory as your application? NxOgre does not use the Ogre Resource system for paths.
- Is meshtest.nxs actually a convex mesh? You can tell by opening it up in a hex/text editor and the header should be "NXS.CVXM"
If both of these answers are yes. Then I will be willing to test out the mesh for you, if you put it up on a server somewhere and PM me the links to the Ogre and NXS versions.
Gohla
04-05-2008 10:28:17
Using NxOgre Bleeding 1.0.21, Ogre 1.4.7 (Eihort) and PhysX 2.8.0.
I need convex/triangle meshes too now in my program so decided to try them out today. Tried out the different methods of loading in the converted mesh but they always crash when I try to create a body out of it...
The meshtest that came with flour also crashes Cake after using the converted convex/triangle mesh to create a Body.
Also when the mesh is loaded using the ResourceSystem's addMesh, the "NxOgre.html" log tells me it's already loaded:
Mesh::load
Mesh (file://tunnel.2x1x1.mesh.nxs) could not be loaded! - Mesh is already loaded
But when I comment out the addMesh line and check if the ResourceManager already has the mesh with hasMesh, it returns false, so it's not loaded? :S
FriedChicken
04-05-2008 15:22:27
1. YES
2. YES
And I'm using version of Bleeding 1.0 '21 , and Ogre 1.4.7
PueloGames
07-05-2008 13:26:54
i have the same error!
NxOgre 1.0.20 Bleeding Edge started. Working with
- PhysX => 2.8.0 (280)
- Ogre => 1.4.7 (Eihort)
- Hardware => Probably
- Platform => Windows (Debug)
Mesh::load
Mesh (
file://meshtest.nxs) could not be loaded! - Mesh is already loaded
the source:
NxOgre::Resources::ResourceSystem::getSingleton()->addMeshAs("file://meshtest.nxs","mesh");
crash here!
levelNxScene->createBody("plataformaCentral;mapa2.mesh",new NxOgre::TriangleMesh("mesh"),Ogre::Vector3(0,-1,0),"static: yes");
and
1-Yes
2-Yes
FriedChicken
10-05-2008 17:48:51
Is there anyone use convex shape successfully with bleed?.........
betajaen
10-05-2008 18:06:52