3D follow path technique

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Defims
Posts: 19
Joined: Sun May 30, 2010 11:34 am
Contact:

3D follow path technique

Post by Defims »

Hi , I am Defims, a chinese moho fan, and I always learn techniques here , and now I'd love to share something about 3D follow path technique.

I found this interesting method to solve body turn after I learn Selgin's way to solve this problem in this post,and maybe it will be a new way to making animation. :D

and these are some Renderings:

Image


Image




Now, I will explain how it works step by step,and hope someone can help me improve this technique. :D




---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

First of all , we can understand "follow path" better from the picture below.And I think some points should be figured out:
  • follow path layer can be rotate in 3D environment.
  • 3D-rotating "follow path" can make the action layers works awesome ,even the layer sort problem can be automatically solved with "sort layers by depth" option.
  • with “rotate to follow path” option the action layers will works like 3D objects.
regard the 2Dlayers as transparent paper.Just imaging that When the transparent papers facing you are moving and rotate Z in the 3D space , you will rergard the whole as a 3d object.That's a interesting theory come from this site which I found it in LM forum.


Image

and the anme file




---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Secondly , After we understand the principle of 3D follow path,we can do more with it .
Organized our thoughts,we can conclude that follow path can be regard as 3D line which will be a simpler one for us to operate it than 3D object.And the layers binded to follow path can be regard as 2D paper,which means 2D papers will move to the right position when 3D line rotating or moving.

So , we can regard the 3D line as bone or auxiliary line ,which means we can apply the charactor's action to the 3D line, and the 2D papers will move and rotate right automatically. and I make a similar one as the example in Selgin's tutorial:

Image

Image

and the anme file

As we can see that with the "sort layers by depth " option selected , the depth problem can be solved automatically,isn't it awsome?
tips:the black lines above are 3D lines in "follow path" group. :)




---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thirdly , we can make a more complex one ,and what we will know is that the follow path can be reused so easy,thought it is complex.That means when we complete an action like walking , dancing , fighting or others, just import the follow path group and bind the new chacractor , and then ,it works fine.awesome? isn't it.

So , I make a prototype one:

Image

and the anime file

As we see , the left one is "bones",after we finish a new bone action ,we can apply it to the other one easily.And an interesting thing is , because the bones are 3D line ,we can rotate the whole on the walk action ,yes ,we can use the 3D skill on the 3D lines:

Image
Tip: only the follow path group has animation , all the others' animation are generated . it's awesome.

here I am so exciting about the seperation of action and character set, As we know ,it is difficult to do the two parts the same time,but with 3D tool ,we can make action so easy,even more,the Video tracking can be use to generate the action , and if someone write a script to translated the universal action file like .bvh to the AS one,the world will became so bright. :D
Just imaging that an animation task come , the storyboard,the action library and character set can be work the same time. woo~ :D




---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

fourthly , we can find out that some detail still imperfect in the prototype above, what i want to say is that using the 3D line to handle the overall , and the 2D paper to handle the detail just like the tradition animation draw.
but,some deeper thought somes out ,when facing the detail problem. All we know is character set complete a character's different angle apperance,so two solution comes out:
  • use the blend morphs to generate the 3D line animation and the 2D paper animation.
  • use an script to bind blend morphs and 3D line layer 3D rotate,which means the 2D paper will be applied blend morphs automatically when 3D line is rotated .
for the first solution, it works find ,but still a lot of works to do .
and here is my ugly script for the second solution, hope someone can help me finish it .

and this post still modifing,and please give me hands to improve this technique. :D

one more thing,in my opinion, combining 3D and 2D is a fantasy way for us to mak animation, acquiring 3D's and 2D's strong points, for example, 3D can handle perspective easily,with 2D techniques you can just draw pictures, and it just mixed the 3D and 2D ,that is what i regard as the moho's spirit. hah~
Last edited by Defims on Fri Jun 29, 2012 3:40 pm, edited 4 times in total.
Poptoogi
Posts: 287
Joined: Mon Sep 06, 2010 5:03 pm

Re: 3D follow path technique

Post by Poptoogi »

Defims,

This it really really amazing stuff! I don't understand all the technical aspects of the technique but from looking at your examples as well as taking another look at Selgin's body rotation and the video link to the 2.5 models I'm very excited to see what comes out of this!!! The possibilities are amazing!!!!!! Thanks for sharing this! Very much appreciated!!!!!
Practice random acts of kindness and senseless acts of beauty! Pause, consider, do! I dare you!
Defims
Posts: 19
Joined: Sun May 30, 2010 11:34 am
Contact:

Re: 3D follow path technique

Post by Defims »

guyver93 wrote:Defims,

This it really really amazing stuff! I don't understand all the technical aspects of the technique but from looking at your examples as well as taking another look at Selgin's body rotation and the video link to the 2.5 models I'm very excited to see what comes out of this!!! The possibilities are amazing!!!!!! Thanks for sharing this! Very much appreciated!!!!!
I am trying to explain how it works ,but it still seems to be a hard work. and I will try my best to reply for explaining the part whoever don't understand. :D Hope someone can help me to improve this technique.
User avatar
Barry Baker
Posts: 342
Joined: Fri Aug 27, 2004 6:58 am
Location: UK
Contact:

Re: 3D follow path technique

Post by Barry Baker »

I think everyone must be looking through the examples and reading the text, trying to figure out how your system works. I spent a while last night, but I'm not sure I understand it yet. It looks fascinating, but I'm yet to be convinced that a practical 2.5D animation technique will come out of it - I mean one that can be easily used without a lot of fine tweaking and work-arounds.

I think you have done an amazing job of descibing something so difficult to explain in another language from your own, and I am really interested to see how this will develop. I'm afraid I'm not a scripter, but I will continue to study the examples.
acid breakdown
Posts: 40
Joined: Thu Dec 15, 2011 8:36 pm

Re: 3D follow path technique

Post by acid breakdown »

.
Last edited by acid breakdown on Tue May 09, 2017 2:32 pm, edited 1 time in total.
rocky53204
Posts: 223
Joined: Sat Sep 03, 2011 3:34 am

Re: 3D follow path technique

Post by rocky53204 »

Be proud, great mind at work! I see the issue with the script, but, cannot help with that. I have posted a link to the other forum which has more 8.2 users in hope they can help. Good job, good examples, best wishes!
Defims
Posts: 19
Joined: Sun May 30, 2010 11:34 am
Contact:

Re: 3D follow path technique

Post by Defims »

rocky53204 wrote:Be proud, great mind at work! I see the issue with the script, but, cannot help with that. I have posted a link to the other forum which has more 8.2 users in hope they can help. Good job, good examples, best wishes!
thanks for helping , the main idea of the scipt i want to write is "bind" the actions to the follow path , which means like this:
when i 3D rotate the 3D line , the 2D paper can be applied blend morphs immediatly,
for example 3D line rotateX 45deg ,2D paper will be applied 50% of the "x90" action

if it has been writed , we can ratate the 3D line as the real 3D bone , and the 2D paper wiil chang to the right pose immediatly. :)
and my problem right now is i have no idea of getting an layer's full 3D rotate value ,the "GetFullTransform" api i found in moho8.1pkg_moho.lua_pkg is the near one to get the final 3D rotate value,but i don't know how to generate the 3D rotate value from the matrix the api return .
rocky53204
Posts: 223
Joined: Sat Sep 03, 2011 3:34 am

Re: 3D follow path technique

Post by rocky53204 »

I had hoped to see some follow up on this technique...
The concept has great promise.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Re: 3D follow path technique

Post by Genete »

and my problem right now is i have no idea of getting an layer's full 3D rotate value ,the "GetFullTransform" api i found in moho8.1pkg_moho.lua_pkg is the near one to get the final 3D rotate value,but i don't know how to generate the 3D rotate value from the matrix the api return .
I'm a bit rusted with my maths but what you have returned from GetFullTransform is a 4x4 matrix (yes, 4x4 because the transformations matrix needs one extra row to not distort the unit length.

So if you pretmultiply a matrix by a unitary vector you get the unitary affection of the matrix to that vector. Simply apply the matrix to a vector with a known rotation angle and it will return a vector with the rotated angle. Comparing the angles of the original and the transformed vectors then you get the transformation value.
Typically you apply the matrix to the unitary vectors aligned to each axis to see what's the orientation of the transformed three unitary vectors. In other words, say you have x,y,z three unitary vectors then the result of M*x, M*y and M*z that gives u,v,w vectors. Compare the resulting relative angles between u,v and w and you'll see what's the kind of matrix deformation returned. Typically, if the object rotates as a rigid solid, u,v and w would keep the same relative angles and lengths but their global orientation in the global 3D space would have change.

And that's enough for my brain today.
-G

http://www.fastgraph.com/makegames/3drotation/
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Re: 3D follow path technique

Post by heyvern »

I have a question about this technique. It does not use bones at all correct? You animate layers by moving points in the Follow Path yes? The script is needed to apply layer rotation from actions that define specific angles? So if you rotate a "Follow Path", the script will use the matching action to rotate the following layer?

The hard part about understanding this is that it seems like magic. It is doing stuff and I can't understand completely why or how it's doing it. :)

What about this scripting idea:

Manipulate path layers with bones in 3D. The bones would represent an "imaginary" 3D space. So if you scale and rotate a bone as if it was locked at the base and spinning around in 3D space (based on scale as the z axis). Scaling and rotating the bone would apply a "matching" rotation to the layer.

The only reason I suggest this is that animating using LAYERS or VECTORS as BONES is not the easiest way to animate. I could have completely misunderstood the concept here.

