badoumba Posted October 22, 2008 Share Posted October 22, 2008 (edited) Hello, I just made a path and a sweep from a line. The extrapoints generated by the sweep SOP has an altitude defined by the shape of the curve itself. You can see on the attached picture that the point 71 is not at the same altitude than the point 70, and the relative altitude difference is different for each couple of points. I would like the created surface to be plane. So point 71 has to be the same altitude than the point 70, 73 the same altitude than 72 and so on. The Point SOP doesn't provide me that flexibility as $TZ just refers to the current point but I have to make it equal to $TZ of the previous point only if it's odd number. Thus I will obtain a flat surface along the complew curve, like a road in mountains for example. If someone has a suggestion, I am new in Houdini and don't know all the tools. Thanx PS:I found that tutorial http://odforce.net/wiki/index.php/Get_points_from_primitive Where and how should I implement that code to play with it? Thanks Edited October 22, 2008 by badoumba Quote Link to comment Share on other sites More sharing options...
edward Posted October 22, 2008 Share Posted October 22, 2008 Er, I don't understand what you mean by "plane". You want the surface to be flat? Just use a Point SOP and replace $TY with 0? Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted October 22, 2008 Share Posted October 22, 2008 Er, I don't understand what you mean by "plane". You want the surface to be flat? Just use a Point SOP and replace $TY with 0? I think he wants each segment to have the same elevation ("flat"). If that's the case, then I think the SweepSOP won't give you enough control, but you could always use a CopySOP. The CopySOP will pay attention to a few attributes when orienting the copies, two of which are the normal "N" and the up vector "up". Since you want all copies parallel to the XZ plane, you can set N={0,1,0}. Then you can use the PolyframeSOP (we finally have this, yay!) to compute two tangents orthogonal to each other and N (aka a "frame"). Use one of these two tangents as the up vector and you're done. The resulting frames: The Y-values (altitude) are the same for each segment: orientedcopy.hip Quote Link to comment Share on other sites More sharing options...
badoumba Posted October 22, 2008 Author Share Posted October 22, 2008 Hi again. Thanks Mario! Sorry if it was not clear enough but I thinks it's exactly what you explained here :-) I was not sure to be able to do the trick only with SOPs but you manage! Thanks for the attached file and the time you spent for that. Badoumba Quote Link to comment Share on other sites More sharing options...
badoumba Posted October 23, 2008 Author Share Posted October 23, 2008 Hi Mario. It works well :-) but could you explain me a little more about the purpose of this PolyframeSOP? What do they mean by "frame orthogonal" in help files? I still have a problem after the copySOP when I replace your procedural curve by a Curve shape that my team need for the project. You can see on the attached picture that one of the points are not computed correctly. I also joined the file if needed. Thanks, Badoumba RoadFromCurve.hipnc Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted October 23, 2008 Share Posted October 23, 2008 Yeah, it seems to be having trouble calculating the differentials for the first point in this case... possibly worth an RFE to toggle extrapolation on open curves. Anyhoo. It's OK, you can still do this, albeit without using the new toy (PolyFrameSOP) Keep the normal pointing up {0,1,0}, but then calculate the tangent using CHOPs, where you can explicitly force extrapolation (extend by slope at either end). This becomes your new "up" vector. RoadFromCurve2.hipnc P.S: this will work as long as your "road" curve never goes directly up (i.e: exactly along {0,1,0}) -- it will probably fail in that case, though I haven't tested it. P.P.S: Another solution is to use the old method (with the PolyFrameSOP), but build the road such that you can delete the first or last point. Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted October 23, 2008 Share Posted October 23, 2008 ... possibly worth an RFE to toggle extrapolation on open curves. RFE sent and marked as "Fixed" in record time. Go Edward! Quote Link to comment Share on other sites More sharing options...
badoumba Posted October 23, 2008 Author Share Posted October 23, 2008 Mario, You have at least 6 years more than me intensive experience with Houdini and more than 1,000 messages in that forum. So to say that I don't understand what you add on my file but it will come slowly, I hope. Since then, thanks a lot - I can use it for my purposes as it is now :-) Badoumba Quote Link to comment Share on other sites More sharing options...
michael Posted October 23, 2008 Share Posted October 23, 2008 Mario's help is always a bit extreme the nice thing about Houdini files is that you can step through each node and see how it contributes to the final result... this thread reminded me of the old rollercoaster tutorial -> http://odforce.net/downloads/videos/v6/overview/ you might want to check it out...it's old so many things may be different, but it's worth watching. Quote Link to comment Share on other sites More sharing options...
badoumba Posted October 24, 2008 Author Share Posted October 24, 2008 Yes... Mario's tutorials are impressive (Spectral color for ex.). Thanks for the tips all of you! Badoumba 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.