Sign in to follow this  
ankhd

Question on mesh and subsets

Recommended Posts

hey all, Say if you had a 3D mesh made up of say 4 blocks, when Exporting does all this data go into one mesh object or does the mesh get put into subsets. Because when doing picking on this mesh only one of the blocks can be selected, Does this mean I need to get the subset of this mesh and do the ray intersect test on each subset. Or is there a error some where else Thanks.

Share this post


Link to post
Share on other sites
Yes you should specify the subset if you are using
D3DXIntersectSubset
but if your using
D3DXIntersect
it'll test all subsets.

As for how the mesh gets split into subsets, I think that depends on the exporter your using. Some I have used in 3dmax will make a different subset for each object that is exported, but others just flatten the mesh into one mesh.

Best way is just to debug some output and see how many subsets your getting.

Share this post


Link to post
Share on other sites
The partitioning of a mesh into subsets should be entirely user-defined: only you know which part is which. For this reason, you should be able to define the subsets in your 3D modelling software. I'm not sure if this is the whole story, but in my experience, Blender meshes will be separated at least by material and object group.

That's what does happen. If you're asking how you should partition the mesh, then do what seems logical. If the mesh is homogeneous, then make it a single subset. If you need to make parts of it invisible at run-time, then partition accordingly. In the case where a vertex set is connected and uniform but must behave non-uniformly - for example, the 'head' subset would be used to determine head-shots - then you must manually create separate subsets.

Admiral

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this