Getting ICE attribute values with greater precision


As you know, in Softimage all scalar (aka floating point) values are displayed with 3 (or sometimes 4) decimal places. For example: 0.333 instead of 0.33333333333…

One way to display the attribute value with greater precision is to use the Log Values node, and multiply the attribute value by some power of 10 (to get more digits). Hat tip to Leonard Koch for that suggestion.
ICE_attribute_values
The above Log Values outputs this:

# INFO : 4000 - elt 0: 3333333504.000000

You could also use scripting. But note how I get 0 for the attribute named _tmp, even though it is clearly set to 0.3333333333333 in the ICE graph.

x = si.Selection(0)
y = x.ActivePrimitive.Geometry.ICEAttributes( "tmp" )
if y.IsDefined:
	print "tmp = %.10f" % y.DataArray[0]
	
y = x.ActivePrimitive.Geometry.ICEAttributes( "_tmp" )
if y.IsDefined:
	print "_tmp = %.10f" % y.DataArray[0]

# tmp = 0.3333333433
# _tmp = 0.0000000000

Finally, here’s a quick hack using a proxy parameter and the SDK explorer:
ICE_attribute_values2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s