ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Comp camera w. BCC or CC Spheres..expessions?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Eric Steinberg
Comp camera w. BCC or CC Spheres..expessions?
on May 13, 2005 at 9:32:08 am

Greetings!

In addition to the CC Sphere plugin that comes with AE, I also have BCC's (Boris Continuum Complete) Sphere plugin. Neither of these have a checkbox for "Use Comp Camera", like Zaxwerks and Trapcode's plugins have. I have too many crash problems with Invigorator to use it (separate post on Zaxwerks forum), so I'm wondering if there is a way (expressions?) to make the sphere's created by CC or BCC be integrated into AE's 3D world, camera and lights. I'm working on a universe/solar system animation, and I've created a 3D starfield with Trapcode's Particular. The starfield responds beautifully to my AE camera's animation, but how can I integrate sphere's (planets) into this 3D space? I have a feeling there is a need for expressions, but I am an expression novice, and never seem to have the time to learn the language. I am willing to consider other 3D plug-ins that can be affected by AE's camera, but I don't know what plug-in that might be. As always, all help and advise is highly appreciated!

Kind regards,
Eric


Return to posts index

Scott Spengler
Re: Comp camera w. BCC or CC Spheres..expessions?
on May 13, 2005 at 5:35:03 pm

Eric,
In Trish's "AE in Production" she's got a project called "Postcards in Space" that uses CC Sphere and expressions to do exactly what you're looking for. It works great. Unfortunately I can't seem to track down my disk with the expression on it.

Maybe some other kind soul could copy and paste it from their disk. Or you could just run down to the bookstore and grab a copy.

It's a drag that Sphere and Cylinder didn't get the "Camera Comp" treatment. Just an oversight at Adobe is my guess. Should be squared away in 7.0.

Sorry I couldn't be more help this time. Good luck.


Scott_Spengler


Return to posts index

Filip Vandueren
Re: Comp camera w. BCC or CC Spheres..expessions?
on May 14, 2005 at 12:23:04 am

Hi here are the xpressions for the x y and z rotations, for CC sphere, I'm still working on the expression for Light height & direction,
when it comes to vector math, I'm a trial and error guy


Return to posts index


Filip Vandueren
I was oh so tired & oh so wrong 8-) -- Final expressions
on May 14, 2005 at 3:00:57 pm

Few,

this kept me up all night. When I've got a challenge like that I, just can't sleep untill it's done 8-)

Here are the correct expressions for X, Y & Z-rotation:


CC Sphere Rotation X:

// change camera & effect names as needed...
campos=thisComp.layer("Camera 1").toWorld([0,0,0]);
planetpos=thisLayer.toWorld(effect("CC Sphere")("Offset"));

x=length([planetpos[0],planetpos[2]], [campos[0],campos[2]]);
y=campos[1]-planetpos[1];

alpha=Math.atan2(y,x)

value+radiansToDegrees(alpha) ;

CC Sphere Rotation Y:

// change camera & effect names as needed...
campos=thisComp.layer("Camera 1").toWorld([0,0,0]);
planetpos=thisLayer.toWorld(effect("CC Sphere")("Offset"));

x=campos[0]-planetpos[0];
y=planetpos[2]-campos[2];

beta=Math.atan2(y,x)

value+radiansToDegrees(beta) - 90;

CC Sphere Rotation Z:

No expression



And here are the expressions for the light. (they're still not 100% accurate; but they're close)
It _will_ generate an error if your sun is at the exact same position as a planet, but hey, I think Steven Hawking would say that's just normal ;-)

Step1: create your lightsource, and make it an adjustment layer, make sure all the planets are above the light-adj., because we want them to be only lit by the CC Sphere plugin, not receive light. If there are other 3d-layers that do need the shading, put them below the adj.-light.
You can just pickwhip the light color and light-intensity from the lightsource to the light-settings of CC Sphere.


CC Sphere Light Height

// change camera & light names as needed...
campos=thisComp.layer("Camera 1").toWorld([0,0,0]);
planetpos=thisLayer.toWorld(effect("CC Sphere")("Offset"));
sunpos=thisComp.layer("Light 1").toWorld([0,0,0]);

camvector=normalize(campos-planetpos);
sunvector=normalize(sunpos-planetpos);

angle=Math.acos(dot(camvector, sunvector));

100 - (angle/Math.PI)*200

CC Sphere Light Direction

// change light name as needed...
thesun=thisComp.layer("Light 1");
xy=thisLayer.fromWorld(thesun.position) - effect("CC Sphere")("Offset");
angle=Math.atan2(xy[1],xy[0]);
radiansToDegrees(angle) + 90;



Return to posts index

Eric Steinberg
Re: I was oh so tired & oh so wrong 8-) -- Final expressions
on May 14, 2005 at 4:42:13 pm

Wow! I am so grateful for your efforts! I'm having some family stuff to attend to, so I probably won't be able to try this until wednesday, but I am looking forward to trying it as soon as I can! I will post how it went, and once again: Thank you, thank you, thank you!!

Kind regards,
Eric


Return to posts index

Nicholas Bentley
Re: CC Sphere Lighting Linking to Comp Camera/Light
on Apr 23, 2009 at 1:39:41 pm

So the Expression works really well but I'm trying to do something with it and it doesn't seem to be working for me.

Maybe it's not possible but I thought this is the place to ask if it is.

I'm trying to add multiple cc sphere to a 3d composition and link the lighting controls of each cc sphere to lights in the comp.

The problem is when I duplicate the cc sphere solid and set it back in z space behind another sphere the lighting controls seem to not be able to register the fact the light is being blocked by the sphere in front.

(see images)

after effects preview image

after effects timeline

I don't know 3d, otherwise I'd do it in that way, I'm just trying to find a way to create the illusion of fake 3d for a project I'm currently working on.

Also I'm trying to find a way to make the balls seem a bit reflective (reflecting other balls from the same comp in the surface - as if they where marbles/glass

QUESTION:

1. is it possible to have the lighting controls recognise objects partly blocking the lighting source?

2. how can i make these spheres look more reflective looking/shiny/glossy/marble like.


Advanced thanks for reading this post. Hopefully someone can help out or at lease point me in a decent direction.

Big time thanks!

Nick



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]