JamieH Posted August 26, 2010 Share Posted August 26, 2010 Hello everyone, I've been pulling my hair out trying to make a simple cuboid follow a curve but rotate to be perpendicular (forming spaced steps) when the "steepness" is above a certain angle. I'm using the copy sop combined with a curve that has the correct normals (normals follow the flow via $TX2-$TX etc). At the moment to "calculate" the angle i've just duplicated the curve and shifted it up slightly then shifted some points closer and used an Attribue Transfer to blend where I want the perpendicular offset. The trouble is I can't work out the correct way to orientate the cuboids to be perpendicular. Do I have to do some fancy vector rotation or is there a simpler way? Every way i've tried ends up with the cuboids perpendicular but breaking the other rotation values so the cuboid no longer twists towards the flow of the curve in the other 2 axis. I've attached an image to try an explain what I mean Any help would be greatly appreciated! All the best Cheers, J Quote Link to comment Share on other sites More sharing options...
pclaes Posted August 29, 2010 Share Posted August 29, 2010 Perhaps look into the sweep sop: http://www.sidefx.com/index.php?option=com_content&task=view&id=1242&Itemid=305 Quote Link to comment Share on other sites More sharing options...
Macha Posted August 30, 2010 Share Posted August 30, 2010 (edited) Maybe this helps as well: The problem of orientation and rotation comes up again and again. Unfortunately I can't think of any easy way that works in every case. The more I look into it the more complicated -and interesting- it gets. The maths of it can be rather involved but I think it would help if we had some expressions or nodes that could convert from one space to any arbitrary space. (There is one in vops but its restricted to a few choices, and the polyframe sop is useful as well). I keep finding myself having to build one again and again. A set of propper SESI certified expressions/nodes would be most welcome! Edited August 30, 2010 by Macha Quote Link to comment Share on other sites More sharing options...
koen Posted August 31, 2010 Share Posted August 31, 2010 I you want a really nice way to do this, have a look here: Computation of Rotation Minimizing Frame http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBIQFjAA&url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.125.79%26rep%3Drep1%26type%3Dpdf&ei=eHR8TL6aB4--sAOgwbWCBw&usg=AFQjCNFw2-499NKUXV4CjshsODvCo87lOg Cheers, Koen Quote Link to comment Share on other sites More sharing options...
Ratman Posted August 31, 2010 Share Posted August 31, 2010 Lil' late to conversation, but did you try the Tangent sop? http://www.sidefx.com/exchange/info.php?fileid=503&versionid=503 Quote Link to comment Share on other sites More sharing options...
JamieH Posted September 28, 2010 Author Share Posted September 28, 2010 Hey everyone thanks for your replies! I tried the copy sop with variations of "orient" as well as sweep but to no avail. In the end I ended up creating my own sweep like sop in a vop sop! (I'm new to Houdini... is that the right combination of abbreviations?!) It was awhile ago now and the file is at work but if I remember correctly: basically I calculate 3 vectors for each point along the curve. Tangent, Normal and Binormal then use these to transform each point of the duplicated geometry (duplicated at sop level then plugged into the vop) into place. From there I multiply the matrix with the output of a quaternion node to rotate each point around an object aligned axis. I'll create a simple sop example and post the hip when I get a spare minute! Thanks again for the help! J. PS. I'd already finished this when you pointed out the Tangent OTL Ratman, is this along the lines of what it does? I'll have to investigate at some point! 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.