How to calculate volume and surface area of models

   19382   4   1
User Avatar
Member
3 posts
Joined: May 2010
Offline
I am using houdini to model the prototype of an RC-vehichle we are building. Houdini is great for modeling physical conditions like drag, gravity, friction etc., but now that we're actually building the thing in real life I need to determine the volume and surface area of each part.

Is there a straightforward way of doing this?
User Avatar
Member
9415 posts
Joined: July 2007
Offline
you can use

Measure SOP
it can compute Area or Volume per primitive as Primitive attribute
then to get Area/Volume of the whole input mesh you need to append
AttributePromote SOP
and set it to
Original Name: area (or volume)
Original Class: Primitive
New Class: Detail
Promotion Method: Sum

then you can find Detail Attribute of the same name on your geometry and it will contain Area/Volume of the whole geometry
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
3 posts
Joined: May 2010
Offline
Excellent, just what I was looking for, thanks!

Now, when I have the volumes and areas inside the different objects, is there a straight forward way of displaying these properties next to the objects in a viewport?
User Avatar
Member
9415 posts
Joined: July 2007
Offline
not sure if straightforward enough but you can

create font SOP
in text parameter write some expression like

Volume : `detail(“../null1”, “volume”, 0)`

../null1 is the path to SOP which contain Detail Attribute named “volume” and it's value will be returned by detail() expression
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
3 posts
Joined: May 2010
Offline
It works perfectly, thanks again!
  • Quick Links