NoSOPforStupidity Posted May 5, 2022 Share Posted May 5, 2022 (edited) I'm importing meshes from Maya and triangulate them in a specific way. The orientation usually has quite a few polys that are not aligned with the majority. I am having a lot of trouble trying to figure out how to control that and prep the geo so that when I do apply a Divide SOP it's in the same direction for all polys. I've tried playing with sorts and nothing seems to affect the direction. As you can see below this is just a straight File in of an fbx from Maya and a Divide node...the split direction is not unified at all unfortunately. Edited May 5, 2022 by NoSOPforStupidity Quote Link to comment Share on other sites More sharing options...
NoSOPforStupidity Posted May 5, 2022 Author Share Posted May 5, 2022 (edited) with the help of eikonoklastes in the Think Procedural discord group I've got a solution: Setup a for loop block with an attribute wrangle in the middle with the following vex operating on vertices: This VEX block will test the position of vertex id 0 is above 1 OR if vert 2 is above 3 on the Y axis and if it is then add that prim to a new group marked to be shifted later with a Reverse sop pre-divide vector pos_0 = vertex(0, 'P', 0); vector pos_1 = vertex(0, 'P', 1); vector pos_2 = vertex(0, 'P', 2); vector pos_3 = vertex(0, 'P', 3); if (pos_0.y > pos_1.y || pos_2.y > pos_3.y) { setprimgroup(0, 'to_shift', 0, 1); } Edited May 5, 2022 by NoSOPforStupidity Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted May 6, 2022 Share Posted May 6, 2022 (edited) Hi, if you take the idea of Animatrix of expanding prim properties to their neighbours until you reached all primitives. You can create reference lists foreach prim. Once you have the references, you can compare each vertex arrays and calculate the offset and the sum of the offet over all references. This offset(sum) can be used, to shift the vertices. Here is an example using some VEX. The polygons should be all quads and the geometry should be (edge) connected aswell. reorder_vertex_shift.hipnc Edited May 6, 2022 by Aizatulin 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.