Direction of a Morphed mesh Point
Posted: 16 June 2021 02:02 PM   [ Ignore ]  
Total Posts:  52
Joined  2018-08-27

Is there a way to get a rotation or direction of a mesh point using Xpresso? I have a mesh with no joints that I use point morphs to change its direction, like a human finger. Think of it like wanting to have lighting bolts shoot out the end of the finger tips and you want the lighting bolts shoot out the direction the finger tips are. I’ve used the Xpresso point node to get the finger tip position, but can’t figure a way to find the direction its point to.

Profile
 
 
Posted: 16 June 2021 02:45 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
Total Posts:  10500
Joined  2011-03-03

Hi brucek5,

Will this work?

File
https://www.amazon.com/clouddrive/share/0YAhQOF7YdosXouXtQIY82ekc2NvWywdRTuG5Sfchxy

I have used joints here, but the joints’ two positions could be points on an object.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 16 June 2021 03:15 PM   [ Ignore ]   [ # 2 ]  
Total Posts:  52
Joined  2018-08-27

Hi Dr.Sassi,

Did you mean to send me a link to a FBX file of a cone?

Profile
 
 
Posted: 16 June 2021 05:42 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
Total Posts:  10500
Joined  2011-03-03

Certainly not brucek5.

I’m so sorry. I should always double-check.
No excuse, but it was just a busy long day.
Following the 3D Motion & Design show, while trying to figure out what to answer here and watching (well clicking through) parallel tutorials based on another question.
Again, no excuse. I should know better.

I have updated the link. Checked it. I hope it works for you.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 16 June 2021 10:53 PM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
Total Posts:  10500
Joined  2011-03-03

P.S.: Here with Posemorph points.

The Constant in the Xpresso sets the distance.
The Random Effector animates the “electric arc”.

https://www.amazon.com/clouddrive/share/co6gdvuvk2ZrDDZ23ic2Sr46E6cNVvawkN3ln9kdwB6

Enjoy

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 17 June 2021 05:34 AM   [ Ignore ]   [ # 5 ]  
Total Posts:  52
Joined  2018-08-27

Hi Dr. Sassi,
Boy you need to take a break!  The morph example does the trick. I too tried the comparisons between two points, but of course the relative angle only accounts for the morph alone.  I see adding the null object adds something more I’ll have to study.  Thanks for the help and insane quick response!

Profile
 
 
Posted: 17 June 2021 06:33 AM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
Total Posts:  10500
Joined  2011-03-03

You’re very welcome, brucek5!

The more I know about your setup, the more I might find a solution that makes you happy.

Thanks for the kind feedback.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 17 June 2021 10:34 AM   [ Ignore ]   [ # 7 ]  
Total Posts:  52
Joined  2018-08-27

Hi Dr. Sassi,

See attached example file. My goal is to enable the “target” (shown as a red cone) to always point in the direction of a mesh point regardless if changed by a pose morph or a object positional changed as demonstrated in the animation. I could instead use a single polygon if that would make it cleaner. The challenge is a mesh point only has a position. I tried using two points from the mesh to try to calculate angles, but I can’t count on any other mesh point being effected by another pose morph.

Is the solution you provided me still the best approach?

File Attachments
Morphed_Mesh_Point_Direction.zip  (File Size: 91KB - Downloads: 34)
Profile
 
 
Posted: 17 June 2021 10:54 AM   [ Ignore ]   [ # 8 ]  
Moderator
Avatar
Total Posts:  10500
Joined  2011-03-03

Hi brucek5,

Thanks for the file. I love to work with these.

If it is the best is a general question: I have no idea how to answer that. wink

Does it work? Sure!

Please have a look here.
https://www.amazon.com/clouddrive/share/eUrh8RjS30UaTS2S2n0qfwBWAj2xT1HXjrUEfxw9sZv

I have added a Target Tag to it, just if the “Cone” needs to stay oriented.
You will also find a “Distance” slider (a User Data added to the Xpresso Tag. Click on that tag and then User Data).

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 17 June 2021 12:22 PM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
Total Posts:  10500
Joined  2011-03-03

P.S.: Typically, I like to answer with several options, if possible. There are many ways to do things.

However, rigging an object and animating it are two main themes, and to find the sweet spot between these two is an individual case-by-case discussion. Just to put some light on the “general” question.

If someone tells you “this is the best”, then for whom? The rigger, the animator, both? We all work differently, so there is no absolute answer.

Here is the setup I would use; so far, I have understood what you like to do.
Note that I have added the Pyramid after the PoseMorph Tag was “recorded”. So it will stay in-depended.
This also means it can be animated while following the end of the joints.

Example
https://www.amazon.com/clouddrive/share/0d3pprMlg7HXH1vUtp2oQfmGiXlgrzm9k2k8CuuPynO

My best wishes for your project.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 17 June 2021 01:38 PM   [ Ignore ]   [ # 10 ]  
Total Posts:  52
Joined  2018-08-27

Hi Dr. Sassi,

Your (joints-less) morph solution will work great. I’ll will be dealing with a mesh that morphs so much (unlike in my simple example) that using joints just won’t work.

Thanks for throwing in the target distance slider, it’s now one less thing for me to figure out!

You’re the best!!!

Profile
 
 
Posted: 17 June 2021 02:14 PM   [ Ignore ]   [ # 11 ]  
Moderator
Avatar
Total Posts:  10500
Joined  2011-03-03

Thanks for the feedback, brucek5.

Typically, joints do the main work, morphs the details. But I really don’t know your project at all.

Enjoy!

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile
 
 
Posted: 17 June 2021 07:33 PM   [ Ignore ]   [ # 12 ]  
Moderator
Avatar
Total Posts:  10500
Joined  2011-03-03

P.S.: possible, less precise, and well… not my favorite for this case, but who knows what fits.
https://www.amazon.com/clouddrive/share/lUL6lI5rK9nOmhhhRMoveRAVT0gsXlkdKhwWWCLp789

While this one seems a little bit over the top, but relatively simple
https://www.amazon.com/clouddrive/share/4fwvSvJt8GRUNHagbPRvQcgqxEtTm1EaKVpm7qzXzAc

Another option with Constraint Tags. Lots of elements added to the scene, priorities…
https://www.amazon.com/clouddrive/share/n55BEFpNC5lqQxyPi6U4aOcgna6cvF1kGqnUdT3Jkyy

Last but not least, the “cheezy” version, all included, from the beginning.
https://www.amazon.com/clouddrive/share/2LkMg8WHokPtC6zWlxx6EL7OCdBdTvnMKz7GloTomuI

I stick with the point and Xpresso version grin

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004

Photography For C4D Artists: 200 Free Tutorials. Texture, Panorama, HDRI, Camera Projection, etc.
https://www.youtube.com/user/DrSassiLA/playlists

Profile