Page 1 of 3 123 LastLast
Results 1 to 20 of 55

Thread: [Addon] Mesh from particles

  1. #1
    Member
    Join Date
    Aug 2007
    Location
    brazil
    Posts
    81

    [Addon] Mesh from particles

    Hey guys, I have made a addon for blender 2.63 that generates a sequence of meshes, itīs a little bit of a hack, and maybe there are some things that need to improve, but hey, it works!

    here is a picture:


    and here is a video of the final result:
    https://vimeo.com/40721951

    VIDEO TUTORIAL
    https://vimeo.com/43190704


    instructions:
    *Run the add-on
    *go to the object properties in the object that you want to bake as a fluid mesh.
    *make sure that:
    ->the particle settings name is the one you want to bake
    ->the material exists.
    ->the particle size is not too small (the metaballs used for baking will be that size, so they need to touch each other)


    *press bake! (the script will bake from the start frame to the end frame, this can take a while... watch the console for more info on that)

    *if you need to change the material on the meshes, change the material name in the baking parameters and press " animate mesh", you need to press that when you open the saved file also
    *after baking, you can put a smooth modifier in the object to make the fluid smoother (dãr)
    *if you need to delete or restart the baking, press "delete baked mesh" save the .blend and re-open it.

    if you want to know more about the process go here:
    http://blenderartists.org/forum/show...-python-script

    known issues:
    ->the elapsed time factor maybe wrong, not sure if itīs in milliseconds, seconds or whatever..
    -> there is a big ball in center of the scene, thatīs the parent metaball used for baking, I have no idea how to delete it...
    -> maybe using an external file for the baked mesh is a better solution, but i have no idea on how to load that in to RAM...

    the Addon:
    http://dl.dropbox.com/u/33761860/mesh_from_particles.py

    enjoy!
    bye!
    Last edited by Hperigo; 02-Jun-12 at 09:00.



  2. #2
    Member
    Join Date
    Dec 2011
    Location
    Germany
    Posts
    3,991
    there is a big ball in center of the scene, thatīs the parent metaball used for baking, I have no idea how to delete it...
    Is it really required to have a parent metaball? Couldn't it be an Empty?

    A dirty workaround would be to move it out far, far away, so that it won't be in viewport. Or scale it down as small as possible.

    hide_render property affects parent + childs, doesn't even seem to be possible to show children but hide parents



  3. #3
    Member
    Join Date
    Aug 2007
    Location
    brazil
    Posts
    81
    @CoDEManX: yes, because itīs from that metaball that the mesh is generated from, what the script does is to make the draw object in the particle system that metaball and then convert that to a mesh in every frame, so scaling it to 0 (for example) will affect the final result =(



  4. #4
    Member Spirou4D's Avatar
    Join Date
    Jul 2010
    Location
    Lille, France
    Posts
    1,252
    Hi Hperigo,

    Your add-on is very practice and thanks you for this job but... I had one problem with your file encoding in ANSI.
    You must choose UTF-8 and/or remove one letter of your Name: P[e]rigo.
    This letter take problem with encoding translation of Blender.

    Congratulations.
    Spirou4D from France.
    Words are Images that loosed Light!
    Linux Mint 18.1 Serena Bi-Quad Intel 2.66Ghz x64Bytes - Nvidia OpenGL GT 630 4Go-vram



  5. #5
    Member
    Join Date
    Jun 2010
    Location
    Melbourne
    Posts
    1,246
    hello and thank you! I am waiting since a really long time for something like this and I hope this is the good one!

    i have also some issue with the UTF-8 encoding... how can I fix it?



  6. #6
    Hi.
    I'm just wondering the purpose of this add-on.
    Is it because it renders faster after the baking process(particles to mesh)?
    Or also since Cycles doesn't support particles yet, with your add-on we can now use our scenes with fluid particles!!
    Could it be used to simulate smoke(and fire) or would the metaballs need be to small to achieve realistic result thus breaking the metaballs's link with each other?

    Thanks



  7. #7
    Member
    Join Date
    Jun 2010
    Location
    Melbourne
    Posts
    1,246
    i think the most interesting usage is that finally we can use the sph particles, that without a remesher are useless if not for some nice experiment...

    Any suggestion with the encoding issue?

    i copied the code in the notepad, , got rid of the "e'" and saved with UTF-8 encoding.

    When I install the script i can see it in the list of scripts, but I cannot activate it...
    Last edited by Bernardo; 26-May-12 at 16:08.



  8. #8
    Member
    Join Date
    Mar 2002
    Location
    California
    Posts
    2,119
    I had the same encoding issue but after I deleted the spurious character around his name I get and encoding error around line 36.
    At some point in life you stop being the man you are and start being the man you always wanted to be. ------ Bruce Springsteen.



  9. #9
    Member
    Join Date
    Aug 2007
    Location
    brazil
    Posts
    81
    Hey guys! Iīm glad you liked!

    @Spirou4D, @Sdados, @SHABA1: I re-edit the code and got rid of those "weird" characters, you can use it now with no trouble I guess (I canīt confirm that because I never had that problem), you can download it here: http://www.pasteall.org/32280/python

    @TheElwolf, @Sdados: I manly used in the SPH particles to generate some fluid simulations for a commercial project (check out the video), but you can use it for what ever you want

    @SHABA1: ummm.... what version of blender are you using? can you post the console error? maybe you deleted something else in the text? try downloading the new script!



  10. #10
    Member
    Join Date
    Jun 2010
    Location
    Melbourne
    Posts
    1,246
    Hi Hperigo. Thanks for the update! Unluckly I still have a strange problem. Now when I install the script it appears in the list without having to change anything in the text. Problem is when I try to activat it nothing happen. The check does not appear in the box next to the script. I tried this in 2.63, r46603 and 45996... what could it be?



  11. #11
    Member
    Join Date
    Aug 2007
    Location
    brazil
    Posts
    81
    ummm...
    are you using what OS?

    try to copy/paste the code in the script editor, it works here with no problem. Also, check out in the console window if there is any message!

    Iīm using blender 2.63 45996 (the official release)

    good luck!
    bye



  12. #12
    Member
    Join Date
    Jun 2010
    Location
    Melbourne
    Posts
    1,246
    im on windows 7 64bit. Ok I will try to launch it from the script editor and I will let you know. I have to tell you, I am really exited about this script!! I hope at last we can use the SPH particles for something concrete!!



  13. #13
    Member
    Join Date
    Jun 2010
    Location
    Melbourne
    Posts
    1,246
    tried to launch it from the text editor and I get this error.

    meshError.jpg

    Im using officiale 2.63 64bit (r45996

    thanks again for the help



  14. #14
    Member
    Join Date
    Aug 2007
    Location
    brazil
    Posts
    81
    cool =)

    yes, the cool thing is that you can use modifiers on top of it... and the playback is really fast!
    there are still some things that are a bit hackish, but itīs very useful anyway!



  15. #15
    Member
    Join Date
    Aug 2007
    Location
    brazil
    Posts
    81
    umm... it looks like some kind of tab/spacing error... maybe itīs the ANSI encoding?

    here, try to download the .py file directly:
    http://dl.dropbox.com/u/33761860/mesh_from_particles.py



  16. #16
    Member
    Join Date
    Jun 2010
    Location
    Melbourne
    Posts
    1,246
    GREAT!!!! It worked, I managed to activate it!! Now I need to leave for a while but I will try it as soon as I come back! Thank you so much!!



  17. #17
    Member
    Join Date
    Mar 2002
    Location
    California
    Posts
    2,119
    Originally Posted by Hperigo View Post
    umm... it looks like some kind of tab/spacing error... maybe itīs the ANSI encoding?

    here, try to download the .py file directly:
    http://dl.dropbox.com/u/33761860/mesh_from_particles.py
    That fixed the problem. Now just a matter of figuring out how to use it More to come later.
    At some point in life you stop being the man you are and start being the man you always wanted to be. ------ Bruce Springsteen.



  18. #18
    Member
    Join Date
    Jun 2010
    Location
    Melbourne
    Posts
    1,246
    ok I managed to do something. As shaba said, the problem now is figure out how to use it properly

    I just set up a simple scene with an half uv sphere to use as a bowl and an emitter plane with a 1000 sph particles. I added the material and baked the mesh on the particles plane. After the process a sphere comes in place of the emitting plane. I can see something going on around that sphere but is quite confusing. The mesh does not follow the particles movement, but slighlty resembles the moment after the particles hit the bowl and flot in there...

    However, that's something already! Is the first time I see some moving mesh from particles so I guess is a good start!

    Could you point us in the good direction? I can pass you my blend file if you want!



  19. #19
    Member
    Join Date
    Jun 2010
    Location
    Melbourne
    Posts
    1,246
    I made some further experiments. I was baking the mesh using the particles emitter, which I guess is wrong. When I used a new mesh things were better. What to say... is working! The conversion is fast and looks stable, even if I didn't test it with something complex still. The problem now is to get rid of that ball in the centre. A workaround now is to make the size of the whole sim bigger, but this really increase baking times, and does not solve the problem!

    I hope this can be fixed because this plugin is in my opinion really useful!



  20. #20
    Member
    Join Date
    Aug 2007
    Location
    brazil
    Posts
    81
    hey guys! sorry for the delay!

    @Sdados: one thing that you have to keep in mind, is that the particle size needīs to be a lot bigger them the default, toggle the "draw size" button and set the size to more or less .2 / .3, until they overlap a little bit with each other, the problem with this, is that when using a SPH particle system the size affects the simulation, so my tip is to use a simpler particle system just to get familiar with the whole baking stuff

    about the big ball in the middle: the solution that I used is to bake the particle simulation away from the scene origin (0,0,0), that way the big metaball does not affect the generated mesh, and them use another UV sphere on top of it with a Mask material... very hackish =(



Page 1 of 3 123 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
  •