ICE - Record Variable in Array for every frame

31 views
Skip to first unread message

Kostas Strevlos

unread,
May 24, 2013, 7:44:25 AM5/24/13
to soft...@listproc.autodesk.com
Hi all,

I've got a question concerning how to record a variable in an array. More specifically, I've got a length parameter, which I calculate from subtracting the current position of a particle from its initial position for every frame. What I need is a list that includes this length value for its particle for every frame.
It feels that is something straight forward but I haven't managed to come up with anything. I've used all the different compound types of an array I could find in ICE but nothing gave me what I wanted. Therefore, I understand that I'm doing something fundamentally wrong...

Any thoughts on that?

Thanks

Kostas

Matthew Graves

unread,
May 24, 2013, 8:17:58 AM5/24/13
to soft...@listproc.autodesk.com
Hi. If you are using a simulated ICE tree you can get an array add the new data to it using the build array node and then set it each frame. this will build a list of lengths upto the current frame. or if its not simulated u can build an array of size=no. of frames and populate it with the lengths from each frame.
 is this what you are looking for?
Matt

Kostas Strevlos

unread,
May 24, 2013, 9:46:20 AM5/24/13
to soft...@listproc.autodesk.com
Hi Matt thanks for the reply! From your description it seems that this is what I am after. I am interested about the simulated version for now. The only part that I am not quite sure how to do is the "set it each frame". Because as far as remember I used a build array node but it did not keep the value for each frame but rather replaced it. So I was left with only one value, the current one. Is it possible to explain that part a little bit more.

Thanks

Kostas

Matthew Graves

unread,
May 24, 2013, 10:14:06 AM5/24/13
to soft...@listproc.autodesk.com
No problem I have included an image of the setup. the scalar number is what you are adding and SomeArray is the array you want to put the value in. In the setup shown the new value is added to the bottom of the list each frame. If you swap the get data and the value it will be added at the top.
This must be done in a simulated ice tree to work.
Inline image 1
this is a setup i use quite often.
Matt
image.jpeg

Ciaran Moloney

unread,
May 24, 2013, 11:55:29 AM5/24/13
to soft...@listproc.autodesk.com
You can also use the push node.
image.jpeg

Kostas Strevlos

unread,
May 24, 2013, 12:19:32 PM5/24/13
to soft...@listproc.autodesk.com
It totally makes sense now! Thanks for the illustration as well. I've seen this sort of set up before but I would have never remembered to use it in this case. Great stuff! Ill have a look at the push node as well. 

Thanks again!

Kostas  
image.jpeg

Christian Freisleder

unread,
May 26, 2013, 3:05:36 PM5/26/13
to soft...@listproc.autodesk.com
"if its not simulated u can build an array of size=no. of frames and
populate it with the lengths from each frame."

how do you build an array on an unsimulated ice tree that is holding
values of other frames than the current???
maybe I don't understand your explanation, but it doesnt't work for me.
as this would be rather helpful, I would love to learn about this trick.

thanks
Christian

Grahame Fuller

unread,
May 27, 2013, 1:51:27 PM5/27/13
to soft...@listproc.autodesk.com
In general it's not possible without a simulation, unless there's a formula you can use to calculate the per-frame values a priori.

gray
winmail.dat

Matthew Graves

unread,
May 29, 2013, 6:26:03 AM5/29/13
to soft...@listproc.autodesk.com
hi Christian. as Grahame said you would need to be able to calculate all the values you want in the array without needing to be on the frame for an unsimulated option. Sorry i was unclear on that.

Christian Freisleder

unread,
May 29, 2013, 6:50:48 AM5/29/13
to soft...@listproc.autodesk.com
Thanks to both of you!
 
that is what I thought  too, but you never now what dirty tricks may get invented by somebody.
 
Christian
 
Matthew Graves <matt...@gmail.com> hat am 29. Mai 2013 um 12:26 geschrieben:
Reply all
Reply to author
Forward
0 new messages