ICE Object ID to make seed of Random as per object

39 views
Skip to first unread message

pedro santos

unread,
Feb 25, 2014, 10:18:29 PM2/25/14
to Softimage Mailing List
Maybe I did a bad search, but googling "ICE ID Object Random" didn't help much.

What I'm looking for basically is that when I duplicate an object with an ICE Tree using a Random section, that the Seed also changes.
Thought of using the object's ID as seed. Couldn't find something that would be that. "ID" seems to be per-point and I can't even Set Data to a temporary attribute to display its values.

So how do you guys do to have a copy of the same ICE Tree giving a different Seed per object?

Thanks!
Pedro Alpiarça dos Santos

Dan Yargici

unread,
Feb 26, 2014, 2:58:32 AM2/26/14
to soft...@listproc.autodesk.com

As all objects have unique names you can generate a simple integer hash from that.  I made a compound recently to do this.  I'll try and find it when I have a  moment.

DAN

Sent from my phone...

Dan Yargici

unread,
Feb 26, 2014, 5:35:37 AM2/26/14
to soft...@listproc.autodesk.com
Here you go.

Unfortunately, if you rename an object later you'll have to save and reload your scene to see the change as the ICE Reference to String node doesn't appear to refresh when you rename things. :(


Generate Simple Name Hash.1.3.xsicompound

Dan Yargici

unread,
Feb 26, 2014, 5:37:58 AM2/26/14
to soft...@listproc.autodesk.com
On a side note, I was unable to find a way to do this without using a Repeat node, I'd be curious to see if anyone can (or find a better way to generate the hash value).  Not that speed should ever really be a issue using a repeat for something like this.

DAN

pedro santos

unread,
Feb 26, 2014, 2:06:57 PM2/26/14
to Softimage Mailing List
Thanks! Works. Appreciate the heads-up on the name update. I would guess it's an ICE thing.

Yeah I've though of using "Reference to String" and have something like String to Binary, but nope. You approach is nice, basically replacing each letter by it's subarray index in the string "~abcdefghijklmnopqrstuvwxyz1234567890_" and concatenate everything.
I remember in another thread a talk Chris_TC talking about a way of avoiding Repeat node, but the talk didn't develop, further.

To me it just unexpected that there isn't access to something like ObjectIndex, SceneToObjectIndex or something along those lines. So I guess that Softimage doesn't use any unique indices in its operation but always the object unique name.

Cheers





Reply all
Reply to author
Forward
0 new messages