Question on mesh and subsets

Started by
1 comment, last by TheAdmiral 17 years ago
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.
Advertisement
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.
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
Ring3 Circus - Diary of a programmer, journal of a hacker.

This topic is closed to new replies.

Advertisement