-
Trying to make some even ultimater CCSphere expressions
Hi cows,
I am working with some ultimate CCSphere expressions found here:
These expressions are great, but I would also like to scale my CCSphere’s radius as I dolly in, and pan my CC sphere as I pan the camera.
I managed to get the sphere radius scaling working pretty well with this expression:
d = length(thisComp.activeCamera.pointOfInterest, thisComp.activeCamera.position);
r = 100;
a= 2*Math.acos(r/d);
1000*r*Math.cos(a/2)I’m having major problems translating the camera’s POI to CCSphere’s 2d offset though.
My CCSphere layer is a much higher resolution from my comp (so I can zoom way in)
Comp is 1080p Sphere layer is 8192×4096The best I have gotten is inelegent expression:
POI = from_comp(to_comp(thisComp.layer(“Camera 1”).transform.pointOfInterest));
[8192-4.26667*POI[0],4096-3.7926*POI[1]]For reference, I placed a 3d text layer at the origin of my 3d scene, [960,540,0]. Ideally, I would like the sphere to center to appear married to that text layer when I pan the camera, but I can’t get it to work.
Any suggestions?
Thanks,
-Matt
Need a quick break from motion graphics?
Try my game Constellation at:
https://www.paperdragongames.com