A Script to Skin a Point Cloud (for Blender 2.6x or Later)

No no, it’s a wonderful discussion. Discussing the way for skinning is quite useful for me.

@patmo141

Really really thank you for your #37 post and .blend file. They are both very fast. I guess Meshlab is 20 times faster or more than the script. In the previous version of the script, it became 13.5mins for 65K vertices as seen below processed on Blender 2.4x.
http://1.bp.blogspot.com/-wottleVmsC8/TxglWntcJ6I/AAAAAAAAA1Y/VsKTrnzIujw/s800/45%2BTopology%2527s%2Bentire%2Bcloud%2Bskinned%2Bby%2Bt21.jpg
When it takes 13.5mins for 65K, it becomes 5.1mins for 25K, which is the same number of vertices as patmo141 tested at #37. However, it took more than 10mins on Blender 2.6x… Mmm, Blender Python API got a bit slower?
Anyway, the script is slow and I cannot believe that it gets 20 times faster if I rewrite the script into C++. :frowning:

are you going to try to implement the ball method for the algo

don’t know if there is somehow a way to call a C function from python
to test this and get faster speed ?

happy 2.6

super awesome script:D
im testing it at the moment with a point cloud i gathered from a magnetic tracker:D

here i loaded the raw data that i tracked into blender:

removed doubles to clean it up:

skinned mesh:

fixed holes and did some cleanup:

did anyone tried to implement the ball algo 2D and 3D ?

now don’t forget that the first time you run a script it has to make the Execute file
and it takes longer to do it !

thanks

@cromar: great job :slight_smile: I have to look what’s goinng on with magnetic tracker :slight_smile:

I’m sorry. I had a cold for the last few days and couldn’t reply.

@cromar
Thanks for your sharing. Looks great!

Yes, I know we still have to do lots of work to skin… cleaning up the doubles, waiting long time for skinning, fixing holes, etc…

@RickyBlender

> are you going to try to implement the ball method for the algo
No, I’m not so far. But the ball method seems to be wonderful.

> don’t know if there is somehow a way to call a C function from python
It’s nice and the best way if someone creates a wrapper script for Blender to call Meshlab functions and make it possible to skin with Meshlab.

@RickyBlender

I updated the first post to explain how long it takes and the bug it has :slight_smile:

no idea what method you use to create the surface but maybe trianlge http://www.cs.cmu.edu/~quake/triangle.html might help to improve the mesh creation?
its included in meshpy http://mathema.tician.de/software/meshpy so its usable in blender

thanks for the link seems very interesting this meshpy lib

will look at it to understand more about it !

but i would still like to see an implementation for this ball script
would be interesting to do like borders detection ect…

thanks

Indeed. Meshlab is based off of VTK and there are wrappers for it for python 2.x but they “plan to” update to 3.x http://www.vtk.org/Wiki/VTK/Python_Wrapping_FAQ

There has been discussion about boost python and ctypes etc. It’s all out of my league in terms of programming right now anyway :frowning: If I had more time (or another lifetime) I would try and tackle it a little. But yeah, it would be very nice to just use Meshlab’s already compiled code and borrow functions from it…A topic for a different thread perhaps?

@kromar

these soft are making mesh generation thei own way
how can this be use with blender ?

cause blender has it’s own way to generate a mesh internally
you can just provide list of verts faces and it’s done!

so what these external soft offer above blender and how can it be used with blender ?

thanks

im not sure what triangle can do, i only use tetgen at the moment. with some options the surface as well as the internal structure can be “refined”. and with the tetgen code, nasty triangles can be avoided, so it was an idea that this could have some use for surface creations, maybe im wrong.

i tried some softbody physics yesterday with such a tetmesh and it behaved quite differently then an ordanary mesh with the default softbody settings.
here some stuff i recorded.

tetrahedron meshes are used for deformation simulations and some other physics stuff so this might be quite interresting for some people to have meshes with internal structure to play with instead of surface meshes.

well if the python script does the new triangles mesh and then make a new mesh base on this topology
it’s quit possible blender can use this!

i’m not really into CFD or soft body sim a lot
but it might give some interesting effects like shonw in your little video!

have you tested the script into 2.6 yet ?

thanks

well that would need to be tested if it can create a new mesh based on topology, in that case it probably could be useful.

meshpy is working in 2.6, there are some crashes when running tetgen that im investigating. as soon as i can fix that i will do a release.

i’ll do some testing later on and see how it goes into 2.6!

but i’d like to see different topology for making surfaces insteadn of the usual mesh we get in blender !

it might be use for some sim fluid ect and get better or other results in blender !

let us know if you do any corrections

thanks

i tried to get the meshpoy but cannot get to the page
and don’t know how to use this git thing!

how or where do you get it ?

and the other one triangle i assume it is an external program not working in blender !

is it this triangle soft you use to make the new topology?

thanks

i got it from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/ then installed the correct meshpy package and copied the meshpy folder which got installed into the python libs into blender/scripts/modules. after that you can import the modules in blender.
here the link for the documentation: http://documen.tician.de/meshpy/

no external software is used, its all included in the meshpy package.

so i get the 3.2 exe

and then this will install it in the local folder where it is saved !
do i get the python script from this ?

now i saw a PIL 3.2 does it means it can run as python in blender ?

i saw other script like simple finite elements in Python.
have you ever tried it ?
is there any place to get some doc on this one ?

so many script there interesting if they can be use in blender !

thanks

it installs python modules, search your python folder for meshpy. then copy that folder to bledners script/module folder so they get loaded with blender. you will need to write a small script to access its functionallity in blender. you can copy past the example on the documentation page into the text edito in blender and run it. that should give you some output in the console and you can see if it works.
then modify it to what you need/want it to do.

hm interresting, ive never seen this infinite element script, do you have a link for that?

and i think all these libs should be usable in blender as long as there is a py3.2 version:D

EDIT: maybe we should take this discussion to an other thresd since its gotten a bit offtopic. sorry for that