PDA

View Full Version : Spline Guide Instances Rotation - Align to a Vector



raw-m
04-09-2015, 02:07 AM
I have a road controlled by a Spline Control. At intervals down the road I'm adding some supporting structures underneath. I have my "supports" mapped to the right locations using instances/spline. All is good but the rotations are not quite what I'm after.

How do I tell the rotations to keep it Heading and Bank values but point straight down the Pitch? I know I need nodes and a direction Vector (-1 in this Y, in this case) but no idea how to piece it together. Can someone show me?!

raw-m
04-09-2015, 10:34 AM
Still struggling with this - it's driving me bonkers!

Instance Generator/Spline, Rotation set to Spline - World. All is good except the Pitch, which I want pointing directly down.

Any tips?

MonroePoteet
04-09-2015, 12:35 PM
If you create a Null, perhaps called "Traveler", and have it move down the Spline using it's Z distance, you can then use the Instances=>Path rather than Instances=>Spline. This allows you to restrict the channels that are effected by the Spline by using the Motion Options=>Controllers and Limits=>Rotation tab and changing any rotation you don't want effect by the spline to "Align to Path" or "Key Frames" instead of "Spline Control".

Here a really quick example scene. Hope it helps!

mTp

raw-m
04-09-2015, 12:55 PM
Thanks MonroePoteet, I'll pick it apart in the morning a report back - my eyes are frazzled right now!

raw-m
04-10-2015, 02:33 AM
MonroePoteet - brilliant! Thanks so much for sharing. Nice example, exactly what I was after and a great little trick :D

MonroePoteet
04-10-2015, 11:33 AM
Glad it helped! One downside is that it appears that the Heading / Pitch / Bank limits in the Controllers & Limits panel don't get applied to the Spline Control, so you either have to enable each channel (by setting it to Spline Control) or disable it (by setting it to Key Frames or other). For example, on a curved section of roadway the supporting pilings might be angled outward slightly to better handle the transverse force from the traffic going around the curve.

Another option might be to clone the original Spline and use the clone to instance the supports, but reduce the amount of bank / pitch on the cloned nodes to make the supports more vertical but not perfectly so on the curves.

mTp