Page 1 of 1

worldPosition from a nested Comp after collapseTransforms

Posted: November 5th, 2015, 5:12 pm
by drblacksnake
Hi aEnhancers,
Could anyone tell how to access world position of a 3D Null, which is located inside another nested 3D comp with collapseTransforms?

Basically, I have this one mechComp with bunch of animated 3D layers that form some sort of machinery (animated: rotation+scale); then there is the mainComp with bunch of 3D layers that form environment, and there that mechComp is also nested as layer (3D, collapseTransforms=ON, animated: translate+scale), and I need to attach pointLights to it's exhausts in order to generate particles with Particular. Unfortunately, as the parts inside mechComp move, the light in mainComp stays parented to a single position.

I parented 3D nulls to each end of exhausts, in hopes that some to/fromWorld's will catch it, but results are really out of place.
For pointLight position I tied to adopt 3D Corner Pin expression from Dan Ebbert's site, which was something like:

Code: Select all

s = comp("mechComp").layer("exhaustNull")
fromWorld(s.toWorld(s.anchorPoint));
Obviously, because of collapseTransform something is missing between fromWorld and toWorld, but what?

Re: worldPosition from a nested Comp after collapseTransform

Posted: November 11th, 2015, 5:17 am
by drblacksnake
Ok, this time I got around by just parenting emitter lights to the mechComp layer in the envComp - this way the light "moved" into mechComp world and was getting around with toWorld, and then the Particular did its tacking magic.