Page 1 of 14 12311 ... LastLast
Results 1 to 20 of 278

Thread: [BETA] CubeSurfer addon (mesher)

  1. #1
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    701

    [BETA] CubeSurfer addon (mesher)

    Hi everyone,

    I want to share with all of you the progress of my current project. After released my molecular addon , many user ask to have a good "mesher". Mohamed Sakr 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. Until this , I'm trying something different. I starting with this C++ tutorial ( Paul Bourke ) and this integration in Python ( Yeus ).


    Download beta now available:

    http://pyroevil.com/cubesurfer-addon-download/

    Rough documentation available here:
    http://pyroevil.com/cubesurfer-documentation/


    Making some optimisation 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 long

    2.bruteforce with voxel optimisation = 10particles:0.006sec | 100particles:0.16sec | 1000particles:3.8sec | 10kparticles:43.4sec | 100kparticles:435.1sec

    3.optimised voxel and particles = Hard to benchmark because now voxel bounding box ajust by itself but for high numbers of particles the addons it's 10times faster.

    4.Multithreaded and Space partitionning = Hard to benchmark now because voxel bounding box ajust by itself but for high numbers of particles ( 100k ... 1millions and many mores ) it's 10times faster then before.



    Now I need to finish this things :

    1- Beta test phase


    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.jpg
    Last edited by Pyroevil; 17-Jan-15 at 13:32.
    PyroEvil
    --My Blog--molecular script--CubeSurfer--NNetwork AI---My Youtube--
    Sorry for my poor english!



  2. #2
    Member
    Join Date
    Sep 2004
    Location
    Milan
    Posts
    1,234
    This look great !
    It could be even more amazing if the isosurface could be generated also from :
    A)meshes with only vertices
    B)a group,for example with only empty objects.
    Maybe with your script it can allready be done,but if not,please take it into consideration.



  3. #3
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    701
    Originally Posted by renderdemon View Post
    This look great !
    It could be even more amazing if the isosurface could be generated also from :
    A)meshes with only vertices
    B)a group,for example with only empty objects.
    Maybe with your script it can allready be done,but if not,please take it into consideration.
    Yes , I already thinking about this and it's will be easy to make. The only things it's send to the compiled cython module it's point data location with it's size. So you can send anythings with this informations. Thanks for the reminder
    PyroEvil
    --My Blog--molecular script--CubeSurfer--NNetwork AI---My Youtube--
    Sorry for my poor english!



  4. #4
    Member
    Join Date
    Apr 2012
    Posts
    1,788
    This looks awesome - could be a very valuable addition to Blender. i'll watch this with interest.



  5. #5
    Member
    Join Date
    Sep 2004
    Location
    Milan
    Posts
    1,234
    Great Pyroevil, thanks for all your efforts.



  6. #6
    Member 3d solar system builder's Avatar
    Join Date
    Mar 2012
    Location
    texas
    Posts
    1,902
    What can this be used for?Can it be used for videogames?



  7. #7
    Its looking good. A much needed feature in my opinion. Good luck with this.



  8. #8
    Member Indy_logic's Avatar
    Join Date
    Nov 2008
    Location
    Portland, Oregon
    Posts
    1,008
    Hey! this looks very promising. Looking forward to seeing more updates. So will this be a modifier or something? How are you planning on having this work?



  9. #9
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    701
    Originally Posted by Indy_logic View Post
    Hey! this looks very promising. Looking forward to seeing more updates. So will this be a modifier or something? How are you planning on having this work?
    Probably in the same way of molecular , by installing a python addon. It's possible to make a "python modifier" ?
    PyroEvil
    --My Blog--molecular script--CubeSurfer--NNetwork AI---My Youtube--
    Sorry for my poor english!



  10. #10
    A modifier should have better performance AFAIK, have a look to the Fracture modifier for example.



  11. #11
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    701
    Originally Posted by SamCameron View Post
    A modifier should have better performance AFAIK, have a look to the Fracture modifier for example.
    Somebody can correct me if I'm wrong but modifiers itself have nothing to do with performance. Fracture addon is a python script and probably fracture modifier is C++ compiled. It's probably the reason why this modifier is faster. Molecular and this addon is compiled. So no need to do modifier to get performance gain (significantly). Somebody can confirm ?
    PyroEvil
    --My Blog--molecular script--CubeSurfer--NNetwork AI---My Youtube--
    Sorry for my poor english!



  12. #12
    Member
    Join Date
    Feb 2012
    Posts
    1,838
    loooking forward.



  13. #13
    Member B-Rae's Avatar
    Join Date
    Nov 2012
    Location
    Canada
    Posts
    332
    Originally Posted by SamCameron View Post
    A modifier should have better performance AFAIK, have a look to the Fracture modifier for example.
    I think modifiers are actually hard-coded into Blender/not written in python and compiled, no? Aka, they cant be python addons? So until a plugin is approved and the code has been dissected, fortified, and optimized, I think this isn't really helpful... I am not a dev though, so I am not sure of the process, I could be wrong.

    Anyhow, pyro, this is exciting, I hope you can get this working - I would love to see it functioning in tandem with your molecular addon.



  14. #14
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    701
    Originally Posted by 3d solar system builder View Post
    What can this be used for?Can it be used for videogames?
    It's a compiled python module so I can use it anywhere I want after. If you give to it the right inputs (points location and size , domain dimension and resolution) , it's return the resulting output (polygons list). My priority is to make a UI for vfx part of Blender. After that it's can be interesting if it's can be used in BGE too. The only problem I see first is if BGE is be able to create new geometry (eith new polygons and vertices) when it's running.
    Last edited by Pyroevil; 21-Oct-14 at 05:45.
    PyroEvil
    --My Blog--molecular script--CubeSurfer--NNetwork AI---My Youtube--
    Sorry for my poor english!



  15. #15
    Member 3d solar system builder's Avatar
    Join Date
    Mar 2012
    Location
    texas
    Posts
    1,902
    Why can't vertices be instanced and parented in the bge?



  16. #16
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    701
    Originally Posted by 3d solar system builder View Post
    Why can't vertices be instanced and parented in the bge?
    Probably , I not really well know BGE . So when I'm finish the core of the addon , I'm be glad to make something for BGE if somebody show me how to create mesh at runtime.
    Last edited by Pyroevil; 21-Oct-14 at 11:02.
    PyroEvil
    --My Blog--molecular script--CubeSurfer--NNetwork AI---My Youtube--
    Sorry for my poor english!



  17. #17
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    701
    Another part of optimisation is done !

    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 long

    2.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***


    With all current optimisation , time with high numbers of particles depends on how much particles is inside each others. With molecular or Fluid particles , this kind of intepenetration stay at it's mi
    nimum soo I thinks it's will be good. Now I need to do a bit of cleaning and multithread everything!

    iso_both_wip.jpg

    Image above: at left Suzanne (molecular simulation) with 1millions of particles (20sec) and at left a block of sand with 4millions of particles (70sec).4millions particles for the "crashing box" at right. I don't keep the .blend files but if I remember the mesh polygons count goes around 400k - 600k polys. A not too bad resolution (200x200x200 domain resolution).
    Last edited by Pyroevil; 21-Oct-14 at 16:24.
    PyroEvil
    --My Blog--molecular script--CubeSurfer--NNetwork AI---My Youtube--
    Sorry for my poor english!



  18. #18
    Member 3pointEdit's Avatar
    Join Date
    Sep 2005
    Location
    Brisbane, Australia
    Posts
    8,681
    I guess this would be no use for animation as each frame would be a cache mesh? But you could sim a flow with the molecules then choose a frame to mesh. Is that correct? Is there mesh relaxing techniques to smooth large contiguous surfaces, like water, but keep the break up at the interaction site?
    Cheers, David ___________"awesome in space and other places".
    ________Follow me on twitter @3pointedit
    _____________ Check the Youtube Channel for tutorials. Or my Sketchbook



  19. #19

    Working on one as well. Except the mesh will be controllable after surfacing particles. (Scale,rotate,move,subdivide,smooth, add modifiers like waves, etc.)



  20. #20
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    701
    Originally Posted by Albertofx View Post
    Working on one as well. Except the mesh will be controllable after surfacing particles. (Scale,rotate,move,subdivide,smooth, add modifiers like waves, etc.)
    Nice Work Albertofx! It's seam to perform very well! Available to download and test ?
    Did you use a special librairy ( like openvdb ) and which language is used (python , cython , C++ ...)
    Same thing for mine , controllable after surfacing like any geometry object.
    Last edited by Pyroevil; 15-Nov-14 at 08:31.
    PyroEvil
    --My Blog--molecular script--CubeSurfer--NNetwork AI---My Youtube--
    Sorry for my poor english!



Page 1 of 14 12311 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •