problem with nxs

nathaliamn

12-02-2011 17:56:46

Hi,

In my code i load a lot of nxs files, but only one doesnt work.
The model is tube and is totally fine in 3ds max, but when i load in nxs format in ogre is seem messy, the mesh doesn't appear and the colision doesn't work.

So i tried this, i deleted some faces to "open" the tube, and it worked.


So my question is: a closed tube can not have colision? what can i do to fix it?

betajaen

12-02-2011 18:19:35

I assume it's like a cylinder? Then probably PhysX is assuming that the inside of the cylinder is solid, thus an Actor existing inside there being very unlikely. What you could do is, give the cylinder some thickness and perhaps leave an end open.

nathaliamn

12-02-2011 19:33:22

Wow, I created a new tube and it worked.
It's strange cause my first mesh had thickness.

anyway, thanx again.

Diabolikal49

12-02-2011 19:56:45

I would like to know what you used to create your .nxs files?

I'm currently using 3DS Max and I fear i'll have to resort to exporting as XML->flower->nxs, just seeing if there's a simpler way.

betajaen

12-02-2011 20:00:32

It isn't the converter, when cooking PhysX optimises it, so it's probably taking that cylinder to be solid, as it's quite unlikely that the inside of the cylinder is hollow and the rest of the world is solid. You need to suggest that the cylinder is hollow by making the normals face into the cylinder, giving it a thickness, or removing one of the ends.

nathaliamn

12-02-2011 20:55:55

Diabolikal49, i did all these steps =/

nathaliamn

12-02-2011 21:54:51

i already create a lot of tubes, most of then didnt work. It seems to have no logic

Edit: The problem had nothing to do with the meshes, it was all the material fault.

proof

13-02-2011 00:15:41

Could you explain on how did you create the nxs files? When I try to use flour to convert a .mesh into .nxs it outputs an empty file :roll:

nathaliamn

13-02-2011 01:17:04

you have to convert mesh to mesh.xml using OgreXMLConverter.exe
Convert mesh.xml to flower using ogrexmltoflower.rb
And finally convert flower to nxs using flour

betajaen

13-02-2011 08:36:38

Guys,

It ISN'T the exporting process. It's the PhysX mesh optimizer, when it's converting your mesh (in any form) into a "NXS".



Also; your saving it as a TriangleMesh right?