Question

i have a large world map composition (lets say 20000px wide) that i have placed null objects on as country locators.

i then place this oversized comp into a 1080p master compositon, and ant to move it about, scale it etc and be able to get the position of my country nulls and convert them to the smaller compostions' co-ordinate space - allowing me to have the map scale but keep text sizes the same (because if i just pickwhip the text to the precomp, the fonts get smaller when i scale the map)

i have tried using an expression:

comp("worldMap").layer("france").position

but this purely gives me a static co-ordinate exactly the same as the worldmap comp (say [2000,8000]) - i've also tried multiplying this by the scale of the map (decimalised) etc but nothing seems to let me convert the nulls position to the local comps space.

Was it helpful?

Solution

It sounds like you might want to look into the layer space transforms methods "toComp" and "fromComp".

Have a look at Chris and Trish Meyer's explanation. They explain things great. http://provideocoalition.com/cmg_keyframes/story/dmoe4_space_conversions/

Additionally, as much as I love Stack Overflow, this could be an appropriate question for the Creative Cow forum. forums.creativecow.net. Hope that's helpful.

If the toWorld and fromWorld don't work exactly as planned, you could also interpolate with the linear() method which will give you proportions. linear(yourBigMap, 0, 1920, 0, 20000) and that would read like "take my big map and scale anything between 0 through 1920 to 0 through 20000. I use linear all the time for proportions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top