Cloth won't show up

banschare

08-04-2010 18:29:43

hi all,

working with bloody mess 1.5.5, I tried getting a ninja cloth to work but it just doesn't render in ogre and more it doesn't show up in the remote or visual debugger either...

NxOgre::ResourceSystem::getSingleton()->openArchive("media", "file:E:/sdk/OgreSDK_vc9_v1-7-0/media/models");
mClothDesc.mMesh = NxOgre::MeshManager::getSingleton()->load("media:ninja.mesh.nxs");
NxOgre::Cloth *mCloth = _renderSystem->createCloth(mClothDesc);

when debuging everything seems fine regarding the values, file is found cloth is created but it's nowhere to be seen.
is their some magic trick, do I have to draw cloth manually instead of let's say a body

what I haven't tried so far would be to get the renderable and attach it somehow to the root node of ogres scenegraph but why is it working with bodies and geometry and not with clothes.

very curious and little frustrated.

but thx for the cool addon !!

betajaen

08-04-2010 20:39:30

Detritus does cloth way better, you should use that.

banschare

09-04-2010 13:22:17

ok I upgrade to detritus, but now the creation doesn't even work because there is a type check in your wrapper, so on the way through the createcloth function the mesh is lost as 0 is returnedin the below function


mClothDesc.mMesh = NxOgre::MeshManager::getSingleton()->load( "file://../../media/models/cube.mesh.nxs");
mCloth = _renderSystem->createCloth(mClothDesc);


NxClothMesh* Mesh::getAsCloth()
{
return mType == Enums::MeshType_Cloth ? mMesh.mCloth : 0;
}

so is it just possible with the extended cloth file format ?

best,
banschare

betajaen

09-04-2010 13:51:13

"cube.mesh.nxs" is an actual cloth mesh right? (i.e. Opening it up notepad you can see the CLTH header)