Targeting deformed position


#1

Goal: Have target cam follow red cube’s actual position.

Problem: Actual position of cube is determined in part by bend deformer on it’s parent (striped cylinder). Target tag ignores the deformer, so it instead targets the pre-deformed position.

target deformed position.c4d (155.5 KB)

I recall that there is an option in the point xpresso node to “use deformed points” which solves a similar issue, but not seeing any such options in the tools at hand, and that’s for points whereas I’m assuming it’s object axis origin (or whatever it’s called in c4d) being sought by target tag.

Is there some simple way to tell the target tag to use the post deformed position of the cube?

If not, what’s the simplest way to achieve a similar end? I suppose I could do something like take the cube size down to zero, use xpresso point node with deformed position enabled to locate the first point in the cube, then tie position of a null to that, and use the null as the target (only because I know how to target an object but not a point) Seems kludgey, though. Hoping for a simpler setup.


#2

Mmh, I didn’t find an easier solution than the XPresso one either, and you outlined that already.

There are two issues here:

  1. The deformers do not deform the position of an object, but its point positions. (It’s easy to see that when the bend deformer is active, the attribute manager still keeps the Position data of the cube frozen even if its polys clearly are elsewhere)
  2. The target tag targets an object by its Position data, and cannot target points or point selections. Since (1), the position of the cube doesn’t really change, and the target tag targets the original place.

Thus, no playing around with priorities or positions in the object tree can solve the issue. You will need the XPresso to access the deformed point position. (Good thing is, it works, I just tried :wink: )

The Maxon solution should be to extend the target tag to be able to target points, and include a checkbox “Deformed position”, then it would be fine. (Which is, essentially, the same stuff that you set up manually through XPresso. D’oh.)


#3

Best method I’ve found is to use a “Clamp” constraint. I’ve set the cube size to be really small because the clamp wants to fit to points / surfaces and this is a quick and dirty way to approximate to the center of your target object.

It works well though - you basically force a null to be “constrained” to your deformed position, then make the camera target that null.

Hope this is helpful!
https://www.dropbox.com/s/r8abtmp3v30cb4i/clamp_constraint_example.c4d?dl=0


#4

The last attachment may not be working!
clamp_constraint_example.c4d (341.8 KB)


#5

I like the clamp approach, but there does seem to be a wobble unless cube size is near zero, so I’m guessing that “bounds” target is still targeting a given bound vertex vs the center. You’ll see what I mean if you press play and increase the cube size.

texttunnel2.c4d (253.0 KB)

Anyway, with cube size minimized, it works fine. As I flesh it out, I’m noticing a couple oddities. First, the text height is 40, but required 14cm offset to center vertically. Am I missing some rule of thumb for centering text vertically?

Second, render doesn’t match viewport. Mismatch appears to be in the camera angle as if the render is ignoring the banking due to target.

Viewport:

Render:

Render any frame, and they mismatch. Disable the target (by clearing it, but nothing changes in viewport), and the render now matches. Re-enable the target, and nothing changes in viewport, but render is back to not matching.

Anyone know what’s causing this?


#6

You’re using all caps with no descender letters like g, p, j here; did you take these into account? I suppose centering is based on the used font, not on the text used.


#7

As a rule, I use all very bold fonts with all caps for anything where the design is primary, and I need the text to fit neatly. I do it specifically because of the visual consistency. A few odd exceptions aside, the letters tend to all have a consistent weight, height, etc. I would never use the thin text shown. Just included it since it was the default, so I figured other users wouldn’t get missing font errors.

Anyway, just not noticing any kind of vertical alignment option, so wondering if perhaps other users had developed any sort of rule of thumb for such a thing… acknowledging that there will always be some odd fonts out there that don’t seem to be true to their stated sizing.


#8

I found a tutorial that breaks it down pretty well.
The wobble that is mentioned by user Kanicki may well be fixed by setting the ‘priority’ of the Clamp Constraint to ‘Generator’ instead of expression.

https://www.eyedesyn.com/tutorials/how-to-stick-objects-onto-a-conveyer-belt-in-cinema-4d/


#9

Clamp constraint after the deformed and target after the clamp priority wise will make the setup stable. While a lot of my tutorials were old on cineversity it’s a real shame they got rid of my constraint series especially the priorities one.