Adobe After Effects Forum
Parenting the Separate Ends of a 3D Object to Two Different Nulls?
Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Rikk Wolf on Feb 27, 2019 at 9:46:20 pm

Hey all. Long time "listener", first time "caller".

I've used After Effects for nearly a decade now and I'm shocked I've never encountered the need to tie a single object to two different nulls/track points.

I have a superhero conjuring a chain generated using Video Copilot's Element 3D and I have one end parented to the actor's fist but I also need to parent the other end to a separate null/track point on the digital saw blade element in the scene.

I'm sure it's just something simple I'm missing but I can't seem to get anywhere or find this issue addressed anywhere, so I REALLY appreciate any help anyone can offer. I tried on Video Copilot's Element 3D Forum and the post was never approved for some reason. 😐

Sorry for the sloppy screenshot but I needed to block out a few things.

Working in After Effects CC 2017 14.2.0.198 on a Late-2015 iMac using Element 3D 2.2.2, if that's relevant.

Cheers!




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Steve Bentley on Feb 28, 2019 at 2:31:57 am

Hey Rikk, I may be missing what you are trying to do but I don't think you can do that with element and an existing chain model. The model of the chain is just fixed geometry inside element so you can't treat it like a string where you can pull on the ends at least realistically.

That being said, you could use the mograph like system in Element to place individual clones of 3D links along a spline/path and then animate the spline or tie the ends of the spline to object in your scene.

Or export your nulls where you want the chain to attach to and use Cineware to animate the chain in C4D using any of the rope tricks or mograph or dynamics tricks on the chain structure and then bring that C4D project back into you AE project - AE will render the chain for you in a C4D render engine all within AE.

You might also be able to use Newton to do this if you have it - its a physics based engin for AE but I'm not sure if it works on 3D geometry yet.




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Rikk Wolf on Feb 28, 2019 at 4:08:17 am

Thanks for the prompt reply, Steve!

I figured it was a long shot. I'm sure you're familiar with the lightning effects in After Effects, with their "origin" and "direction" functions. I was hoping to discover something that would allow me to do something similar.

I did consider making each link its own 3D object but I fear my computer may not be up to it. However, would you happen to have a link to a good spline/path tutorial? I've never used those functions before.

I'm unfortunately not equipped with any of the software you mention but I'll look into them and see if there's perhaps trial versions I can play around in!

Very much appreciate your time and helpfulness, thank you!


Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Steve Bentley on Feb 28, 2019 at 6:18:26 am

What version of AE and Element are you on? More recent AE's came with C4d lite (you may not even know you have it).
A chain of links or bunch of single links making a chain should be about the same horsepower needed. Its all geometry and 12 separate links takes the same geometry/memory as one object with 12 links in it. It might even be better as singles because you could turn off self reflections and just have the chain links reflect each other (assuming a shiny chain) wheas one big model would have to self reflect to see the other links. It might also be better because in Element each of those links is just an instance of the first one so even less memory is used.

I also got to thinking that BOA might be able to do this if you have it (if not have a look at aescripts.com)

Whats the chain made of (texture wise)? I got to wondering if there were other ways of doing this. 3D stroke might do it (assuming no rust and simple coloring) as might VC's free saber plugin (assuming a chain made of light). Particular can now do 3D objects so sprites generated along a moving spline might do the trick and then you assign the link objects to the sprites.

But again you should be able to use the cloner in Element to populate a single link (cloned) along a path and all you have to animate is the path. You could also tweak the clones over time to add a bit of secondary animation. It won't be as good as a set of real links in a dynamic simulation with collision and gravity turned on in C4D but it might do the trick.




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Rikk Wolf on Mar 1, 2019 at 3:58:51 am

Hey Steven, sorry for the radio silence. Had some other projects that needed attention.

I'm in After Effects CC 2017 14.2.0.198.

I'm almost embarrassed to say I had no idea Cinema 4D was now being bundled with After Effects. I do in fact have it and I'm poking around in it now. It sounds like a good option, though I'm completely unfamiliar with the software. I've been watching some tutorials in an attempt to familiarize myself with it.

The chain has a very simple "green glass" texture applied to it. Doesn't seem too system intensive but it does take quite awhile to render each frame.

Would making clones of individual chain links in Element 3D requite me to create different solid layers each with an instance of Element 3D loaded on them, or is there some way to do this cloning all on one instance of Element 3D in After Effects?

I'll keep trying to learn about splines/paths and looking into the C4D and Element 3D route for now.

As always, thanks so much for your time and willingness to help. Everyone on the project appreciates it. :)


Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Steve Bentley on Mar 1, 2019 at 5:14:48 am

All the links would be inside one instance of Element as an effect on one layer. And really its only going to be one true link with the others clones of that original. So the original is at 0,0,0 say, then clone A is moved down one chain link length along the path (less two chain link thicknesses) and rotated 90 degrees or so (you can build in some randomness so each link is not at a perfect 90 from the one before and the one after). There are settings for having the link "follow" the orientation of a path or motion. This means you may have to import the 3D link with its z axis pointing a certain direction (usually along its length).

