Scaling SceneGeometry

rhaith

05-08-2010 17:37:29

Hello,

I have a bunch of nxs files being loaded using the createSceneGeometry function. The problem I run into they are not scaled properly and I'm not sure how to retrieve the node from a sceneGeometry pointer in order to set the scaling. Thank you for any help you may be able to offer.

Edit: Well after digging around i remembered that NxOgre doesn't deal with scene nodes - that's critters job. So how do I set scaling when creating scene geometry without a scene node?

rhaith

11-08-2010 21:22:42

REALLY could use some input on this, I got the mayor all over my ass on this one!

betajaen

11-08-2010 22:09:58

The mayor!?

You can't really scale TriangleMesh shapes (I assume is a TriangleMesh attached to a SceneGeometry). The mesh is cooked (meaning PhysX has looked the vertices and optimised it in a way for it's easy loading and set up so collisions work fast with it). To scale it you would have to get the vertices change and cook it again as a second mesh. It's a whole big process, NxOgre simplifies a lot of it but it's a pain.

It would probably be best to scale the mesh to what you want in your modeller (Blender, Maya, etc.) then cook it with flour than tackle the problem directly with NxOgre/PhysX.

If this isn't what you mean, but something else, please reply.

rhaith

12-08-2010 15:06:27

No, that makes perfect sense. I just wasn't sure if there was an easier way to do it I was missing. Thanks for your help betajaen! :) Really appreciate the work you do.