# Efficient Rendering of Many volumetric particles

I am working on a research project utilizing blender to visualize realistic clouds generated from a Large Eddy Simulation. I've been able to do so in limited respects.

These images, while pretty, are extremely inefficient due to the how the cloud 'particles' are placed and rendered (taking on the scale of 1hr on an a brand new Nvidia Tesla 32gb).

The code goes through a 3d array (shape = (128,1024,1024), each point represents a $(25m)^3$ block) and places a primitive box at that location.

    bpy.ops.mesh.primitive_cube_add(radius=8*0.999/1024);
orig_cube = bpy.context.active_object;
mat = bpy.data.materials.get('CloudMatv0.1')
orig_cube.data.materials.append(mat)
orig_cube.name = 'Cloud Particle'
o = bpy.context.active_object
me = o.data
bm = bmesh.new()
for particle in cloudarray:
bm.verts.new().co = [particle[2], particle[1], particle[0]]
bm.to_mesh(me);
o.dupli_type = 'VERTS';
orig_cube.parent = o;


The material utilizes the light attenuation equation to estimate light absorption (overall not terribly inefficient), and a volume scatter node (very time consuming). Materials and camera are all built to work in cycles. As each of these particles is essentially a clone of the base block, the shape and visual effect that I am looking for is present, however it takes too long.

Goal

I need to maintain the cube shapes with volumetric rendering to be as realistic as possible. The most time consuming part of the render is 'building object flags', which I believe to the a direct result of the way the fields are set up, with many particles leading to a parent block.

Things I have Tried

• Limiting cloud particle placement by the azimuthal angle to reflect the camera's FOV (80$\deg$)
• Reducing light path sampling
• Placing blocks/ merging them for each cloud/ removing inside vertices and faces

Possible Solutions

• More efficient volume materials (or engine)
• Point Cloud Skinner (haven't had luck with this)
• Writing python script to manually build surface of mesh from point cloud (worst case scenario)

Thanks, Nick

• unfortunately I am very unfamiliar with the topic, so I'll leave this only as a comment: blender supports openVDB, is there any way you can transfer your simulation data to this format? Then you could import it as cache in a smoke sim.
– yann
Jun 5, 2018 at 17:44
• That could work! I'll do some research and see where that takes me, the data structure in openVDB seems compatible with the simulation output with minor alterations. Jun 5, 2018 at 17:56