edit 26-5-2013
Alsalam Alikum,

today I’m releasing an alpha version of MSMesher for testing,this MSMesher is based on OpenVDB library

this addon is for Blender to mesh particles (will support point clouds in the future)

video tutorial introduction:

link to download:

follow the video,and have fun :slight_smile:
one note that I forgot to mention:
if you have cached data…and want for example to load data at another file
in the path field …go to the folder where your data …and choose any file of your data
for example folder “C:\mydata”
file name “mydata0001.obj”
when CHOOSING …change file name from “mydata0001.obj” to “mydata”
MAKE SURE that relative path check box is OFF

for any bugs comment here ,or via email, or on the blenderartists thread

this addon is for Blender 2.66.6 and above (didn’t test it with lower versions)

special thanks to blenderArtists friends:
PyroEvil (he gave me the idea to start developing a mesher for Blender,pushed me more after releasing his molecular script addon )

CoDEManX (BEST Blender Python developer…without him I couldn’t have done anything in the interface)

Atom (helped me a lot too in understanding Blender Python tricks)

well let me answer some questions:

what I did…about “initializer” there was a problem with Blender registering the DLL …so I have to “execute” the addon with the initializer each time blender starts,and DISABLE it each time blender stops …so that it work (but the penalty is that you won’t get the settings saved),but if you cache your data …you can just create a simple mesh and do readonly for the filename

second note:this mesher uses CPU only,I abandoned OpenCL and CUDA …because of copy data problem (will be with the same speed as this one)

it is now only for win 7/8 64bit,will try to release other versions soon (once I know how to do that…)

the addon is not very stable,you have to activate it each time blender starts
“CALLING from here any Blender SOURCE dev to put it into trunk,contact me …so we can overcome all of these problems…and it will be 2 times faster too without any crashes”

I’ve attached the source C++ code,have fun :slight_smile:

edit2: “26 10 2013”
thanks to atom he has fixed a lot of bugs and made the code more usable

Wow ! really good news ! Hope to see video soon :slight_smile:
Are you integrate the method from Utah University papers I send to you?

Why a power of two? It’s can be any number later ?

still didn’t integrate utah method (but i think it will be possible once i get myself on the road)
till now it is power of two as most algorithms for gpu work only for this kind of stuff for power of 2 …but i think i will pass this problem soon once i make sure that everything works :slight_smile:

Looking forward to seeing some images/videos. Can you elaborate on the method that you are using to mesh the particles? Is it similar to a bunch of blob meshes? or are your building triangles from point to point?

well,normal blob meshes is very slow …the reason is something like N^2 iterations (so 100k particles take 10 billion iterations which takes 2 minutes on decent cpu)
in my case this iterations is done once (N) with parallel power of gpu (it takes 0.5 sec to do it on my nvidia 240 gt) but i’m saying 10 seconds assuming python calls will be slow and because the algorithm isn’t finished yet

I’m pretty interested in this because we use Frost from Thinkbox software which is a great mesher…really fast too! It uses spheres with different meshing methods to determine the topology. One of the problems is that its great at meshing fluids but since it uses spheres you get internal geometry as well. It would be interesting to see what kind of speed you get out of yours…again…if you need any help at all, i would be more then willing to do what i can.

I didn’t use frost before, but I heared it is great :slight_smile: …about the mesher I’m trying my best to give a result tonight.
my mesher doesn’t produce internal geometry,the best help you can do is to tell me how “FAST” is frost,realflow,other…
tell me particles count,polygons count,processor,ram,time if possible :smiley:


One of the early tests i did with Frost i posted in my blog section. You can read it here:

You’ll need to scroll down the page to the post called “Awesome Frost”. Keep in mind that there have been many builds since then and it is even better now. What i propose is that we can use a common file for testing purposes. I can give you a pointcloud to mesh and i’ll mesh it with Frost so we have a good comparison. Let me know if you want me to post one for ya!

well we can do this,but i need that point cloud as particle object
about that amount of particles (the 8 million) and output(4 million triangles + 2 million points)
i guess it will take a lot of ram (near 300 megabytes on gpu) (not sure though)
my guessing for timing on something like AMD 7970 ghz edition gpu for this amount calculation should take 4 seconds (just to send out arrays) after that depends on python :smiley:

Actually that was just over 80 million points that was meshed by Frost! From what i remember i think my RAM usage was pegged at the 23gig mark. Is there any way to use external files as a point source too? Like a text file with comma or space delimited coordinates to be read into an array. I would assume from that point you could do what you would normally do to mesh it. Not sure how to do this in python yet, but in maxscript it would look something like this:

while NOT eof  input_data do    --reads through to the end of the file
                xpos_val= readvalue input_data        --records first value into the variable input_data
                comma1_val = readvalue input_data    --records second value into the variable input_data
                ypos_val= readvalue input_data    --records third value into the variable input_data
                comma2_val = readvalue input_data    --records fourth value into the variable input_data
                zpos_val= readvalue input_data    --records fifth value into the variable input_data
                rcolour_val= readvalue input_data    --records six value into the variable input_data
                comma3_val = readvalue input_data    --records seventh value into the variable input_data
                gcolour_val= readvalue input_data    --records eighth value into the variable input_data
                comma4_val = readvalue input_data    --records ninth value into the variable input_data
                bcolour_val= readvalue input_data    --records tenth value into the variable input_data

This would allow support of a bunch of different file types…like bin format from Realflow and pointcloud data from scanners…as well as native particle objects.

I play a bit with frost and it’s really fast and easy of use. But one I already talk withMohamedSark is EM Polygonizer from Eric Mootz. It’s support a lot of things like UV transfert. I don’t know if Frost support that.

Exited to see soon some simulation from my molecular script meshed with your mesher MohamedSark ! :eyebrowlift:

It’s can work on cpu only too ?

Hey PyroEvil , it is Sakr not Sark :slight_smile:
and sorry for being late , I’m still working on it, was doing mad things like debugging 12 kernels together (so it took much time to know which variable is doing which error)
it is almost finished as I began to find out the major bugs,gonna post soon

ah I forgot to answer,it works on any OpenCL capable device,CPU that supports OpenCL,or GPU like Nvidia or AMD

Are you sure it’s Sakr … :wink:
Sorry for my error on your name ( a bit of dyslexia on my side ) :slight_smile:

How well suited would this project be for meshing SPH particles? I’ve been itching to get some good fluids in Blender for a while now.

It should be suited for large number of particles (like sph :))
sorry for being late in developing but debugging OpenCL is PAIN!!
I began to get some results,but still a lot of bugs to fix

How’s progress coming on this?

still working on it,i got very good results now,but still a little (Problem) getting infinity values (making things difficult)

up! update,check first post, + tell me how to embed vimeo links here :slight_smile:

Really nice !!! Happy to see this first video of your developpement !