Blender Post Process DEM output

44 views
Skip to first unread message

Liam Murray

unread,
Dec 11, 2024, 9:31:57 PM12/11/24
to ProjectChrono

Good afternoon, Community!

I hope you're all doing well. I have a question regarding post-processing with the DEM Engine in Blender, inspired by how some folks handle fluid simulations using CSV files. I'm trying to create a high-quality animation by importing a large volume of CSVs and VTKs, around 250 MB per csv.

Would this require a co-simulation add-on from regular Chrono, or is there a more efficient approach? For example, could I use ParaView to export the data as .ply or .usd files and then import them into Blender?

I also experimented with a Python script in Blender to import the CSVs by reading their columns (x, y, z, r, absv), but Blender crashed under the load of 40 GB of CSV data—unsurprisingly, that's quite the chunk of data to handle.

If anyone has insights, advice, or experience with this kind of workflow, I'd really appreciate your input!

Thanks,
Liam

Ruochun Zhang

unread,
Dec 12, 2024, 10:45:09 PM12/12/24
to ProjectChrono
Hi Liam,

My question is, if you have around 250MB per CSV, why is 40GB of CSV data loaded into Blender? What we usually do is load the data for one scene and render a picture at a time. In the end, we combine all pictures as frames into a movie using FFmpeg instead of trying to load all data at once.

Thank you,
Ruochun

Liam Murray

unread,
Dec 13, 2024, 11:28:10 AM12/13/24
to Ruochun Zhang, ProjectChrono

Hi Ruochun (accidentally sent it to you and not the forum here is the one to the forum),

Thanks for clarifying. I think I understand the approach you’re suggesting now. Instead of loading all the CSV files at once—which would consume an enormous amount of memory—I should:

  1. Set up a preset Blender scene that contains the environment, lighting, and any globally-applied materials or textures right from the start.

  2. Use a Python script to handle the data one CSV at a time. For each CSV:

    • Load the data into the scene.
    • Apply the appropriate modifications, such as adjusting object positions, textures, or particle systems based on that CSV’s contents.
    • Render the resulting frame.
  3. Once the frame is rendered, clear the scene of that CSV’s data, then move on to the next CSV and repeat the process.

In the end, I’ll have a series of rendered frames, each generated from a single CSV to keep memory usage down. Then I can use a tool like FFmpeg to compile all the individual frames into a final animation.

Does that workflow align with what you had in mind?

thanks for your continued support 


--
You received this message because you are subscribed to a topic in the Google Groups "ProjectChrono" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/projectchrono/eJNw4ZcF6f4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to projectchron...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/projectchrono/6d8b3d4e-99af-46d1-9a14-60e477697547n%40googlegroups.com.


--
Best,

Liam Murray
Emerging Spaceman and swimmer

Ruochun Zhang

unread,
Dec 13, 2024, 12:09:49 PM12/13/24
to ProjectChrono
Hi Liam,

Yes, that's exactly what I think and what we do.

Thank you,
Ruochun

Reply all
Reply to author
Forward
0 new messages