Volume evaluation problem
-
gustavoeb
- Moderator
- Posts: 587
- Joined: 20 Jul 2010, 22:33
- Skype: gustavoboehs
Volume evaluation problem
Does anyone know a workaround to this?
It seems like the self.Volume attribute is not evaluated before ICE finishes reading an entire ICE tree and going to the next... its a pain if you want to do volume preservation...
Is there a way to force the refreshing of this attribute, or to calculate the volume of geometry in some other fashion (preferably a easy one)?
I have attached two images to prove my point... in the first one I get self.Volume twice in the same Tree, before and after deformation, as you can see I get the same result in both evaluations. In the second image I create a new tree (on top of the first one) and then it works perfectly...
It seems like the self.Volume attribute is not evaluated before ICE finishes reading an entire ICE tree and going to the next... its a pain if you want to do volume preservation...
Is there a way to force the refreshing of this attribute, or to calculate the volume of geometry in some other fashion (preferably a easy one)?
I have attached two images to prove my point... in the first one I get self.Volume twice in the same Tree, before and after deformation, as you can see I get the same result in both evaluations. In the second image I create a new tree (on top of the first one) and then it works perfectly...
You do not have the required permissions to view the files attached to this post.
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/
Blog: http://www.gustavoeb.com.br/
-
gustavoeb
- Moderator
- Posts: 587
- Joined: 20 Jul 2010, 22:33
- Skype: gustavoboehs
-
rray
- Moderator
- Posts: 1810
- Joined: 26 Sep 2009, 13:51
- Location: Bonn, Germany
Re: Volume evaluation problem
There's a simple algorithm to calculate the volume by adding up all the signed tetahedrons built from the mesh triangles to (0,0,0):
http://stackoverflow.com/questions/1406 ... is-made-up
http://stackoverflow.com/questions/1406 ... is-made-up
softimage resources section updated Sep 26th 2026
-
Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 22:38
- Location: St. Thomas, Ontario
Re: Volume evaluation problem
I suspect you are reading the same variable before and after deformation but the variable has not being updated when you read it again.
Disconnect the top branch (port 1) and see what is the result of the volume after deformation. Any Change?
You may have a case were a delay node is required so that you don't read the same variable value of sphere1.volume twice.
Some info here:
http://xsisupport.wordpress.com/2011/12 ... -evaluate/
And here (read initializing set data and delaying set data)
http://softimage.wiki.softimage.com/xsi ... ETrees.htm
Hope that help!
Disconnect the top branch (port 1) and see what is the result of the volume after deformation. Any Change?
You may have a case were a delay node is required so that you don't read the same variable value of sphere1.volume twice.
Some info here:
http://xsisupport.wordpress.com/2011/12 ... -evaluate/
And here (read initializing set data and delaying set data)
http://softimage.wiki.softimage.com/xsi ... ETrees.htm
Hope that help!
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: Volume evaluation problem
Try with two ICE Trees.
First one applies the deformation.
Second one reads the volume.
Second is above the deform op in the stack.
UPDATE Oops, I see you already mentioned that.
Is this so bad?
Most likely ICE is caching some values, that's my guess.
First one applies the deformation.
Second one reads the volume.
Second is above the deform op in the stack.
UPDATE Oops, I see you already mentioned that.
Is this so bad?
Most likely ICE is caching some values, that's my guess.
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: Volume evaluation problem
I don't repro in 2012 SAP.xsisupport wrote:Try with two ICE Trees.
First one applies the deformation.
Second one reads the volume.
Second is above the deform op in the stack.
UPDATE Oops, I see you already mentioned that.
Is this so bad?
Most likely ICE is caching some values, that's my guess.
Sphere on the right is a frozen duplicate, to show the final volume.
During playback, I see the same values displayed by both Show Values.

-
gustavoeb
- Moderator
- Posts: 587
- Joined: 20 Jul 2010, 22:33
- Skype: gustavoboehs
Re: Volume evaluation problem
Same thing, I get the volume before the deformationDaniel Brassard wrote:Disconnect the top branch (port 1) and see what is the result of the volume after deformation. Any Change?
The exact opposite, I do want to read the variable twice (once before and once after the deformation), with a delay node both values SHOULD look the same (as far as I understand it). Anyhow I tested it, and it does no workDaniel Brassard wrote:You may have a case were a delay node is required so that you don't read the same variable value of sphere1.volume twice.
It would not bee if I was cooking up something for my own use... But since I want to build something and encapsulate in one easy-to-use compound, it is annoying. A better workaround would be prefered.xsisupport wrote:Oops, I see you already mentioned that.
Is this so bad?
As far as I can see it, you repro it just fine, self.Volume is the same both before and after the deformation, which is NOT true. The only different thing is that both values seem to be the value after deformation. It seems so, but that is not what I get in my testings over here... Are you sure you are displaying the self.Volume atribbute in your frozen sphere, or are you displaying one of the custom attributes you have created?xsisupport wrote:I don't repro in 2012 SAP.
To exemplify what I mean take a look at this image. I have a AttributeDisplay property on both spheres on the left and right, as you can see they clearly differ in volume, and as you can also see that does not show in my ice tree
You do not have the required permissions to view the files attached to this post.
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/
Blog: http://www.gustavoeb.com.br/
-
gustavoeb
- Moderator
- Posts: 587
- Joined: 20 Jul 2010, 22:33
- Skype: gustavoboehs
Re: Volume evaluation problem
Bressard, I took a closer look at the links you sent me and you are right! 
I was not doing the right thing, was connecting everybody to the delay node... now if I only connect the second evaluation things go just right
Thank you very much sir!
(and here is the "image or it didnt happend)
I was not doing the right thing, was connecting everybody to the delay node... now if I only connect the second evaluation things go just right
Thank you very much sir!
(and here is the "image or it didnt happend)
You do not have the required permissions to view the files attached to this post.
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/
Blog: http://www.gustavoeb.com.br/
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: Volume evaluation problem
I'm sorry, my mistake.As far as I can see it, you repro it just fine, self.Volume is the same both before and after the deformation, which is NOT true. The only different thing is that both values seem to be the value after deformation. It seems so, but that is not what I get in my testings over here... Are you sure you are displaying the self.Volume atribbute in your frozen sphere, or are you displaying one of the custom attributes you have created?
-
gustavoeb
- Moderator
- Posts: 587
- Joined: 20 Jul 2010, 22:33
- Skype: gustavoboehs
Re: Volume evaluation problem
reading my own sentence again... sorry if I sounded harsh
not intentional...
anyhow, the answer was in your blog, as Bressard pointed out... thank you for thaking the time and answer stuff in the forums
anyhow, the answer was in your blog, as Bressard pointed out... thank you for thaking the time and answer stuff in the forums
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/
Blog: http://www.gustavoeb.com.br/
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: Volume evaluation problem
No problem. It was my second mistake like that today! ;-)
Anyways, I can use this thread for another Delay Set Data post...I have a few now.
Anyways, I can use this thread for another Delay Set Data post...I have a few now.
-
Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 22:38
- Location: St. Thomas, Ontario
Re: Volume evaluation problem
You're welcome. I am glad it worked for you. I like this community, friendly folks willing to help!
Cheers!
Dan
Cheers!
Dan
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif