Page 1 of 1

how to get _effective_ pixel dimensions of scaled solids?

Posted: July 15th, 2019, 9:21 am
by Fishdriver
hi folks,

I am building a 2.5d "interior set" for an AE camera to fly thru. I've made it out of placeholder solids which have been scaled, mostly non-proportionally, to fit the dimensions of the space.

I'd like to replace the placeholder solids (walls, ceiling, etc) with Photoshop texture files of appropriate pixel dimensions, and I need to figure out what those dimensions are so that I can avoid squashing or stretching the textures -- ie, bring them in at 100% proportional scale.

Is there a way I can retrieve the "effective" X & Y dimensions of each solid, based on its original dimensions & applied scale, without calculating them all by hand?

Re: how to get _effective_ pixel dimensions of scaled solids?

Posted: July 18th, 2019, 7:13 am
by Fishdriver
courtesy of Dan Ebberts:

Code: Select all

L = thisComp.layer(index + 1);
r = L.sourceRectAtTime(time,false);
sX = L.scale[0] / 100;
sY = L.scale[1] / 100;
text.sourceText = [ r.width * sX , r.height * sY ]
put that in the Source Text of a text layer, then put the source layer directly above the layer you want to measure.