Ragdoll prefab on nxOgre

Taturana

01-10-2006 22:44:12

Hello

I tried to use the ragdoll prefab class that comes with nxOgre CVS, but when I press K in ragdoll tutorial application the zombie stop him animation but it does not create the ragdoll.

Someone has a working ragdoll prefab class that can I use on my project?

Thanks

betajaen

01-10-2006 22:52:25

I did. There is one in NxOgre but I disabled it, for some reason it crashes. You can certainly work from that.

BTW: Guys I asked Taturana to post this, if anyone has the ragdoll prefab working please let him know. Also pass the code in my direction as well, I'll give you some free Welsh cakes ;)

Taturana

02-10-2006 00:33:49

I'm trying to fix the ragdoll prefab class...

Hey betajaen I have some questions:

I put the function createRagdoll() on the public and put

_state = STATE_NXOGRE_CONTROLLED;


in the start of function createRagdoll(), now in the nxTutorial 404 (ragdolls) I just put to when press spacebar call the function createRagdoll() for our zombie ragdoll.

The result is: the zombie stops animation and stay suspended on the air, his legs stay like a pendulum, I think it really becomes a ragdoll the unique things are physics objects do not collide with him and he stay suspended on the air :/

What you suggest me?

betajaen

02-10-2006 08:28:14

Thats seems better, if the legs are moving around on there own it means that NxOgre has control of that mesh's skeleton.

You need to make sure those Actors/Bodies for the limbs respond to gravity so he falls.

Taturana

02-10-2006 18:25:29

Hello

I take the code of cloth sample of PhysX SDK and I'm trying to make a prefab of it, but the code of sample is using OpenGL, there is a way to directly use OpenGL in Ogre3D?

If not, can you help me to convert it for work with Ogre3D?

Thanks you =D

betajaen

02-10-2006 18:31:43

That was my plan for today as well, except I got side tracked with another feature. My plan is it to use that for a soft body demo of full of rubber chickens (no joke).

I doubt you can get Ogre to work with OpenGL like that so most likely you'll have to convert the OpenGL code to the Ogre equivalent. If you have any progress I would love to see what you have got.

Taturana

02-10-2006 19:10:16

I'm really confused about this function

glDrawElements(GL_TRIANGLES, 3*numTriangles, GL_UNSIGNED_INT, mReceiveBuffers.indicesBegin);


What function is relative to that in Ogre3D?

betajaen

02-10-2006 19:53:32

Probably sending the triangles to a ManualObject.

betajaen

02-10-2006 21:44:33

I'm getting there also ;)

Taturana

02-10-2006 22:06:47

o.O nice work =D

When you finish can you send me the code?

Thanks =D

betajaen

02-10-2006 22:17:10

It'll be in 0.4, as one of the classes ;)

Taturana

02-10-2006 22:25:17

When it will be released?

betajaen

02-10-2006 22:46:52

When it's done.

I shall be releasing a few release candidates before hand though, so expect one soon.

Taturana

02-10-2006 22:51:34

look the Cloth prefab construtor that I wrote, see if its correct


MyCloth::MyCloth(std::string entName, nxOgre::scene *nxOgreScene, NxScene *scene, NxClothDesc &desc, std::string meshFileName, NxReal scale)
{
ClothEnt = nxOgreScene->mSceneMgr->createEntity(entName.c_str(), meshFileName.c_str());
ClothNode = nxOgreScene->mSceneMgr->getRootSceneNode()->createChildSceneNode();
waterNode->attachObject(ClothEnt);

NxClothMeshDesc *ClothMeshDesc;
ClothMeshDesc->numVertices = ClothEnt->getMesh()->getSubMesh()->vertexData.vertexCount;
ClothMeshDesc->numTriangles = ClothEnt->getMesh()->???;
ClothMeshDesc->pointStrideBytes = sizeof(NxVec3);
ClothMeshDesc->triangleStrideBytes = 3*sizeof(NxU32);
ClothMeshDesc->points = (NxVec3*)malloc(sizeof(NxVec3)*ClothMeshDesc->numVertices);
ClothMeshDesc->triangles = (NxU32*)malloc(sizeof(NxU32)*ClothMeshDesc->numTriangles*3);
ClothMeshDesc->flags = 0;

desc.clothMesh = mClothMesh;
mCloth = scene->createCloth(desc);
}


I dont know what I put in the triangles ;(

The declarated variables are


Entity *ClothEnt;
SceneNode *ClothNode;
NxCloth *mCloth;
NxClothMesh *mClothMesh;


Thanks =D

Taturana

03-10-2006 23:42:24

Hello

How can I found the size of a bone?

If possible, result in Vector3.

Thanks

betajaen

04-10-2006 08:52:49

These sort of questions are best to be posted on the Ogre Back to Basics forum.

[Edit]

Which I've seen you've done.