Results 1 to 10 of 10
  1. #1

    Volume calculator

    Volume calculation is now included in my personal Blenderbuild:

    http://www.silentthunder.de/files/blenderintel.zip

    check the mesh editing menu:



    The label below "TexMesh" shows either the volume or surface after clicking the appropriate button somewhat below.

    Altering size of an mesh/object will result in change values (after clicking buttons again)
    An "open" mesh will give wrong results for volume but surface will still be correct.



  2. #2
    tlustoch's Avatar
    Join Date
    Aug 2003
    Location
    Piestany, Slovakia
    Posts
    56
    Wouldn’t it be easier to calculate the volume exactly? Simply take each triangle and calculate volume of the prism under the triangle. If normal points down, subtract it. If normal points up add it. So you get the total volume. The conditions for the body are similar as yours. The normals have to point outside the body and the body has to be closed. It does not need to be convex.



  3. #3
    If you know about that method (or if it comes to your mind), yes.
    Sombody on Blender.org already pointed that out and i've just implemented it
    Works great.



  4. #4
    Member
    Join Date
    Jul 2002
    Posts
    2,752
    This would be great for softbodies, like gel and the suchlike. a force on each face proportional to the volume difference as well as gravity.
    What kind of speeds could you get for this, anything apporaching usable for animations (not realtime, just for simulations)?

    Ian



  5. #5
    Well the algorithm i am using can calculate the volume AND surface of a 20480 polygon object (#5 ico-sphere+1x subdivide) within 0.01 second.

    EDIT:
    i am so proud (preview):



  6. #6
    this algo will utterly fail on something like this
    http://www.matheboard.de/lexikon/Kle...definition.htm

    and you can bet, *artists* will model something like that

    So i would not want to rely on it for general softbody dynamics.

    btw. Maya and co rather use *simple* tricks to get nice results. Having *real* volume preservation is something for FEM on high speed clusters.

    /BM



  7. #7
    Member z3r0 d's Avatar
    Join Date
    May 2002
    Location
    /dev/null
    Posts
    7,264
    Originally Posted by bjornmose
    this algo will utterly fail on something like this
    http://www.matheboard.de/lexikon/Kle...definition.htm

    and you can bet, *artists* will model something like that

    So i would not want to rely on it for general softbody dynamics.

    btw. Maya and co rather use *simple* tricks to get nice results. Having *real* volume preservation is something for FEM on high speed clusters.

    /BM
    a klien bottle [as it is called in english as far as I know, haven't seen them formally] doesn't have an inside or out, so of course it would utterly fail

    as mentioned, it requires proper normals, which doesn't make sense [in 3 dimensions] for a klien bottle

    [but it is an interesting point nonetheless, I'd imagine an artist would unlikely create a single sided surface and they probably can understand the concept of why it wouldn't work]
    For fast-acting relief, try slowing down.



  8. #8
    Member
    Join Date
    Jul 2002
    Posts
    2,752
    btw. Maya and co rather use *simple* tricks to get nice results. Having *real* volume preservation is something for FEM on high speed clusters.
    True, but using volume calculation that is as fast as that, as well as surface calculation, a nice soft-body effect could be done. The volume need not be preserved, just the forces need to be calculated to low accuracy. To preserve the volume would require more accurate solutions after the volume calculation rather than this.


    Ian



  9. #9
    Member jackblack's Avatar
    Join Date
    Oct 2004
    Location
    In Your Closet!
    Posts
    2,495
    How do I use your program?



  10. #10
    I've included it in my x86 Optimized build. Check the first post of this thread.

    For the speed thingy again:
    If i create a UV sphere with 32x32 and appliying several subdivison such that it got 256144 polygons and then clicking my Volume/Surface buttons i cannot recognize a lot of delay till the result shows up.

    And i guess a single mesh with 256k polys is already considered "large"



Posting Permissions

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