Any way to calculate volume ?

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
User avatar
cheeseburger
Posts: 108
Joined: 20 Oct 2011, 10:56

Any way to calculate volume ?

Post by cheeseburger » 09 Mar 2014, 20:25

Hi,
I need to calculate the volume of a hill that I made from a grid. Is there any way to calculate it's volume ?

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Re: Any way to calculate volume ?

Post by gustavoeb » 09 Mar 2014, 21:11

self.Volume will give you the current volume of any mesh

to ge the volume of a hill (assuming you have displaced it) you could also get the area of each polygon (self.polygonarea) and multiply that by however much units you displace the damn thing...

hope it helps
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

User avatar
cheeseburger
Posts: 108
Joined: 20 Oct 2011, 10:56

Re: Any way to calculate volume ?

Post by cheeseburger » 09 Mar 2014, 21:35

Hi gustavoeb, Thanks for the reply. Would you mind spelling it out for me, I'm not so great with ICE. (Just the self.Volume) Thanks

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Any way to calculate volume ?

Post by Bullit » 10 Mar 2014, 01:15

I think you need to close hill mesh to have volume.(Edit i was wrong about this. A grid works, if deformed it is probably imagining the ground level in most lower point and assumes a ground plane there)



Then with a get data node and put it self.volume , if you go to attribute list is the last one. Note that scale doesn't seem to be taken in account, just moved points.

here is an example of a default cube which is 8 units per side so volume 8*8*8=512 , i move the point a bit and gave that slight increased volume.
CubeVolume4.jpg

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Re: Any way to calculate volume ?

Post by gustavoeb » 10 Mar 2014, 02:44

sorry cheeseburger, here is how it is done... by the way, nice nickname :)

edit: I forgot to comment the final node, "get set sum" it will get the values for every polygon and sum them all... and that's it!
Attachments
Capturar.JPG
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

User avatar
cheeseburger
Posts: 108
Joined: 20 Oct 2011, 10:56

Re: Any way to calculate volume ?

Post by cheeseburger » 10 Mar 2014, 10:12

Thank you so much gustavoeb and Bullit. Very cool stuff.

I tried matching ICE trees to your images and it appears I'm doing something wrong with the "Set Data" node. It's red. When I double click it, it has "Reference" slots with Explorer or pick choices. What should I be plugging in there ? (real noob, but very keen)

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Any way to calculate volume ?

Post by Bullit » 10 Mar 2014, 22:03

You have to do some basic tutorials, in how to get attributes. You can't dive in Ice without doing some basic tutorials.

http://www.si-community.com/community/v ... 74&start=0




User avatar
cheeseburger
Posts: 108
Joined: 20 Oct 2011, 10:56

Re: Any way to calculate volume ?

Post by cheeseburger » 11 Mar 2014, 00:51

Cheers Bullit !
That's so inspiring. Particularly the LOD set level of detail to camera distance ...omg.
One thing ... In your examples and in gustavoeb's example I put in the preceeding node's name after self and they both work ! Is that the rule of thumb regarding "set data" or was I just lucky.
Awesome stuff. I'm definitely going to put in some ICE time. I'll never understand Autodesk's decision. ICE is just brilliant. And so are you guys ! thanks for the help

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Any way to calculate volume ?

Post by Bullit » 11 Mar 2014, 01:53

If you put any name that ICE doesn't recognize that means you are creating a new attribute. A common way is to write self.tmp to have an attribute called tmp. But usually people use a more descritive word or phrase.

Get a get data node, then use the explorer in that get data node if you go to the object or point cloud that has the ice tree you see the attribute list. May blue squares with respective name
If you make a set data node with self.tmp then the TMP attribute will appear in that list.

If instead you write to attribute that already exists, like color, means you are changing the color. So a set data with attribute self.color means you are changing the color because this attribute already exists by default.

http://softimage.wiki.softimage.com/xsi ... m#Rjn61166

What ICE has good is that what you'll learn here will make you understand the guts of 3D applications.
Last edited by Bullit on 11 Mar 2014, 02:03, edited 1 time in total.

User avatar
cheeseburger
Posts: 108
Joined: 20 Oct 2011, 10:56

Re: Any way to calculate volume ?

Post by cheeseburger » 11 Mar 2014, 02:00

Very cool ......Thanks

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Any way to calculate volume ?

Post by Bullit » 17 Mar 2014, 16:22

Gustavo can you check your PM, i don't think the volume is correct

User avatar
cheeseburger
Posts: 108
Joined: 20 Oct 2011, 10:56

Re: Any way to calculate volume ?

Post by cheeseburger » 17 Mar 2014, 16:30

Hey Guys, just some feedback ... I had better luck all round with Bullit's solution, at least for I wanted to do. By the way Thanks again both of you for some great inspiration and for giving me a workable scenario

Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests