Aligning array of twisty spline to camera traveling on same twisty spline


#1

Project File attached:

tunneltext.c4d (280.0 KB)

Camera travels along a twisty spline through a tunnel that is a sweep of that same spline. On either side of tunnel are tracks which are swept from array of smaller objects offset from same spline.

In front of, and offset from the camera along the same spline is some text which has target tag applied so it always correctly orients to the camera despite constant rotations.

I want the tracks on the sides to maintain that orientation too (always hard left and right from camera perspective.) In other words, imagine the tunnel is a hallway, and there’s a hand rail on either side. The hand rail doesn’t do you much good on the floor or ceiling, so I’m trying to keep the rails hard left and right.

I’m not sure why it’s not just automatically aligned. after all, I’m not telling the camera to turn. It’s just following the spline. Since array is just following the same spline, I would think it’s rotation would match, but apparently not. Anyway, I’ve tried several approaches using target to cam, and can’t get it working.

EDIT: It appears that the mismatch in twist between camera and tracks may be due to the fact that the camera is following the spline directly whereas the tracks are a swept rectangle which is THEN put into an array. I think doing the array after the sweep is causing the additional twists and some other issues.

I can’t seem to get it to sweep an array. It always sweeps only 1 of the rectangles, and leaves the other. Trying for past hour to look up a way to do this, but so far no go.


#2

If you put the array object in a connect object, it will sweep them all


#3

tunneltext.c4d (312.1 KB)

Couldn’t get it working with array under connect object as connect seems to want objects it’s connecting on same (1st child) level. Manually creating the array out of 2 offset rectangles works under connect object, and is perhaps marginally better as rails seem slightly more consistent in distance from tunnel (doing the array AFTER the sweep was causing a slight offset for each clone causing the entire thing to turn into Spirograph spaghetti if you crank up the number of clones in the array)… but even under the connect object, the mismatched twist still exists.

I must be missing something here. If you watch the sides of the rectangles, it’s clear that the (manual) array is twisting as a single object. There is always a consistent near side of the sweep. The twists of the array, however, still don’t match the twists of the camera (pitch?).

I tried applying target tags for the rectangles, the connect object, etc to the camera, but can’t get it working. Seems like there’s a deeper issue though… like I shouldn’t have to fix the pitch in the first place. After all, both the camera and the array have a “right side up” when they start, and both are traveling the same spline (well, a copy, but settings appear to be the same), so why would their twists not match as they go through?

I was thinking at first it’s because the rectangles are offset on a particular (x) axis, so as it twists and turns, it changes relationship to x axis. I don’t think that’s it, though, as they are grouped via the connect object which should then provide it’s own group axis jut rotating whatever is in it without caring what the original child orientation was… I think. It’s teting my dyslexia.