MFnField: Get velocity, not force

MFnField: Get velocity, not force

Sebastian_Wiendl
Enthusiast Enthusiast
859 Views
7 Replies
Message 1 of 8

MFnField: Get velocity, not force

Sebastian_Wiendl
Enthusiast
Enthusiast

Hi there,

 

I am trying to read the velocity of MFnFields, at certain positions, but the only interface I can find returns forces,  i.e. getForceAtPoint.

 

Is there any way to read the velocity instead?

What do I get if I pass 0 mass and 0 velocity into the getForceAtPoint function?

I need this to work for a whole spectrum of MFnFields, including Air Fields.

 

Any help will be much appreciated.

 

Cheers,

Sebastian

0 Likes
Accepted solutions (1)
860 Views
7 Replies
Replies (7)
Message 2 of 8

Sebastian_Wiendl
Enthusiast
Enthusiast

Just wanted to follow up since I have not received an answer yet.

Doing some basic calculations, it appears that passing 0 mass and 0 velocity into the getForceAtPoint function returns the velocities of the field instead of forces, i.e. exactly what I need.

 

Could anyone confirm or deny this theory, please?

 

Thanks so much

 

Cheers,

Sebastian

0 Likes
Message 3 of 8

Sebastian_Wiendl
Enthusiast
Enthusiast

Just wanted to follow up again since I have not received an answer yet.

 

Any chance an Autodesk employee could have a look at the getForceAtPoint function and confirm or deny this theory, please?

 

Cheers,

Sebastian

0 Likes
Message 4 of 8

cheng_xi_li
Autodesk Support
Autodesk Support

Hi, 

 

If you are not supplying mass and velocity, it will use 0.0 as velocity and 0.0 for mass instead.

 

For your observation I am not sure if it is correct and it is not designed that way. getForceAtPoint is cumulative and adds to the values already in force. 

 

Yours,

Li

0 Likes
Message 5 of 8

Sebastian_Wiendl
Enthusiast
Enthusiast

Hi Li,

 

Thanks a lot for getting back to me on this.

 

 

In the example of a Vortex Field, how is the force calculated internally? For example, if I pass a single position of (0.5, 0, 0.5), with Mass=1.0 and Velocity=0.0, and Force=0.0 into the getForceAtPoint of a Vortex Field with default transform values, Magnitude=10.0, Attenuation=0.0 and Axis=(0,1,0).

 

Thanks so much.

 

Cheers,

Sebastian

0 Likes
Message 6 of 8

cheng_xi_li
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

I checked it today. The basic idea of it is using Magnitude/100 in radian as rad speed, Attenuation as exponent for decreasing the rad speed. Velocity and mass seem not being used for vortex fields, the result is basically the deltaPosition/deltaTime. 

 

Based on your previous data, if you use point(1.0,0,0) and 314.159(pi) for magnitude, the result would be around -48 for 1/24 seconds(default delta time) and -2 for 1 second. If you put 2*pi*100 in magnitude, the result should be almost 0. Because attenuation is 0, the distance to the center won't affect the magnitude and it is easier to understand how it works.

 

Let me check it with our engineers about that.

 

Yours,

Li

Message 7 of 8

Sebastian_Wiendl
Enthusiast
Enthusiast

Hi Li,

 

Thank you very much for the information. Much appreciated.

 


Let me check it with our engineers about that.

 


Did the engineers come back with any more insights?

Cheers,

Sebastian

0 Likes
Message 8 of 8

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

Sorry, I don't have any feedbacks from our engineers right now.

 

I think if we need to calculate centripetal force, using the formula for uniform circular motion F=mrw^2(w is the radial velocity) should be enough in most of the case.

 

Yours,

Li

0 Likes