Activity › Forums › Adobe After Effects Expressions › 3D curves and surfaces mathematically defined
-
3D curves and surfaces mathematically defined
Kalleheikki Kannisto replied 7 years, 3 months ago 2 Members · 31 Replies
-
Kalleheikki Kannisto
April 6, 2019 at 3:43 pm[Nicolas Guionnet] ” I really don’t know how to go from my usual expression defined curves ( defined with : x(t) = … ; y(t) = … , z(t) = … ) to a set of lights … “indicating” the way”
It works the same way. You just use x(time), y(time), z(time) for the position of a single light. The position over time of each light becomes a separate path.
Kalleheikki Kannisto
Senior Graphic Designer -
Nicolas Guionnet
April 6, 2019 at 5:49 pmThanks Kalleheikki,
I first thought : That’s it ! … then came another question :
How can you animate the path then ? … as the time variable already defines the path … and the problem is the same in Trapcode and Stardust … -
Kalleheikki Kannisto
April 6, 2019 at 6:13 pmYou have to draw the entire shape in one frame, using particles with a life span of one frame and then draw the next stage of the shape in the next frame, etc.
Works just fine in Particular, where I’ve done it many a time. Haven’t tried in Stardust, but should work the same.Kalleheikki Kannisto
Senior Graphic Designer -
Nicolas Guionnet
April 7, 2019 at 9:59 am> “You have to draw the entire shape in one frame”
Well, I don’t really get it.
I could do it with a 2D shape (drawn in a layer with some simple expressions with a loop on createPath and depending on time). But I need a 3D curve …
And everywhere I saw a 3D curve defined with a mathematical function it was this way : x(time), y(time), z(time) with time as variable … and to animate it I would need this :
x( time , lamdda ) , y( time , lamdda ) , z( time , lamdda )
… where lamda is a parameter changing the curve …BUT … to animate the curve I need to change lamdda : labda = lamdda(time) … and I don’t think it is possible to tell Trapcode or Stardust : “draw the curve acting as if lamdda was a constant.” … and animate lamda “under the table” hidden from Trapcode or Stardust ….
I begin to think that the only way to do this is outside of AE : Blender Script and then import the OBJ … but what a pain in the … hips … to animate it and synchronize it with the audio …
-
Nicolas Guionnet
April 7, 2019 at 4:00 pm(Not being able to) Animate a 3D curve with TAO
I finally installed Trapcode trial and tried to use TAO to animate a 3d curve.
I used a light to draw my 3D-curve. In fact, it is a series of 3D Curves concatenated (tricky) … that would be used for the animation.
I just needed to find a way to tell TAO to :
Draw only a part of the curve, the one for :
lambda < time < lambda + myComp.frame.duration
(… and then animate lambda.)It seems there is no way in TAO . I could try to implement a kind of non-robust hacky floppy tricky workaround using … size offset to reveal only the wanted part of my curve and animate it. But … no
Let’s try Stardust
-
Kalleheikki Kannisto
April 7, 2019 at 6:36 pmCan you give an example formula that you want to use? Would be easier to sort it out.
Kalleheikki Kannisto
Senior Graphic Designer -
Nicolas Guionnet
April 7, 2019 at 9:06 pmI think I am going to try Particular, in the way you described up there. As you said, Stardust has no real documentation …
An example formula ? A nice one :
x(t) = 100.exp ( – (t-5)² . lambda ) . cos (10*t)
y(t) = 100.exp ( – (t-5)² . lambda ) . sin (10*t)
z(t) = 20t0 < t < 10
0 < lambda < 30 -
Nicolas Guionnet
April 7, 2019 at 9:35 pm… and I forgot to say that lambda is the parameter to be animated.
-
Kalleheikki Kannisto
April 8, 2019 at 8:33 amNot sure if I’m interpreting this right, but here’s what I got for the light position:
fps = 1/thisComp.frameDuration;
t = Math.floor(fps*time)/fps;
cur_frame = time*fps;
lambda = cur_frame%1*30;
x= 100*Math.exp(-(t-5)*(t-5)*lambda)*Math.cos(10*t);
y = 100*Math.exp(-(t-5)*(t-5)*lambda)*Math.sin(10*t);
z = 20*t;
[x,y,z]With 30000 particles per second and a particle life of one frame, I get something that looks like this (a still from early in the animation). This shape unfurls along time.
Kalleheikki Kannisto
Senior Graphic Designer -
Nicolas Guionnet
April 8, 2019 at 10:52 amGreat ! Great ! !
It’s such a relief for me to see it is finally possible.
You did it with particular, didn’t you ?I went to bed yesterday, really late, deducing from my failureS that it was not possible, which is really vain, for after 3 hours of work on a piece of software like Particular, you can’t deduce much of its real possibilities.
Now, I am on my way to (try to) reproduce your success …
Thank you so much Kalleheikki …
Reply to this Discussion! Login or Sign Up
