How to render a moving model

Dear all,

I looked at the video "https://youtu.be/EvSDFRfJToQ" and may i know how you managed to render those floating boats, pls? Because the motion of floating boats depends on dualsphysics, how do i ensure the path of floating boats in blender would be identical with the one in dualsphysics. Thanks)

Comments

  • You have to create the VTK files of the floating objects using BoundaryVTK

    Regards

  • Also consider having a look at;


    examples - chrono - 08_WaterMill

    They show you how to generate the mill with vtk object;

    Kind regards

  • Hi,

    Also, (with help from @Asalih3d) https://forums.dual.sphysics.org/discussion/1726/roll-pitch-and-yaw#latest :

    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".

    good luck

  • I tried boundayvtk command as chrono example shown. But after reading all binary files, it gives "the file has not been created due to the absence of data. May i know what possibly causes this, please?

  • I found the reason, Because i imported a stl model, now i use "Boundaryvtk -loadstl:1 model.stl" to eliminate the absence error,

  • edited March 2020

    And i also noticed that loadvtk will search __Actual.vtk that is generated by gencase and the shapemode should be defined as real coordinate in.xml. Thank for your help!

  • In my experience, if you are using Chrono, you should use a different format than stl.

    Chrono needs information about the face normals, and stl does not carry this.

    Try using .ply insteed (in blender you can display normals in the viewport)

    regards

  • You are right, however do not worry about using STL or VTK or PLY.... since we compute normals on our own!!!

    DualSPHysics will create the geometries .obj to be used by CHRONO. And normal vector are computed only following the order of vertexes... this why we included the option to invert normals if needed.

    Regards

  • @Alex Nice to know

    but still, I've had problems not using ply but stl instead (floatings going through geometry...)

    maybe it's because of the vertexes order, I guess if we want to have nice normals, we should check them in our drawing software in order to garanty a correct vertexes order (then using stl or ply won't matter ?)

    Thanks

    regards

  • Send to us the XML case to dualsphysics@gmail.com and we will check it


    Regards

Sign In or Register to comment.