Mesh export and use32bitindexes

instbldrjems

20-02-2009 17:13:12

Hi --

When I convert my meshes to XML using the CommandLine tool I've noticed that some meshes are getting exported with use32bitindexes set to "false" and some with it set to "true". This is affecting mesh selection in my engine, where those with use32bitindexes set to false are picked fine using RayCastFromPoint and display their bounding-box OK (basic code being used can be found elsewhere in these Forums), while those with it set to true won't select. I realize that how I pick my meshes is outside of the scope of this forum, but I was hoping to find out what defines whether that parameter is set to "true" or "false" in the mesh file, and if I can control that in oFusion. BTW I am using oFusion Pro 1.9.38, and MAX 2009. It seems like those meshes with the parameter set to true are significantly more dense than others, which would make sense -- is that the reason? Does oFusion use some polygon threshold to decide when to set use32bitindexes to true?

Any help on this would be greatly appreciated.

Thanks.

Lioric

23-02-2009 18:23:46

The 32bit flag is defined by the number of indices the submesh has (each submesh is a part of the mesh with a different material, or the complete mesh if only a single material is assigned), if the number of indices is more than 65535 the submesh is created as a 32bit mesh (the index buffer)

This is needed to correctly render the objects, you can reduce the number of vertices if dont want to create 32bit meshes, or split your objects in smaller parts with different materials in each part

Godlike

24-02-2009 07:11:11

Hi there, I am using Max 2009 and wonder where can I find this last version, as on the website I can only see version 1.8 for Max 7, 8, 9.

Thank you!

Evak

24-02-2009 07:20:53

The 2009 version is ofusion pro commercial version. The free version of ofusion is creeping up on 2 years old now and is for Max 7/8/9

Godlike

24-02-2009 13:59:59

Uhhh ok thank you. I'll check the pricing page :)

instbldrjems

26-02-2009 15:45:25

Thanks Lioric, that explains things. It's as I suspected.

Almost all my meshes are single meshes, as I am using baked-on maps as materials (we are converting VRay-illuminated scenes to run in our Ogre-based engine, capturing all of the GI lighting and shadows). I will look into simplifying my vertex count.