-vern
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Re: 3D follow path technique

Post by heyvern »

Aha!

It makes sense now. The script would need to SCALE the body part layers to match the LENGTH of the path it's following. Follow path is great but it should also change scale of the layer to account for perspective distortion. I tried manually changing layer rotation to change the orientation of the legs and arms that "pop" out during some parts of the animation, but this doesn't work well.

Layer SCALING works much better than additional rotations for the perspective effect. The rotations tend to "pop" out and do odd things. The script should apply scaling to one or more axes to create the illusion of perspective and maintain the connection of the body parts. This layer scaling needs to be based on the "visual" length of the path in the view. the 2D "length" of the path. The layer is following the path as it appears on the screen. At extreme angles that length appears to be longer or shorter, but this length is a 3D perspective distortion.

The really hard part would be to determine this "visual length" in order to scale the layer.

-vern
rocky53204
Posts: 223
Joined: Sat Sep 03, 2011 3:34 am

Re: 3D follow path technique

Post by rocky53204 »

Cowabunga! The big dogs are out! I too am still trying to wrap my head around this.

A simple example of follow path rotation...
A realized stroke with three points looks like a piece of paper when extruded. As it follows the (rotating) path you can clearly see both sides of the paper.

ANME: https://dl.dropbox.com/u/65307694/3D%20 ... 0path.anme

OOps! In the original file I uploaded I failed to use the version where I rotated the path.
If you saw that and thought me odd, perhaps the corrected version will make it clearer. (or, I shall remain odd...)
Defims
Posts: 19
Joined: Sun May 30, 2010 11:34 am
Contact:

Re: 3D follow path technique

Post by Defims »

heyvern wrote:I have a question about this technique. It does not use bones at all correct? You animate layers by moving points in the Follow Path yes? The script is needed to apply layer rotation from actions that define specific angles? So if you rotate a "Follow Path", the script will use the matching action to rotate the following layer?

The hard part about understanding this is that it seems like magic. It is doing stuff and I can't understand completely why or how it's doing it. :)

What about this scripting idea:

Manipulate path layers with bones in 3D. The bones would represent an "imaginary" 3D space. So if you scale and rotate a bone as if it was locked at the base and spinning around in 3D space (based on scale as the z axis). Scaling and rotating the bone would apply a "matching" rotation to the layer.

The only reason I suggest this is that animating using LAYERS or VECTORS as BONES is not the easiest way to animate. I could have completely misunderstood the concept here.

-vern
I doesn't use bones with follow path layer instead, and I animate layers by rotating the follow path layers.
Since the follow target layer are binded to follow path layer , I just rotate the follow path layer ,and I get the first three example.

but as you can see , it's not perfect. we can , Of course ,move the target layers' points to make it perfect,but,what I want is an easier way to handle the details - combine the target layers' actions, like Rudiger's Morph Dial ,the difference is Morph Dial use the bone to manipulate the action , but I want to use the follow path layers by rotating them. In other words, when I rotate the follow path layers, the target layer will have layer animation and morph animation. the former will fire natively after we bind them, the latter will fire when we apply the scripts. :)
Defims
Posts: 19
Joined: Sun May 30, 2010 11:34 am
Contact:

Re: 3D follow path technique

Post by Defims »

Genete wrote:
and my problem right now is i have no idea of getting an layer's full 3D rotate value ,the "GetFullTransform" api i found in moho8.1pkg_moho.lua_pkg is the near one to get the final 3D rotate value,but i don't know how to generate the 3D rotate value from the matrix the api return .
I'm a bit rusted with my maths but what you have returned from GetFullTransform is a 4x4 matrix (yes, 4x4 because the transformations matrix needs one extra row to not distort the unit length.

So if you pretmultiply a matrix by a unitary vector you get the unitary affection of the matrix to that vector. Simply apply the matrix to a vector with a known rotation angle and it will return a vector with the rotated angle. Comparing the angles of the original and the transformed vectors then you get the transformation value.
Typically you apply the matrix to the unitary vectors aligned to each axis to see what's the orientation of the transformed three unitary vectors. In other words, say you have x,y,z three unitary vectors then the result of M*x, M*y and M*z that gives u,v,w vectors. Compare the resulting relative angles between u,v and w and you'll see what's the kind of matrix deformation returned. Typically, if the object rotates as a rigid solid, u,v and w would keep the same relative angles and lengths but their global orientation in the global 3D space would have change.

And that's enough for my brain today.
-G

http://www.fastgraph.com/makegames/3drotation/

I have try this thinking , but unfortunately, I don't know how to apply the matrix to vector, you mean LM_Vector3 ? after I apply it , how can I get the rotateX rotateY and rotateZ value ?
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: 3D follow path technique

Post by chucky »

Image
I tried something similar a couple of years back.
viewtopic.php?f=9&t=12429&start=15
Post Reply