Hello Rebeca!

I recently did something similar for a PyChrono mini-example. Here is the 
way I went about exporting the terrain and rendering the sim in Blender 
(whole workflow is in Python): 

1. During my sim loop, I call *sys_sph.SaveParticleData(sph_dir) *where 
*sys_sph* is the sim's ChFsiFluidSystemSPH instance. This dumps per-frame 
fluid*.csv files with columns  *x, y, z, v_x, v_y, v_z, |U|, acc, rho, 
pressure* to the location specified by *sph_dir*. 

2. For rendering this in blender, I have a stdlib-only script that runs 
headless. It first discovers all of the fluid*.csv files, sorts them by 
frame number, and registers a frame_change_pre handler so each Blender 
frame reloads the matching CSV and updates the particle positions in the 
scene. Geometry Nodes (a built-in Blender feature) then draws a small 
sphere at each of those points, which is a faster technique than placing 
individual sphere objects. 

*Caveat:* You do have to set the particle radius manually. I pick it to 
roughly match my SPH initial spacing so the soil renders as a continuous 
material instead of scattered dots. Domain size also plays a role to some 
extent. 

Hopefully this helps! Please let me know if you have any additional 
questions :) 

~Khai 
On Saturday, June 6, 2026 at 9:18:48 AM UTC-5 Rebeca Guimarães wrote:

> Hello all!
>
> I am currently working on VIPER rover terramechanics SPH simulations using 
> the the ChTireTestRig and have been struggling to generate images and 
> animations that include the wheel, soil and complete rig mechanism.
>
> I was previously using *ParaView*, but `ChTireTestRig` doesn't have a 
> built-in function to save VTK files of the mechanism itself. Because of 
> this, my animations only showed a floating, single wheel gliding through 
> the soil. Let's just say that for the purpose of presenting results to 
> people who aren't familiar with terramechanics single-wheel tests, it looks 
> a bit mind-boggling! Haha.  
>
> So, I decided to try *Blender*, since I've seen beautiful images and 
> animations on SBEL's website and knew, from SBEL's NASA Workshop slides, 
> that they were generated there. However, now I have the opposite problem: I 
> can only export the solids, not the soil.  
>
> Here is what I have tried so far to bridge the gap:
>
>    - 
>    
>    *Exporting soil from ParaView to Blender:* I tried saving the soil as 
>    an animated scene in ParaView, but it only exports in the .vtk.js 
>    extension, which Blender doesn't support.
>    - 
>    
>    *Using SciBlender:* I managed to export the soil in other formats, and 
>    while it generates files for all timesteps, Blender only reads them as 
>    individual static scenes.
>    - 
>    
>    *StopMotionOBJ:* I tried using this add-on to handle the time 
>    sequence, but I couldn't get it to show in the export/import menu, despite 
>    installing it.
>    - 
>    
>    *Exporting the mechanism from Blender to ParaView:* I attempted to 
>    bring the rig into ParaView, but I couldn't export it as an animated scene.
>    
>
> Currently, the only workaround I have is generating static images in 
> ParaView by exporting the mechanism from Blender as a .glb file at the 
> exact timestep I need. Unfortunately, this means I cannot generate 
> animations.
>   
> I apologize for the long text, but I thought it was important to share 
> what hasn't worked. Could anyone provide some guidance or a recommended 
> workflow on how to render animations that include the soil, the wheel, and 
> the rig mechanism all together? 
>
> Thank you very much!
>
> --Rebeca
>

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/projectchrono/de3579c9-09d7-4aae-99bb-ec7f3752b9a0n%40googlegroups.com.

Reply via email to