Roll, pitch and yaw ??

Hi all,

I'm having difficulty understanding roll pitch and yaw when using "floatinginfo" extraction.

I've simulated a box floating in a channel and I want to make a video of it. For that purpose I use Blender. I've made a model in blender for my box with the desired shading and now I want to make it behave like in the simulation. So I import the "surge, sway and heave" for the position and "roll, pitch and yaw" for the rotation.

From what I understood, roll pitch and yaw are intrinsic X-Y'-Y" Tait-Bryan angles, so when applying the rotation in blender I use the ZYX convention.

However, it does not work and I'm pretty confused... I've tried messing with it: use other convention and order, import roll pitch and yaw to different solids with different parenting... but nothing work. Only the Yaw rotation seems right.

I have the feeling that I'm missing something... Have somebody done that successfully before ?

Thanks

Comments

  • I managed to do it before in the past but it is was quite difficult to get right. There is a better way to do this, I advise you to go into "examples" -> "main" -> "11_Floating" and you will find a case, which you can import these files into Paraview:


    And if you want them in Blender you can use DualSPHysics own import tool for blender https://github.com/EPhysLab-UVigo/VisualSPHysics/wiki/Installation


    Just spend half a day trying to understand how it is done and if you are stuck somewhere try asking again. If you are familar with Blender this should hopefully be understandable.

    What you are doing is not bad though, hopefully you figure out how to really do it so we know that everything works as it should :-)

    Kind regards

  • Hi @Asalih3d

    Thanks a lot ! I've never used the "boundaryvtk" function before and wasn't looking for it!

    Using a the following command :

    set dirout2=%dirout%\boundary

    %boundaryvtk% -loadvtk AutoActual -motiondata %diroutdata% -savevtkdata %dirout2%/MotionFloating -onlytype:floating -savemotion %dirout2%/Mot -onlytype:floating

    if not "%ERRORLEVEL%" == "0" goto fail

    I was able to retrieve a .csv file containing "AngleX" and "MovX" (Y and Z also)

    Then using a python script in blender I was able to apply the floating motion to the mesh I wanted. The trick is to make sure that when every mesh are at their initial position, their anchor points iare set to the world origin (in blender you must apply transform, CRTL+A) and that their rotation is "euler XYZ". Also rotation convention are different in Blender so for each rotation you should apply "-1*rot".

    What was important for me was to be able to apply the motion data to other meshes, this way I can easily apply complex textures and compensate for the gap created by the boundary conditions (that doesn't look good when rendered).

    Regarding the roll pitch and yaw, I think they are not compatible with euler angles in Blender. it should be possible to apply some rotation matrix to make it work, but I wasn't able to find the right one.

    Thanks

    Kind regards

  • Great to hear that you managed to solve it!

    I had not caught the fact that you wanted to replace the existing mesh, but seems like this approach still works, just a few more steps.

    Kind regards

Sign In or Register to comment.