ICE : get kine global position at a specific frame

Discussions about SOFTIMAGEs© Interactive Creative Environment©
eben
Posts: 31
Joined: 29 Apr 2011, 08:55
Location: France

ICE : get kine global position at a specific frame

Post by eben » 21 Mar 2013, 13:34

Hi everybody,

I'm rather new to Softimage, so i don't know if it's obvious or not...

In a non simulated ice tree, is it possible to get kine.global.pos ( or rotation, scale ) at a specific frame of an object ?

Precisely, i would like to emit one particle from a moving object at a specific frame.
For the moment, i copied manualy the vector position, but i prefer to automate the process.

any ideas ?

eben

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 00:41

Re: ICE : get kine global position at a specific frame

Post by EricTRocks » 21 Mar 2013, 15:01

You can't. However, you can create an ICE Tree that checks if you are at a particular frame and have the particles emitted only at that frame.

It's a little confusing in your post as you want to emit particles but in a non-simulated ICE Tree. Is this so or did the wording not come out right?
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

eben
Posts: 31
Joined: 29 Apr 2011, 08:55
Location: France

Re: ICE : get kine global position at a specific frame

Post by eben » 21 Mar 2013, 15:44

thanks !

in fact, i don't use an emitter, but simply "add point" and i animate the point cloud by hand.
I tried to test frame and set data in an attribute, but in non simulated tree, it seems to not keep the value once go past the frame. I just wanted to avoid animate by hand, but it works in this way, so...

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 00:41

Re: ICE : get kine global position at a specific frame

Post by EricTRocks » 21 Mar 2013, 15:55

Any particular reason not wanting to simulate?
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

eben
Posts: 31
Joined: 29 Apr 2011, 08:55
Location: France

Re: ICE : get kine global position at a specific frame

Post by eben » 21 Mar 2013, 16:14

well, just to avoid to cache several particles and an exercise as i feel more comfortable in a non simulated environment. It's not always possible.
I tried also with expression in a constant node, but i didn't find anything. It's strange to not have access to the motion curve at any frame or i miss something ?

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 16:43

Re: ICE : get kine global position at a specific frame

Post by Chris_TC » 21 Mar 2013, 20:34

eben wrote:it seems to not keep the value once go past the frame. I just wanted to avoid animate by hand, but it works in this way, so...
You'll have to use "greater than or equal to" if you're in a non-simulated tree. So that the Add Point is always evaluated when the frame has been reached.
Using the same nodes, a simulated tree instead would add a new point every frame.

eben
Posts: 31
Joined: 29 Apr 2011, 08:55
Location: France

Re: ICE : get kine global position at a specific frame

Post by eben » 22 Mar 2013, 15:56

Chris_TC wrote:
eben wrote:it seems to not keep the value once go past the frame. I just wanted to avoid animate by hand, but it works in this way, so...
You'll have to use "greater than or equal to" if you're in a non-simulated tree. So that the Add Point is always evaluated when the frame has been reached.
Using the same nodes, a simulated tree instead would add a new point every frame.
thanks for your answer,

it's ok for the "add point" but if i try to retrieve the position of an object at a specific frame it doesn't work whatever it's "equal" or "greater than or equal to".

in case of "equal", the position is only evaluated at the specific frame, but the value "doesn't stay" in the attribute after.
in case of "greater than or equal to" the position is evaluated each frame so it's useless.

is there any expression to do that ?

PS : sorry for my random english :)

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 16:43

Re: ICE : get kine global position at a specific frame

Post by Chris_TC » 22 Mar 2013, 18:19

eben wrote:it's ok for the "add point" but if i try to retrieve the position of an object at a specific frame it doesn't work whatever it's "equal" or "greater than or equal to".

in case of "equal", the position is only evaluated at the specific frame, but the value "doesn't stay" in the attribute after.
in case of "greater than or equal to" the position is evaluated each frame so it's useless.
I had a quick look through the expression reference but couldn't find anything. Here's something that worked though:
Create a custom parameter set on your point cloud. Add a custom parameter. Set a scripted operator on the parameter, for example:
Out.Value = Application.Dictionary.GetObject("sphere").posx.Source.Eval(11)

This evaluates the posx of object "sphere" at frame 11 and sets your custom parameter accordingly. The ICE tree can then access the custom parameter via a standard Get Data.

Would love to hear about an easier way though.

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 09:02
Location: Montreal Canada

Re: ICE : get kine global position at a specific frame

Post by xsisupport » 22 Mar 2013, 19:53

In the OM, you can use Primitive.Geometry or Primitive.GetGeometry2 to get the geo at a specific frame/time.
Getting geo from other frames is not really the ICE way methinks.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

eben
Posts: 31
Joined: 29 Apr 2011, 08:55
Location: France

Re: ICE : get kine global position at a specific frame

Post by eben » 12 Apr 2013, 09:02

Thanks for your answers.

I thougth there's an easy way too. I'll dig in custom parameters, i don't know how to use it for the moment... :-\