Activity › Forums › Adobe After Effects Expressions › Spotlights attached to sphere
-
Spotlights attached to sphere
Posted by Lars Bunch on October 22, 2007 at 10:55 pmI have a globe made from CC Sphere. I want to place spotlights on it
Rutger replied 18 years, 6 months ago 2 Members · 1 Reply -
1 Reply
-
Rutger
October 23, 2007 at 1:23 amHello Lars,
Interesting idea. I would probably not use CC sphere for the position of the lights. Although it is very powerful, I have learned the hard way that when it comes to a rotating object, that CC sphere shows some unrealistic behavior. (see my Billiard pool ball question posted earlier). But, I would use it to render the earth itself obviously.
I have never done a sphere with lights, but…I have done a very similar excercise where I had 30 or so lights in a circle pointing at a moving text in 3D. If you create a composition and add a spotlightlight. Then you create a null (named “Light Controls”) with a slider control named “Number of Lights” and a second control “Radius”. You can give in the following expression for position of the light (you may have to tweak it a bit):
x=272+thisComp.layer(“Light Controls”).effect(“Radius”)(“Slider”)*Math.sin(Math.PI*2*index/thisComp.layer(“Light Controls”).effect(“Number of Lights”)(“Slider”));
z=-500+thisComp.layer(“Light Controls”).effect(“Radius”)(“Slider”)*Math.cos(Math.PI*2*index/thisComp.layer(“Light Controls”).effect(“Number of Lights”)(“Slider”));
y= thisComp.height/2;
[x,y,z]create a second null “Light Point of Interest” and give in the following expression for Point of interest for the light:
thisComp.layer(“Light Point of Interest”).transform.positionNow copy the light 30 (or n) times. You should see a circle of light after you apply Lux to the Composition.
Now to create a rotating circle you should probably create a 3rd null that is at the center of the circle and parent all the lights to this null, then you can simply rotate the entire circle by rotating the null.
Now you should be able to remove some of the lights (and replace them with nulls to keep the index count the same).
Now, I have not turned this into a sphere yet, for that I would probably adapt the following post by oscarus on http://www.aenhancers.com https://www.aenhancers.com/viewtopic.php?t=160&highlight=sphere
Not sure if it will work, but that’s how I would go about it. I hope this helps.
Rutger
Reply to this Discussion! Login or Sign Up