Glowing glass is very doable in Element but it may or may not reflect and refract the other objects in your scene if they aren't inside the same instance of element as well. There are ways around this (environment maps for instance) but its not a single button operation.

As for C4D, by AE2017 it was pretty seamless as I recall by that point. You can either render the elements in C4d and import them to AE or import the c4d project into AE and have the entire project as a layer and use the C4D render engine to render it from inside AE. When you make a change to the C4d Project it updates in AE.




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Rikk Wolf on Mar 1, 2019 at 9:00:02 am

Hey Steven,

Thanks for the further info. Sorry my response is so brief but it's about 3:00am and I've gotta call it a night.

Dumb question - when we're discussing creating/cloning individual chain links in Element 3D, are we doing this in the Element 3D interface or doing it using the effects settings directly in After Effects? Image included to clarify.

I'll also keep watching tutorials on Cinema 4D. Im not much past figuring out how to import OBJ files and duplicating them on that front, ha ha.

Cheers mate,
Rikk




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Steve Bentley on Mar 1, 2019 at 8:37:26 pm

There are only a few plug ins that can bring in true 3d objects to ae (element, form, particular, zaxwerks etc) so there are limited ways to interact with objs and with the exception of Particular you are working within the environment of the plug in (to allow true 3D). I was thinking you could use the cloning system in element and do it inside element, but you might be able to do it with particular too. Not quite as much control but for a bullwhip-chain it should work. Emit the particles along the animated path with a zero velocity.
Now that i'm thinking about it, you could use the new masknode-to-null feature to extract points along an animated path (the whip) and then asign or emit objects from those points.
A problem I just thought of is that paths in ae are 2D. So you might have to use them on a 3D plane and then use LocalToGlobal coordinate conversion in expressions to tease out the true position of the "3D" path.
In the end I think this will be soooo much easier in c4D.




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Michael Szalapski on Mar 1, 2019 at 9:30:06 pm

You can use expressions to make layers in 3d look at each other. You'd want to use a null object in AE that follows the movement of his hands and tie the Element layer to it (one of my favorite Element features) and have that null point towards a null where the saw is located.

- The Great Szalam
(The 'Great' stands for 'Not So Great, in fact, Extremely Humble')

No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.


Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Rikk Wolf on Mar 1, 2019 at 10:39:32 pm

Hey Michael,

Perhaps I'm overlooking something simple but I also assumed the same. Unfortunately, it doesn't seem to work like that for me.

I do indeed have the chain parented to a null created from motion tracking the actor's fist. However, there doesn't seem to be anyway to tie the other end of it to my saw blade null/track point and get acceptable results.

I've attempted to pick whip things in Element 3D like "World Position XY", "Y Rotation" and "Bend" (under Deform) to the saw blade but it bizarrely pushes the chain in all kinds of strange directions. It can even push it completely off screen or wrap it around itself (picture attached).

Sometimes I get something that seems to move properly in 3D space but it's severely misaligned with the scene.




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Rikk Wolf on Mar 1, 2019 at 10:05:19 pm

Hey Steve,

Unfortunately Particular has developed a strange bug on my system, so I've been unable to use it for some time now. I'll see if I can get it fixed but simple uninstall and re-installs aren't doing it.

If I use Element 3D, can you clarify for me if I should be cloning the chain links in the plugin interface or approaching it directly in the After Effects controls (pic attached to previous post).

Sounds like it would be easier in C4D, I just don't have any experience with it but I'll attempt to remedy that.


Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Steve Bentley on Mar 2, 2019 at 12:29:25 am

Hey Rikk,
You have to think about it the other way round.
Element lives inside of AE is just a flat layer. So its best to send the values of the 3D AE null layers into the values of the objects (or "particle replicator positions" as Element calls them - under each "Group"). The position and rotation of those particles shows up in the effect dialogue for element. This wont be a simple pick whip thing for a number of reasons:

1) the position of objects in Element don't always relate as one might think to the outside world of your AE comp. So there's usually an offset that's required where you will add a constant value to the expression math you get from the null's position (which you could pick whip, but only to get the initial raw value of where the null is) to feed into the object's position in the Element effect dialogue.
2) for this kind of animation you can either use the cloning tool inside Element or as Michael pointed out (all refreshed with his new avatar - so that's why he's thinking so far ahead of the rest of us aging fx artists: he's soo young!), you can make what amounts to an IK chain with a set number of objects in Element - each would be in its own group. (the key to Ik chains is what the objects "look at" as they move around.) Again these are calculations you have to add into the expression that drives where the "particles" are positioned.

So while this is doable in AE, I think its' going to be easier in C4D for a bunch of reasons.
1) You can have C4D set up the IK for you and it just kinda works.
2) you can impart dynamics and self collision math with just a few buttons pushes - this is perfect for chains.
3) the data from the nulls and the camera and the lights in AE can be sent into C4D (and visa versa) so that everything lines up and you have targets to play with in your IK chain.
4) you'll probably have better luck with any depth effects (including penetration) like haze or blur.
5) you might also have better luck with the motion blur in C4d. When you get into expressions often the thing you want to blur isn't moving as far as ti appears to be so AE blurs it minimally.

