Tekitoumen opened this issue on Aug 09, 2022 ยท 7 posts
FVerbaas posted Sat, 20 August 2022 at 8:40 AM Forum Coordinator
OK. So you start from a body geometry in a .obj. Lets assume the body is humanoid. If the geometry represents a snake or an octopus bets are off.
I take it the geometry does not have a known topology, otherwise the question would have been futile: al you would need to do in select some known vertices and get their xyz.
If the geometry represents a figure in A or T pose but you do not know whether the body is orientated as in Poser, with largest Y coordinates in the head and nose pointing in the direction of the positive Z axis, or for example has its head in maximum positive Z and and nose pointing positive X. In that case I would glook at the geometry's bounding box and at the 'mass' properties. Loop over the vertices and calculate first and second order moment around x, y, and z axis, and min and max values. Then calculate 'cog' in x, y and z avarages. What you want in Poser to become the y-axis is the direction with miniimal total 2nd order moment around the 'cog'. It should normally be parallel with one of the long sides of teh bounding box. Z-axis typically would be in the direction othe shortest side of the bounding box.
But, I am jumping into solutions before I know your problem exactly. In any way: statistical parameters of the point cloud I think would bring you forward.