Search Unity

Particles BlobMesh renderer [WIP]

Discussion in 'Made With Unity' started by remix, Nov 10, 2011.

Thread Status:
Not open for further replies.
  1. remix

    remix

    Joined:
    Dec 11, 2009
    Posts:
    61
    Hello everybody.

    I'm currently working on making a particles renderer that behaves like the so called "Blob Mesh" in 3dsMax.
    If I'm fine with the result, I target to release it on the asset store.

    Here's a quick video capture of how it looks like for now :


    I'ts in an early stage, with basic editing and almost no optimization. Sorry for the small framerate, my computer is getting old and hardly handles fullscreen video capture ^^.
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,450
    ..waiting for webplayer demo.. : )
     
  3. remix

    remix

    Joined:
    Dec 11, 2009
    Posts:
    61
    @mgear : Here it is ! But watch out, It's not really optimized for now. Link
     
  4. remix

    remix

    Joined:
    Dec 11, 2009
    Posts:
    61
    Hey, new version !
    I managed to get this to render by chunks, so we have gained some performances.
    I added a "Multi-Thread" button, that switch On and Off the chunks calculations as a Coroutine (Not sure if this is multithreaded, somebody can help ?), but it doesn't seams to change really yo much.

    So in this version, there is a big render zone, when before there was 3 (the seams were hidden by boxes ...).

    Click on the image to try !



    I haven't managed to get the particles to softly "slip" on the box colliders, they're bouncing instead. Does anyone have an idea on how I can achieve this ?
     
  5. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    If you reach the level of Portal 2 I'll buy it.
     
  6. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Coroutine != multi-thread.

    Nice work though.
     
  7. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,450
    You migth get nicer physics using instanced rigidbody spheres,
    then you can adjust physics material for friction/bounciness.
    (and you could pull/push the water around easier)
     
  8. remix

    remix

    Joined:
    Dec 11, 2009
    Posts:
    61
    @megmaltese : You're talking about something like this :



    Again, click the image to test the webplayer.
     
  9. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Very very nice...

    6R
     
  10. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Well it's not the splash, but the fact that the mesh someway "vibrates", I think it's due to the low resolution of it.
    But if you will be able to reach a higher resolution with good framerate I may be really interested :)
     
  11. larvantholos

    larvantholos

    Joined:
    Oct 29, 2009
    Posts:
    668
    Nice work, this could be really fun for a few things.
     
  12. remix

    remix

    Joined:
    Dec 11, 2009
    Posts:
    61
    Well, now it gets tricky ... I works quite well but to slow ... I need to find a way to speed this up.
    Any idea ? If I convert my scripts from JS to C# will the performances be increased ? Any way to do real multi-threading ?

    Help :)
     
  13. KelsoMRK

    KelsoMRK

    Joined:
    Jul 18, 2010
    Posts:
    5,539
    Changing languages won't change your performance one way or the other. You can do multi-threading just like you would any other C# application. The only caveat to that is Unity is not thread safe so you can't interact with the engine outside of the main thread. Now, that being said, there is no reason you can't offload calculations to a separate thread and marshal the result back into the main thread for the engine to use.
     
  14. remix

    remix

    Joined:
    Dec 11, 2009
    Posts:
    61
    Ok, so, new update !

    I managed to improve a bit the performances by re-thinking the way the renderer works. Also, the "vibration" thing is less visible.
    Next step is to work on the merging of the particles to be more smooth. And always, optimise :D .

    You can try this webplayer, it's quite the same but you can test how the precision factor affects the aspect and speed of the renderer.

     
  15. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    very cool
     
  16. Robbilie2

    Robbilie2

    Joined:
    Aug 4, 2010
    Posts:
    262
    may u add an fps counter...?

    anyways this is great and may be fun for fluids :)
     
  17. Dan Dixon

    Dan Dixon

    Joined:
    Jan 18, 2012
    Posts:
    4
    Any update on the progress of your Blob Mesh / metaballs project?
     
  18. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    Theres no way this could work on an iphone right?
     
  19. remix

    remix

    Joined:
    Dec 11, 2009
    Posts:
    61
    @Dan Dixon: Sorry, I'm working on some other personal projects right now, but this one is always on my to-do list. I'm trying to optimize my scripts to gain some performance and also trying to avoid the "vibration" effect. I've got some ideas to achieve this, I just need to take the time to test it.

    @macdude2: Well, I don't have a android or iphone license, so I can't be sure. All the calculation is done on the cpu, the platform should no have influence on this. But I think that it would probably be laggy on mobile ^^.
     
  20. stefmen

    stefmen

    Joined:
    Apr 14, 2009
    Posts:
    791
    @macdude2: Well, I don't have a android or iphone license, so I can't be sure. All the calculation is done on the cpu, the platform should no have influence on this. But I think that it would probably be laggy on mobile ^^.[/QUOTE]

    would it? what if u use a unlit material on it so you can make the mesh less smooth?
     
  21. stefmen

    stefmen

    Joined:
    Apr 14, 2009
    Posts:
    791
    @macdude2: Well, I don't have a android or iphone license, so I can't be sure. All the calculation is done on the cpu, the platform should no have influence on this. But I think that it would probably be laggy on mobile ^^.[/QUOTE]

    would it? what if u use a unlit material on it so you can make the mesh less smooth?
     
  22. remix

    remix

    Joined:
    Dec 11, 2009
    Posts:
    61
    @stefmen: The rendering isn't the big issue now. My first goal is to make it work smoothly on pc. But by making the the mesh less smooth it would have a blocky aspect...
     
    Last edited: Feb 15, 2012
  23. AkhmadMax

    AkhmadMax

    Joined:
    Jun 15, 2012
    Posts:
    3
    Hi. How do you generate metaballs geometry? Are you using marching cubes method from unifycommunity?
     
  24. FelinaLain

    FelinaLain

    Joined:
    Aug 21, 2013
    Posts:
    14
    Any news about this? Because it look amazingly awesome...
     
  25. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's been 5 years, so I guess not. Locking this.
     
Thread Status:
Not open for further replies.