Page 1 of 11 123 ... LastLast
Results 1 to 20 of 216
  1. #1
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554

    [Addon] Moleculars physics

    NEWS ! : FAST (30 times faster with more features) COMPILED C BETA VERSION RELEASED ON MY BLOG!


    Hi,

    I start this thread to share with the community my experience about my first script I did just for fun.
    It's a kind of log of my experience too. Hope you have fun to check my progress and eventualy use my script than I have fun to construct and play with it!

    History: In 1999 , at 15years old on my really fast 200mhz I find a little program where you can create 2d particles , called atoms. You can give to these ''atoms'' different property and make links between them to make different material. You can create 2d shaped react like water , jello , ice and many others thing. You can tears solid shape if to much force is applied. In my memory the apps is very cool ... and I never find it again after ( if somebody find it , let's me know.) 2009-2010 I see what Thiago Costa did with XSI and the powerfull ICE node programming and it's seem to be near that what the old software does but in 3D. August 2011 , I'm starting to learn python for XSI and start to play with Blender API. I'm starting my script with GameEngine and it's rigidbody physics.

    I find on this website: http://en.myinventions.pl/index.php?...ingsAndDampers how to create my own spring/damping constraint. This research give v01 and v02 below. But I see really fast the maximum of rigibody object BGE can handle. After 15 000objects , the memory goes too high (and I have a computer with 24Gb of ram) and crash.

    In september 2011 I change the way I want to did it and start to apply the same formula on particles(v15 and more). Blender can easy handle millions of particles without crashing. That begin to be interesting. My biggest problem now is I cannot have access to subframe with particles by python. I send a private message Jahka and he tell me it's not possible to access subframe particles loop for now. But I simulate subframe by stretching the timestep. Not really practical but it's work.

    My Blog about the project:
    http://pyroevil.com/category/scripts...ecular-script/

    Docs:
    http://pyroevil.com/molecular-script-docs/

    Download Page:
    http://pyroevil.com/molecular-script-download/

    Sources (github):
    https://github.com/Pyroevil/Blender-Molecular-Script



    VIDEO:

    ***NEW***Cloth test[720p]:


    ***NEW***Hair test[720p]:


    Beta version trailer[720p]:
    Cube of wet sand[720p]


    Rope Simulation[720p]


    Pasta Machine !!!:

    Link at bird test:

    [720p] Compilation of test with links integration:
    [720p] test

    with simple collision and mass reaction:



    [720p] First test with self collision:




    old with my own verlet python particles system:


    v10[HD1080p] 64 000 particles with collision response and friction:

    http://www.youtube.com/watch?v=fdcwM33kxWQ

    v07[HD1080p] 16 000 particles with Polygon collision (rendered on renderfarm.fi):

    http://www.youtube.com/watch?v=cKIYcrJUf_w

    v06[HD720p] 250 000 particles with Self-Collision gridhashing system:
    http://www.youtube.com/watch?v=2CFAHxu_hQc

    v05[HD720p] Collision with friction and air-damping:
    http://www.youtube.com/watch?v=uoK4QV3jg58

    v04[HD720p] First verlet integration with inelastic self collision:
    http://www.youtube.com/watch?v=xPu27rzHvRw


    old with blender particles system:
    v029[HD720p] Empty Pumpkin ~50 000 particles:
    http://www.youtube.com/watch?v=8rDUEcITCME

    v026[HD720p] Suzan ~212 000 particles:
    <a href="http://www.youtube.com/watch?v=oE112EzvDQs" target="_blank">

    v017[HD720p] Cube ~69 000 particles:
    http://www.youtube.com/watch?v=aaypU86HyGw

    v015 [HD720p] Cube ~32 000 particles:
    http://www.youtube.com/watch?v=oHnY0wDFCtU


    old with BGE rigidbody:
    v01:
    http://www.youtube.com/watch?v=uzWac...eature=related
    v02:
    http://www.youtube.com/watch?v=nLUfw...eature=related




    The source code of my script and more details about my first script journey is coming soon. Hope a get help from more experimented coders too ( optimization or better way to do thing) ! All comments are welcome !


    "If I create this thread at the wrong place, just let's me know... because I don't find a WIP script in the coding section."
    Last edited by Pyroevil; 28-Aug-14 at 08:11.



  2. #2
    file is too big i cannot upload 67 MB

    i'll see if can find a way to explained this !


    but easy to run

    just run it with Alt-A and it will fill the bowl with the little spheres


    hope it helps
    Nice 3D models = 25 % KISS + 25 % common sense + 25 % Inspiration + 25 % Knowledge
    Wn 8.1 64 bits / Thanks and a Happy 2.72 with Cycles



  3. #3
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554
    67mb file ?

    Sorry , I don't really understand
    I don't share any files for now in this thread.
    Last edited by Pyroevil; 12-Oct-11 at 14:58.



  4. #4
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554
    Hi all !

    Today I ask the this question to this thread:
    http://blenderartists.org/forum/show...self-collision

    For now SPH is the way a manage self collision but it's not accurate. If no other solution is available ... it's a lot complicated to
    script self-collision ? Probably I need to build a octree ... kdtree or bvhtree to avoid passing trought all particles
    one by one and checking if it's collide with all others particles one by one. A "particles neighbours" exist in the API ?



  5. #5
    Member
    Join Date
    Apr 2007
    Location
    Gothenburg, Sweden
    Posts
    138
    Wow this looks really cool!

    Wonder why you don't have any comments...

    I'm really interested in trying your script.

    Keep up the good work!



  6. #6
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554
    Thank Peddie !
    I don't know why too. I receive no respond for my answer too.
    Btw , I continue my research and playing with my script.
    When I get a bit more cleaner and usable/stable/user-friendly version , I
    release it on this thread.

    I post 3days ago another question for my setup. I get weird things with particles when
    a access to subframe:
    http://blenderartists.org/forum/show...rame-particles

    For now I fake it with a poor workaround by decreasing the particles timestep. This is bad because you need to slow down all your ipo-curve animation(if you have one) by this factor for the simulation and you need to remap the time when you render. For example, if I want to fake a 40subframe , I put my timestep of the particles systems from 0.04 to 0.001 and need to cache 4000frames to give me only a real 100frames when a remap it at render time. This is not really easy for the user and the cache consume a lot of disk space just for 100frames (because 4000frames is writed on the disk).

    I hope to get help or find the solution myself.
    Last edited by Pyroevil; 17-Oct-11 at 07:54.



  7. #7
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554
    I find somethings weird when I use subframe with particle!
    Take a look on the tread of this problem: http://blenderartists.org/forum/show...=1#post1970791



  8. #8
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554
    I upload a new video on youtube with 69 000 particles simulation this time !

    http://www.youtube.com/watch?v=aaypU86HyGw



  9. #9
    Member
    Join Date
    Apr 2007
    Location
    Gothenburg, Sweden
    Posts
    138
    I just finished watching the last video and all I can say is WOW!

    Pyroevil, this looks really great and very much like Lagoa for XSI Ice.

    I thought that this "molecular-type" of particles could already be achieved with the current SPH-particles and springs, without using any code, but after a long time of testing it seems not (sad).

    What feels a little awkward to me is that it takes 5000 simulation frames for a 90 frame sequence, is there any solution to that?

    Great work!



  10. #10
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554
    Thanks Peddie!

    Yes , it's similar than Lagoa! I work with a friend knows Tiago Costa, the creator Lagoa. Me and this friend did friendly competition and make similar simulation , my friend in Lagoa and me with my script. My script is slower than Lagoa but it's normal. My friend find my simulation great because you really feel the mass. Anyway Lagoa have really more complex features then my script. And the force of Lagoa is you can make many thing interact each other like cloth and fluid. I'm far a way of the real thing like Lagoa.

    And yes , SPH is not the same. I already done the test you probably did. SPH have force to simulate surface tension of fluid and you shape goes always round at the end.

    And for the "5000 simulation frames for 90renders frame" problem, I try many ways to find a workround but nothing do the job correctly. I ask on Blender Artist and BlenderQA amd nobody answer me ... no comment ... nothing.
    I think it's a bug and I report it in the bug tracker.

    Thanks peddie for you support
    Last edited by Pyroevil; 30-Nov-11 at 15:46.



  11. #11
    Member kilon's Avatar
    Join Date
    Sep 2007
    Location
    Greece , Athens
    Posts
    1,527
    I see alot of potential here, but unless you publish your code to github, svn etc so we can follow it and even contribute to it , it will be hard for you to get any serious feedback from the python wizards .

    When we come against a speed problem in python we do the following

    1) profile, using the profiling tools of blender it will be easy to find accuretly which functions and which code exactly performs slower than our expectation

    2) We go back to our code to decide : a) is it our fault b) is it blender's fault c) is it python fault

    3) if (a) we improve our code if (b) we try to work around blende's limitation via cheating if (c) python is slow because is dynamic, using static types makes things much faster, static types can be achieved via the array module, via numpy , or via ctypes , cython and other similar tools

    4) If the problems persist we ask for the contribution of more experienced wizards.

    In short -> Publish your code in a version controlled system (github /svn ) and then we can discuss with no misunderstanding and no speculations.
    http://kilon.blogspot.com/ <--- This my blog, you will find things i make here like music, 3d and 2d graphics and python programming.




  12. #12
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554
    Thank Kilon.
    For now the speed is not really my big problem. Subframe bug is more important for me now.
    I'm a newbie in coding. I never worked with a SVN or GitHub and don't know the process.

    Thank again and I check for GitHub soon.



  13. #13
    Member kilon's Avatar
    Join Date
    Sep 2007
    Location
    Greece , Athens
    Posts
    1,527
    Originally Posted by Pyroevil View Post
    Thank Kilon.
    For now the speed is not really my big problem. Subframe bug is more important for me now.
    I'm a newbie in coding. I never worked with a SVN or GitHub and don't know the process.

    Thank again and I check for GitHub soon.
    Github websited contains detailed instruction how to set it up, basically you create an account, a public key for authorisation of your computer and then a public repo where your source code and all your commits are stored. Commit is actually the description of the changes you made to your code.

    From there on you can use this GUI client http://www.syntevo.com/smartgit/index.html , i use both smartgit and github and they very ease to use. From there on each commit of your code is just a press of a button (sync). Setup should take you no more than 10 minutes , commits should take you more than 10 seconds .

    Github will offer both downloads for your users , links to your source code , tools to compare diffirent versions of your code and a detailed history of your code commits (changes). All that tools work automatically they need no setup and they are very easy to use. There is also wiki function, and even a forum kind for bugs and issues that your users may experience.

    If you need help for anything you will find me and most of the python wizards (from wizard masters to apprentices) at #blenderpython in irc.freenode.net , any irc client can take you there. We await you for any , questions, help or random idea. Dont worry about being new to coding, does not matter , python is pure magic, python is pure fun. If you enjoy it you do it right.
    Last edited by kilon; 21-Oct-11 at 09:09.
    http://kilon.blogspot.com/ <--- This my blog, you will find things i make here like music, 3d and 2d graphics and python programming.




  14. #14
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554
    Seriouly , thank again Kilon !

    I a bit more understanding why I don't receive answer or comment for my little project.



  15. #15
    Member kilon's Avatar
    Join Date
    Sep 2007
    Location
    Greece , Athens
    Posts
    1,527
    Originally Posted by Pyroevil View Post
    Seriouly , thank again Kilon !

    I a bit more understanding why I don't receive answer or comment for my little project.
    My pleasure, I hope I see you soon at #blenderpython would love to chat with you.
    http://kilon.blogspot.com/ <--- This my blog, you will find things i make here like music, 3d and 2d graphics and python programming.




  16. #16
    Member
    Join Date
    Apr 2007
    Location
    Gothenburg, Sweden
    Posts
    138
    Any news Pyroevil? I really wish for more demo videos of your script.



  17. #17
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554
    Don't worry Peddie ;-) It's just because I did a lot of unsuccessfull (for me,I am a little perfectionist) simulation. I try to did a huge one with 250 000 particles but it's not easy and it's take 3 to 5 days to simulate. And I try to figure out if it's easy to do a low resolution simulation first and get a similar result if you increase the number of particles after that. I launch a test with suzan today, I hope the effect is cool!



  18. #18
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554
    A new video with suzan and 212 000 particles:

    v26:
    http://www.youtube.com/watch?v=oE112EzvDQs
    PyroEvil
    --My Blog--molecular script--NNetwork AI---My Youtube--
    Sorry for my poor english!



  19. #19
    Member
    Join Date
    Apr 2007
    Location
    Gothenburg, Sweden
    Posts
    138
    WOW!

    This is really starting to look more than awesome..! I've been watching this thread every day since your last post, and it definitively was worth it!

    I'm a little scared of the simulation times though, do you have any further ideas of how to make them shorter? The script should probably be coded directly in C, tied to the SPH-particles(springs), for best performance...

    What is your future plans with this script?

    Did you get any help in the #blenderpython chat?

    Keep up the good work!



  20. #20
    Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    554
    Yes , simulation time is really high.
    I don't know how many slower if I compare to my friend simulation in Softimage with Lagoa. My plan is probably check the performance if I code some part with cython to create C python module like suggested by Kilon.

    For forum , SVN and other things I don't have a lot of time because I'm the fathers of two beautiful kids .
    It's why I don't post news everyday. I know it's a bit frustrated for people like what I did. I have the same feeling about KaiKostack and Phymec script where I waiting for new stuff about weeks ... or months. But I understand he probably have is own good reason like me.

    My first fear is to lost my motivation someday about my little toys. My second fear is to lost the lineflow about my script if I include more experimented coder in the project and just lost any motivation and time to understand how people modify it to get better result.

    But don't worry , I don't plan for now to keep it for myself and I check for svn solution and I want to put the source available for everyone.
    Last edited by Pyroevil; 30-Nov-11 at 15:47.
    PyroEvil
    --My Blog--molecular script--NNetwork AI---My Youtube--
    Sorry for my poor english!



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