[Dev] OpenVDB Based Particle Mesher Modifier

Hi people,

as a handful of you may know, I’m currently developing an OpenVDB based particle mesher modifier. This little project is going faster than I thought (I started last week-end), and I’m coming out my cave to share the first results. Below are two demo vids I made somewhat in a rush, I would need proper test/demo files, you know, the real deal. Also these vids are made with the “default” particle system, but it works with the others: SPH, Boids and even Hair particles (it’ll will put a sphere at each hair points). Children particles are not supported yet.

Known Issues:

  • The level set filters don’t work properly. There’s some logic issue in my code which needs proper refactor: only two filters are right, for the rest, it tries to add some modifiers (like Mirror and Array) which results in a crash,
  • The “Velocity Scale” factor is not doing anything, it just sits there in the UI, needs to be hooked up in the code,
  • The particles velocity (used for the trails) is not properly taken into account, I was a tad lazy and it just checks if the first particle has some velocity -> buggy,

TODO:

  • The filters can optionally accept an alpha mask, this mask could be generated from the particles level set or could be an extra mesh, like other settings for the filters this could be a per filter setting,
  • The mesher can be set to generate an adaptive mesh, for now it just outputs a mesh with polygons the same size. The adaptivity is on a per frame basis, though, this would cause the mesh to flicker in an animation,
  • More filters! (Once they are fixed.) OpenVDB 3.0 comes with support for “dilate” and “erode” filters, namely. There’s also an “offset” one currently, that is controlled with the “Voxel Offset” slider you can see in the first video, I disabled it for some compile error, which should be fixed by now.
  • We could use some extra meshes that alpha-mask the overall meshing operation to choose what we want to convert, or even “union” (the Boolean operation) with it, e.g., if the particles are supposed to mesh something on the ground, or the water, and the ground/water and particles need to be one mesh for rendering purposes and the likes.

There’s still a little bit of work to be done, but once that’s done we should have the majority of the tools needed to convert other modifiers to use OpenVDB; I’m currently thinking of the Boolean, Laplacian Smooth or even the (in-development) Fracture modifier :).

This looks insane! :smiley: Will we have a build soon?

@KWD

Hi, your OpenVDB mesher modifier looks really great :slight_smile: I think with this it will be possible to generate non-voronoi shaped shards from a mesh. I have been experimenting a bit with subsurf and displacement modifier after fracture, but that becomes real slow and looks not very good imho… i am excited to see how this could help the fracture modifier or even replace it by a better system, which has a better chance to reach master :slight_smile:

:open_mouth: ermaghurd much wow so yay

looks incredible!! Great work!!

Very nice! Keep up the excellent work! :yes:

wow this looks nice, btw what interface theme do you use?

Thanks guys for the kind words, stay tuned for an update around this week-end.

I can only share some Linux builds (I only have a Linux machine), for the other platforms I could share the patch, but then OpenVDB would need to be installed separately on the machine that’ll do the compiling.

Also, let me fix the bugs before talking about sharing builds ;).

The theme is one I made, based on Pablo Velasquez’s theme, here it is: light_blue.xml.zip (4.51 KB).

Awesomesauce!

I dream of a brush to paint meshes on surfaces ^^

Great job :wink:

Looks like Flatty Light from the current test build.

Hi KWD you are a master with openVDB! I have read you project but you have made already a great result!
I follow your job anyway…

Thank you man, this is a great thing on blender.

Excellent, I honestly started to think that the prospect of being able to produce a skin for SPH particles is a long shot idea (due to no one being interested in the years since the initial implementation.

About time someone started working on the final piece of that puzzle, hopefully this is part of a trend of bringing Blender out of its reputation of seeing features implemented halfway and not getting what’s needed to make it especially useful.

@KWD
Is it possible to make a Mac OSX build? since it’s linux

there is an interview by BlenderDiplom that Ken Museth point the blender will have OpenVDb near in future, is this related to?

Technically yes, it would also be possible to make some Windows build; that falls into the realm of cross-compiling, and that’s not an easy task, especially with a software the size of Blender. I’ve never done that, and I probably won’t do it in the near future.

Let’s say it’s a happy coincidence ;).

Good job man keep working on it.

One thing i wanted to point out if it is still untold to you, Campbell as said so many times that when you start a new project with Blender contact the module owner as earlier as possible so that he may help you with blender rules. It will be good to see this feature in the master.
Enjoy your coding :slight_smile:

can it also work with the molecular script ?,
If i do remind correctly I think that guy is also working on a ‘mesher’ script you 2 should get into contact with each.

Yay!

Keep @ it !