Then the only decision is whether to have C4D render the chain and you comp the resultant frames in AE or you have AE do the C4D render for you and bring in the C4D project in as a layer in AE. Keep in mind that while you are getting the image of true 3D geometry in the C4D layer inside of AE, it's only a layer at that point and as such is flat. So if the chain goes into the distance, and there are other objects near the chain, the c4d layer will only overlap those AE objects that: are below it in the layer stack, or if the chain's layer (assuming a 3D layer) is above the zdepth assigned to the 2d "cards" of all the other 3d AE layers

I'm not sure if packages like DUIK (free by the way, but there are others) can do IK chains in depth or not but you could use them to animate dummies or nulls in AE and then get the data from those and pass the position and rotation data of each to element3D objects.




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Rikk Wolf on Mar 5, 2019 at 3:38:00 am

Hey Steve,

Thank you for the in-depth outline! I hope I've said how much I appreciate your time.

Alrighty, you've sold me on Cinema 4D. I've spent the last several hours watching tutorials to get the basics. I really like the simplistic interface.

I've built a chain with individual links each as their own objects in Cinema 4D Lite but I'm uncertain of how to proceed from here. I've searched for about 15 mins. on how to import my two null objects (one tracked from the actor's fist, one from the saw blade I need to attach the other end of the chain to) into C4D but everything I find online is centered around taking data from C4D into After Effects, not the other way around.

I'll keep searching for tutorials that apply to my situation. I'm really anxious to see this IK system at work.




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Steve Bentley on Mar 5, 2019 at 3:43:54 am

There's now an export function in AE. (file/export/C4D (different versions have the list menu item listed differently).The objects have to be 3D solids or nulls or lights or cameras. Make sure to label them and having different colored solids helps you see them in C4D too.
That creates a project that you can open in C4D and the exported objects will dance around in time inside C4D.
One thing of note. For things like expressions you sometimes have to collapse the expression into keyframes to get the export to give out the animation info to C4D.
Make sure to use the camera from AE in C4D too so you are looking through the same lens. And the AE comp size has to match render size in C4D.




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Steve Bentley on Mar 5, 2019 at 3:51:54 am

Once you have everything working in C4D you can either import the C4D file as a layer into AE and have AE render the whole thing for you or render out the C4D file (through the imported camera from AE) and bring those frames in as a layer into AE.

You can also bring the C4D project (via the render settings Compositing Project File under Save) into AE as you work to check progress and how things are lining up inside AE You must put an external compositing tag on any object in C4D that you want to export and these will show up as nulls in AE (assuming you just want to check animation and position and not actually render) only cameras and lights will come in as actual 3D objects. You can color each exported object in C4D with the external compositing tag so you know what object is what in AE. With this you are just checking the anchor points and how they move, no objects actually get exported.
The "project" you open in AE from this process shows up as a comp and you have to dive into the comp, pull the items out of the comp and place them in your master comp so everything lives together in the same "space" You won't need the camera or lights.




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Rikk Wolf on Mar 5, 2019 at 11:21:18 pm

Hey Steve,

I've had some luck getting things into C4D from After Effects and while my nulls transfer over, unfortunately, their motion or "position" data is not showing up in C4D.

To try an' fast track this and wrap things up, I decided to shoot a quick video showing preciously the issue. Should be faster and more accurate than describing things in text.

Here's the link: https://youtu.be/iA1hTG1G0vw

In the meantime, I'll read over your previous instructions to see if I missed something. Thanks again!


Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Steve Bentley on Mar 5, 2019 at 11:35:05 pm

hard to see which null is the tracker null but it looks like it might be 2D only? If that's the case thats why they aren't showing up. You can only export 3D nulls and solids to cinema.
Could that be it?? We can make that null 3D and not loose the data which would fit it. But it still is not moving in depth, just in x and y.
Just thought I'd blast that off quick and it might help - going to watch the rest of the vid now




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Steve Bentley on Mar 5, 2019 at 11:42:46 pm

Wanna upload the AE project? (I don't need the footage) and I'll see if there is something obvious that's not working right. Depending on the version of AE and C4D the export and import can work a little different. For some stuff I even have to import files into AE5.5 and then convert it to 2019. I currently have 3 different exporters for C4D inside of AE that I use depending on the case.
See if there's a version of C4D under help ( i know its lite but I don't want to send back a file thats too new for your version. )




Re: Parenting the Separate Ends of a 3D Object to Two Different Nulls?
by Rikk Wolf on Mar 6, 2019 at 5:52:13 am

Yeah, my nulls were given motion track data from only X and Y movement. To be honest, I don't know how you even track movement in Z space. By tracking "scale" from the motion tracker?

I am totally willing to share the .aep file with you but I'll need to give you the download link privately. Hit me up at wolf.rikk@gmail.com and I'll send you the file.

Super cool of you to offer, I can't thank you enough. I would've never thought something like this would be so complicated. Cheers!





© CreativeCOW.net