Work in progress IsoSurface addon ( mesher )

Hi everyone,

I want to share with all of you the progress of my current project. After released my molecular addon , many users ask to have a good “mesher”. Mohamed Sakr ( on BlenderArtists.org forum) give it a try with the OpenVDB librairy and get really good performance but have some memory issues with it. He waiting to get the librairy integrated with official Blender. And it’s not be sure it’s will be happen soon. Until this , I’m trying something different. I starting with this C++ tutorial ( Paul Bourke ) and this integration in Python ( Yeus ).

Making some of my own optimisations and transfert it in Cython , I starting to get some interesting result as show here:

A – Calculation time it’s for a 200x200x200 resolution cubes with the “peanut” shape function from Yeus.

1- Original Yeus python script (with it’s original volume function): 900sec
2- Yeus python script with tritable has Global variable instead be call everytime: 160sec
3- Convert and adapt script to cython with somes optimisation: 5.8sec
4- Avoid creating voxel in memory: 5.8sec but Blender to stay at 80Mo of memory instead a peak of 1gigs.

B – Optimisations on how I get the particles volumes to be meshed:

1.bruteforce with all voxel = 10particles:2.3sec | 100particles:15.1sec | 1000particles:144sec | 10k particles: too long2.bruteforce with voxel optimisation = 10particles:0.006sec | 100particles:0.16sec | 1000particles:3.8sec | 10kparticles:43.4sec | 100kparticles:435.1sec

3.optimised voxel and particles = 10particles:0.005sec | 100particles:0.03sec | 1000particles:0.29sec | 10kparticles:2.05sec | 100kparticles:27.9sec | ***100kparticles less interpenatred: 2.3sec***

Now I need to finish this things :

1- Multithread all the codes.

2- UI and the way it’s work inside Blender

Why I did this addon ? For having fun with the limited coding skills I have and learn about this algorythm. To give to Blenders users a good (I hope) mesher until a more experienced dev code one with openVDB librairy or similar.

iso_both_wip

For now the addon is not available because it’s not really usable. I want to show and share my progress on it. Soon the script will be released , a link will be appear on this blog.

Leave a Reply