Announcement

Collapse
No announcement yet.

Metaballs for VRay

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    nice work jerry, Im loving the 'open' developing going on here, its very interesting to see the nuts and bolts of the development.
    Keep up the good work
    Chris Jackson
    Shiftmedia
    www.shiftmedia.sydney

    Comment


    • #47
      Hi Jerry,

      from what I recall it's something like:
      Code:
      Point3 a = Point3(0,0,0);
      for (int i=0;i<count;i++)
      {
           weight = kernel((pos - blobPos[i]).lengthSqr() / radius2);
           a+= blobPos[i]*weight;
           sum_w +=w 
           sum_r  += blobRadius[i]*weight //if you support different radius....
      }
      sum_r/=sum_w
      a/=sum_w
      fieldstrength = (sum_r-(a-pos).length)
      But don't nail me on that

      Best regards,
      DIeter
      --------
      visit my developer blog

      Comment


      • #48
        What do you think about having metaballs with a form of droplet depending on the direction and speed of particle ?
        I always dream about that.

        And after that, what about UV ?
        Last edited by noel_d3; 23-03-2009, 07:51 AM.

        Comment


        • #49
          Everytime I see this thread I feel the urge to buy a meatball marinara subway sandwich.
          Check out my models on 3dOcean

          Comment


          • #50
            Thanks dimo, well I'm not sure if its now right or wrong. It does produce pretty weird errors when the particle distance isn't exactly the desired because of how to average point lands between two distant blobs.

            http://www.niksula.cs.hut.fi/~jylila...taballs_21.jpg

            There is one model proposed for adding gravitational deformation on metaballs sitting on planar surface. However this pretty special case scenario so I don't think implementing it here would be really useful. Also it requires some additional information not just positions and velocities of particles so using it would require adding the missing data with scripting etc.
            (wscg.zcu.cz/WSCG1998/papers98/Yu_98.pdf.gz)

            Simply stretching the particles along the speed axis wouldn't be too hard but I don't really see how it would be usefull without more complex shape deformation. If you find a good formula/paper where they describe shape falling water droplet with density field I'd be happy to try it out.
            http://www.ylilammi.com/

            Comment


            • #51
              Originally posted by noel_d3 View Post
              What do you think about having metaballs with a form of droplet depending on the direction and speed of particle ?
              I always dream about that.
              Raindrops are round, not a droplet shape. I think they actually flatten out due to air resistance...
              www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

              Comment


              • #52
                Just a test to make sure everything works in animation.

                http://www.niksula.cs.hut.fi/~jylila...ineglass01.mov

                I think the bounding voulme hierarchy could use some better constrains on leaf size / depth... Also after casting the ray into it and finding all the intersecting leaves it uses brute force method to sort them. Dynamic lists are such a pain to optimize. I guess I should search for some better sollutions to it.
                http://www.ylilammi.com/

                Comment


                • #53
                  This looks very nice

                  Best regards,
                  Vlado
                  I only act like I know everything, Rogers.

                  Comment


                  • #54
                    Very cool. Really interesting how this thread has progressed.

                    Comment


                    • #55
                      Thanks for your intrest.

                      Intorducing better control to BVH helped a lot with the render times. With prefered leaf size (~40 particles per leaf) and maximum length (x/y/z) I'd say its even twice as fast in some cases.

                      The one problem I'm still having that intersecting transparencies doesn't work well with the skipTag, glass and liquid for example. The maxError here means the maximum error in distance to the surface that it searches once its found the interection using the "big" steps. Meaning that once Step #30 is outside the object and Step #31 inside, it divides the distance between two in half until the distance between outside and inside points is the maximum error.

                      if (ray.skipTag == this) dist += maxError * 2.;

                      If I set the if clause to be always true (just always add the maximum error twice two every time) everything works fine like seen in the wineglass01 video. But if I only take this small extra step before starting the calculations when skipTag is set to this it doesn't work. It renders black on the intersection.

                      Its not really critical issue, the maxError should always be very small (<0.001) anyway so taking it doesn't really cause any artifacts in the image but its puzzling. I'll probably fix it once the whole thing is otherwise finished.

                      Here is another animation wihtout the glass so you see the fluid better.
                      http://www.niksula.cs.hut.fi/~jylila...ineglass02.mov

                      This stuff is still so slow thats its probably not practical to use it for animation, for high quality stills requiring correct motion blur its perfect.
                      http://www.ylilammi.com/

                      Comment


                      • #56
                        looking really nice.
                        What would be nice is if the metaballs could genreate wetmaps
                        Chris Jackson
                        Shiftmedia
                        www.shiftmedia.sydney

                        Comment


                        • #57
                          really nice and impressive

                          Comment


                          • #58
                            I'm only making a plugin to render the surface. Doing fluid simulations and calculating wetmaps has nothing to do with this.
                            http://www.ylilammi.com/

                            Comment


                            • #59
                              but when you are happy with your settings could you add a sharpen filter like realflow or glue?

                              thanks a lot for your hard work ...very impressive!!

                              mickael

                              Comment


                              • #60
                                Filters like relax and alike are meshbased. As implicits do not generate a mesh at all these filters arent really possible. If i recall right that is.

                                Comment

                                Working...
                                X