Arthur Spooner Posted April 27, 2016 Share Posted April 27, 2016 (edited) I know you can manually use the PolySplit tool to add edge loops into geometry. How do you do this numerically within the Split Locations parameter of the PolySplit node; is a method to which one can use to aid in doing this numerically ? Edited April 27, 2016 by Arthur Spooner Quote Link to comment Share on other sites More sharing options...
acey195 Posted April 28, 2016 Share Posted April 28, 2016 This is not easy, but it is possible to reproduce the string that you would get from creating a manual Cut using python or VEX and then referencing that into the string field of the PolySplit tool using `details("../otherNode","cutString")` for instance, but you may be able to find some tools on orbolt which do this operation already. Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted April 28, 2016 Author Share Posted April 28, 2016 4 hours ago, acey195 said: This is not easy, but it is possible to reproduce the string that you would get from creating a manual Cut using python or VEX and then referencing that into the string field of the PolySplit tool using `details("../otherNode","cutString")` for instance, but you may be able to find some tools on orbolt which do this operation already. Do you have a clue as to what I need to look for on orbolt ? Quote Link to comment Share on other sites More sharing options...
acey195 Posted April 28, 2016 Share Posted April 28, 2016 I cannot be sure, but this tool may use similar methods: https://www.orbolt.com/asset/vosiloB_::poly_curve_split Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted April 29, 2016 Author Share Posted April 29, 2016 I was hoping you could display some information, then you can extract the location and enter it in. For example an simple extrusion, the vertices which all connect the faces which make up the faces in a loop could be shown and extracted, somehow. There has to be a method to which Houdini understands when displaying the manual edgeSplit, otherwise it would not be shown in the parameters area of the node ? Quote Link to comment Share on other sites More sharing options...
6ril Posted April 29, 2016 Share Posted April 29, 2016 (edited) polysplit will cut from one edge location to another if you provide 2 edge locations, and will cut a edge loop if you provide only 1 edge location. what I call an edge location is this : 12e2:0.5 read it like this: primitive number 12, edge number 2 at the middle of the edge (0.5) it means that houdini identify edges as a number 0 or 1 or 2 or 3 which are the 4 sides of a certain primitive. Then you add a position on that edge as a 0to1 float. 0 and 1 being the extremities and 0.5 the middle. so if you want to manually enter the parameters of your polysplit, you need to display the primitives number in the view port, and try to find the edgenumbers of a primitive with testing, as I dont know if it's possible to display the edgenumbers. *edit* But I still wonder why you'd want to do that, when you can just click in the viewport to place your split. Edited April 29, 2016 by 6ril Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted April 29, 2016 Author Share Posted April 29, 2016 1 hour ago, 6ril said: polysplit will cut from one edge location to another if you provide 2 edge locations, and will cut a edge loop if you provide only 1 edge location. what I call an edge location is this : 12e2:0.5 read it like this: primitive number 12, edge number 2 at the middle of the edge (0.5) it means that houdini identify edges as a number 0 or 1 or 2 or 3 which are the 4 sides of a certain primitive. Then you add a position on that edge as a 0to1 float. 0 and 1 being the extremities and 0.5 the middle. so if you want to manually enter the parameters of your polysplit, you need to display the primitives number in the view port, and try to find the edgenumbers of a primitive with testing, as I dont know if it's possible to display the edgenumbers. *edit* But I still wonder why you'd want to do that, when you can just click in the viewport to place your split. I placed a few manual edge split. I have an primitive number on my cube (21) by placing the following in the Split Locations; 21e1:0.3 21e1:0.3 two primitive numbers move on the cube, so obviously something is happening, except not the actual visible edge split line ? For many, manually edge splitting will do the job I want to understand how it's done numerically Quote Link to comment Share on other sites More sharing options...
acey195 Posted April 29, 2016 Share Posted April 29, 2016 in addition to edges the split also supports snapping to vertices and faces: 20890v0 and 20890f:0.459390,0.497302 respectively to get the edge number you want the vertexPrimIndex number, a quad has 4 vertices, 0-1 would be edge0, 1-2 edge 1 etc. the vertex snap method also uses this number for faces its the primitive number and then the intrinsic uv value for this primitive, to find this UV value you can use the intersect() or the xyzdist() VEX functions (maybe others as well) 1 Quote Link to comment Share on other sites More sharing options...
6ril Posted April 29, 2016 Share Posted April 29, 2016 2 hours ago, Arthur Spooner said: I placed a few manual edge split. I have an primitive number on my cube (21) by placing the following in the Split Locations; 21e1:0.3 21e1:0.3 two primitive numbers move on the cube, so obviously something is happening, except not the actual visible edge split line ? For many, manually edge splitting will do the job I want to understand how it's done numerically ???? 21e1:0.3 21e1:0.3 ???? that's twice the same location ! read the doc, watch entry level tutorials as suggested in your other threads. Everything I've wrote here is in the doc, as well as what acey195 added. I've even shown you via skype share screen how to do all this... Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted April 29, 2016 Author Share Posted April 29, 2016 (edited) 1 hour ago, 6ril said: ???? 21e1:0.3 21e1:0.3 ???? that's twice the same location ! read the doc, watch entry level tutorials as suggested in your other threads. Everything I've wrote here is in the doc, as well as what acey195 added. I've even shown you via skype share screen how to do all this... I just read acey reply, calm down, let me catch up I'm not a machine ! Edited April 29, 2016 by Arthur Spooner Quote Link to comment Share on other sites More sharing options...
6ril Posted April 29, 2016 Share Posted April 29, 2016 1 hour ago, Arthur Spooner said: I just read acey reply, calm down, let me catch up I'm not a machine ! sure ! but do read the doc Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted April 30, 2016 Author Share Posted April 30, 2016 Acey - I understand each faces typically has four vertices. When I placed a manual cut it was done at split Location 0e2 for example, in the documentation it states; for the aeb, cut at the midpoint of edge b of primitive a where a and b are integers. Do have to run the VEX code on each face ? Quote Link to comment Share on other sites More sharing options...
acey195 Posted April 30, 2016 Share Posted April 30, 2016 if you use the expression link method using the details() expression, you want to run the VEX code in detail mode as well. you want to use it to generate one string to put in the split Locations parameter. If you know you are always going to cut the edge in half, it makes it easier in the sense that the value after the ":" is always 0.5. I suggest you use some kind of VEX wrangle, just to find which primitive numbers and edges inside them you want to cut. The code for this can vary wildly on what type of cuts you want to make. The most straighforward (and reusable) way, would probably be to use the second input of the wrangle to input a curve, so you can check in the wrangle which primitives and edges it crosses and export that as a detail attribute. but to do this well, you do require some math and programming knowledge. (hence I said it was not a trivial thing to do) If you want to use something simpler, you can just cut all the primitives across their 0th and 2nd edges (or 1st and 3rd) The problem with this is that the split tool only does one cut, so it has to start and stop somewhere, in a way that creates a reachable path for the splitting operation. then again, if you want to do the latter, the split tool is probably not really the best way to tackle that task... Quote Link to comment Share on other sites More sharing options...
acey195 Posted May 1, 2016 Share Posted May 1, 2016 Ok I made you a very simple example, if you want to cut more with the same logic, you just have to add an extra sprintf("%de%d:0.5,Prim,Edge); and concat that to the output string. To input the numbers into the code algorithmically, is something for you to figure out :P, as I have no idea what it is exactly that you are trying to achieve. I also added a non-code method in the hip file, which may be much better suited for what you are trying to do. polySplitExample1.hipnc Quote Link to comment Share on other sites More sharing options...
Arthur Spooner Posted May 1, 2016 Author Share Posted May 1, 2016 This is helpful, I have to study. In the meantime the VEX code is the brains behind numerically doing a polySplit, as mentioned previously but what is the %de%d in the sprintf() command, which you have in the VEX code ? Where is the groups getting the pattern information from the VEX node ? Quote Link to comment Share on other sites More sharing options...
acey195 Posted May 1, 2016 Share Posted May 1, 2016 http://www.sidefx.com/docs/houdini15.0/vex/functions/_index look at the printf() command which is similar to the sprintf() command, but contains more information. The controls are at the top of the Wrangle node, the wrangle node outputs a detail attribute, that is read by the polysplit. 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.