seeker Posted August 18, 2007 Share Posted August 18, 2007 I have two 'intersection' objects, and i would like to have a procedural 'road' connect the two pieces (see picture). For the end result, i would like to be able to drop down one of these intersection objects and with a couple clicks, connect them together with a nice quad-subdivided parametric road that behaves well no-matter where the user moves the second 'intersection' (within limits of course). My first question is: - Do I need to Combine these two objects, or can i leave them as discreet seperate Objects? Any recommendations either way? next: - what is the best operator to actually perform the geometry creation. I have played around with polyknit, and after explicitely listing the vertex numbers was able to build a small bridge, but not with nearly enough control over the subdivisions. - with other experiments, i have had good luck using polyspline + sweep + polypatch. This gives me nice control over # of subdivisions as well as some tangent handles inside the control spline. If i wanted to use this method HERE, I just need a way to automatically grab the correct 'edge' (or would that be poly) seen here in yellow, create a vertex 'start' for my control spline (on first intersection piece), and then create the second point on the second intersection (again, automatically grabbing the poly # or user click, we can assume constant #'s since each piece will be the same), create a control spline, then 'loft' a spline created by 4 of the edges (yellow) along that control spline. - i'm not married to the polyspline + sweep + polypatch method. I'm open to any solution that will give me the results intended. I hope this makes sense. I have included a .hipnc file that shows both a 'loft' road and the two 'intersections' shown here.... thanks in advance! track_test_8.hipnc Quote Link to comment Share on other sites More sharing options...
edward Posted August 19, 2007 Share Posted August 19, 2007 Just an idea but what about doing each piece as a SOP-level HDA? Then you can just combine together in SOPs land easily. For selecting, I would experiment with the Group SOP's Bounding Box feature. Create 4 predefined bounding boxes around each "connector" face. Then if you place two pieces close enough within a bounding box, it will create a group with 8 points. Then you can have 3 Switch SOPs that determines which group has the most points by comparing with the expression argc(pointlist("...")). Once you have the group, then you can do whatever you want with it? Quote Link to comment Share on other sites More sharing options...
3__ Posted August 19, 2007 Share Posted August 19, 2007 test using ray & add. track_test_9.hipnc Quote Link to comment Share on other sites More sharing options...
seeker Posted August 20, 2007 Author Share Posted August 20, 2007 edward & cpb, Thanks so much for your replies! I'm really new to Houdini so please forgive these simple questions: cpb: - while trying to disect and understand your .hipnc file, I wasn't able to 'display' each SOP (blue box). Any idea why? No matter what I selected, only the final result was updated in viewport. Any thoughts on why? - at extreme angles the new 'bridge' geometry would vanish. any ideas whats causing this? edward: - HDA=Houdini Digital Asset right?How do I create a 'Sop level' HDA? Whenever I do it the DA seems to be one level up from my SOP network... - I'm having trouble with the Group -> Bounding box function. For a test, I chose Polygon and feeding it to an extrude SOP. As you can see in this image, the extrude is not respecting the (only) polygon inside the bounding box. Any idea what I'm doing wrong here? thanks again guys! Quote Link to comment Share on other sites More sharing options...
edward Posted August 21, 2007 Share Posted August 21, 2007 - HDA=Houdini Digital Asset right?How do I create a 'Sop level' HDA? Whenever I do it the DA seems to be one level up from my SOP network... Just hit Shift+C with your SOP nodes selected to collapse it into a SOP Subnet. Now you can right-click on it and say Create Digital Asset. - I'm having trouble with the Group -> Bounding box function. For a test, I chose Polygon and feeding it to an extrude SOP. As you can see in this image, the extrude is not respecting the (only) polygon inside the bounding box. Any idea what I'm doing wrong here? First of all, you probably want to make sure only 1 polygon is selected by the Group SOP. This will create a specially named group. You can check by middle-mousing on the node. In the downstream SOP, you want to make sure you use the named group that you created. (eg. in the Extrude SOP, make sure you type in the Source Group parameter). Quote Link to comment Share on other sites More sharing options...
3__ Posted August 21, 2007 Share Posted August 21, 2007 - while trying to disect and understand your .hipnc file, I wasn't able to 'display' each SOP (blue box). Any idea why? No matter what I selected, only the final result was updated in viewport. Any thoughts on why? - at extreme angles the new 'bridge' geometry would vanish. any ideas whats causing this? r-click on the 'branch' sop and select: 'allow editing of contents'. not-bridging at extreme angles is a limitation of the setup as it casts a ray from one connector to another along its primitive-normal... attached is another demo using a vex sop that tests the dot product of the primitive normal and the vector between the 2 sets of primitives. probably not very practical in this case but still a fun experiment. -cpb track_test_10.hipnc Quote Link to comment Share on other sites More sharing options...
seeker Posted August 21, 2007 Author Share Posted August 21, 2007 man, you guys are both super helpful, thanks again! i'm hoping to combine the two suggestions here. Edward, i got the 'bounding-box-to-grab polys-in-proximity' thing....which is great for a user 'placing' geometry and having stuff happen. Attached is my realization of your ideas. If you move that second intersection close enough...POP! the 'road' appears. its very cool! The problem i have now is that the resultant geometry is triangles and not very controlable. cpb, I went to try your track_test_10 that uses the vex sop, but i'm getting error message (see attached image). Is it possible you have some assets locally that i need for this to work? I was able to look at the HDA and see the parameters you exposed and stuff, but it gave me this error and wouldn't display anything in viewport, nor could i access the individual SOPs inside the HDA. thanks again! track_test_11.hipnc Quote Link to comment Share on other sites More sharing options...
3__ Posted August 21, 2007 Share Posted August 21, 2007 ha sorry used H9. I'll resend later... -cpb Quote Link to comment Share on other sites More sharing options...
seeker Posted August 22, 2007 Author Share Posted August 22, 2007 this error was with H9...non-commercial version. Quote Link to comment Share on other sites More sharing options...
3__ Posted August 23, 2007 Share Posted August 23, 2007 (edited) ok try this one. failing that, the otl by itself. track_test_12.hipnc branch_demo.otl Edited August 23, 2007 by cpb Quote Link to comment Share on other sites More sharing options...
seeker Posted August 23, 2007 Author Share Posted August 23, 2007 thanks cpb, i was able to open the HDA but i still got same error. can you explain what is the .otl and how do i use it (newbie). thanks! Quote Link to comment Share on other sites More sharing options...
3__ Posted August 24, 2007 Share Posted August 24, 2007 you have 2 connector pieces, they both have attributes on the extrudefront points that contain: the connector-primitive position (ppos), and normal (pdir). the vex sop makes a vector from ppos1 and ppos2 and compares it with pdir1 using cross-product. if the product is greater than the threshold then it sets an attribute called cansee. this is duplicated for the 2nd connector. points with cansee==1 are isolated, the prims collapsed down to their centroids and fused, then the 2 resulting points are duplicated along pdir before connecting as a curve and converting to nurbs. the rest is pretty straightforward. -cpb 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.