Trigger Sprite image sequence animation - how?

Discussions about animating in SOFTIMAGE©
Post Reply
User avatar
Draise
Posts: 891
Joined: 09 Oct 2012, 20:48
Skype: ondraise
Location: Colombia

Trigger Sprite image sequence animation - how?

Post by Draise » 19 Jun 2013, 00:37

I am trying to play with animated sprites in SI.

My goals are to create a way to trigger an image sequence when I want it to within the timeline, according to either a trigger in ICE or an animation trigger, like a parameter or expression or a check box.

The image sequence sprite needs to be able to loop, replay, and start at different points in the timeline multiple times.
My current workflow is painstakingly slow (preliminary: create the sprite shader, paint it on the sprite object; in animation: animate the object SRT for the new position of that sprite, then go into the shader and animate the new image offset frame - two keyframes - according to need on the timeline - proving inefficient when I have to animate hundreds of sprite animations)

For example: typically, something like repetitive gun shot sprites, explosions, and other simple sprite based effects on planes that replay or repeat according to need would come to mind.


I need some ideas...

-Draise

User avatar
Draise
Posts: 891
Joined: 09 Oct 2012, 20:48
Skype: ondraise
Location: Colombia

Re: Trigger Sprite image sequence animation - how?

Post by Draise » 03 Jul 2013, 22:02

I have tried a number of routes to achieve animated image sequences... (-|

I've animated the time source frame offset in the image source clip, but in the final render, it will only play the source clip once then never again. I have a 2000 frame animation and some 600 instances of some 20 sprites - work wasted under this theory. Don't know why I didn't test this....... in the viewport you could see it, in the render region also. But in the final render export, this did not work, neither in XSIbatch.

I found that you can only loop, offset and freeze the final frame of an image sequence. You cannot repeat the image sequences offset frame at a different point.

Opening the Animation Mixer shows this, and will crash if the image clip frame offset is animated. You can't copy an image clip instance in the timeline (like a normal animation clip) :-w


So now I will have to redo all the work by some other means, probably a texture array switch.

Hate when a certain chunk of work amounts to nothing......

Boo.... ~x(

NNois
Posts: 754
Joined: 09 Jun 2009, 20:33

Re: Trigger Sprite image sequence animation - how?

Post by NNois » 04 Jul 2013, 00:06

hi,
you can drive the time source of your sprite sequence with some attributes.
then you can, in an ice tree use the "current time" node to drive this attribute.

An example, let says you want an instance sprite to be looped from frame 100 to by 10 frames and ten times.
In your ice tree you take the
-> current frame
-> in a rescale node, values 100-200 0-10
-> multiply by 10(number of loops)
-> plugged in a modulo by 10
-> scalar to integer
then writting a custom attribute like self.SpriteFrame

you can coumpound it and drive these "100"200"10" values via others like IDs, randoms or watever

in your render tree you then choose this attribute for the clip source time, the clip update in the opengl IF this is point clouds, if not like standard objects softimage doesn't update the opengl view nut only at rendertime... for me at least... did i misses something ?
http://download.autodesk.com/global/doc ... d30e469201

NNois
Posts: 754
Joined: 09 Jun 2009, 20:33

Re: Trigger Sprite image sequence animation - how?

Post by NNois » 04 Jul 2013, 00:10

suite...
for the trigger part, if you mean in a simulated environment, just use as time source "timers". Start a timer on trigger or on enter state, then read the timer value the rest of the process is the same but don't forget converting time to frame, clips uses integers as frames

User avatar
Draise
Posts: 891
Joined: 09 Oct 2012, 20:48
Skype: ondraise
Location: Colombia

Re: Trigger Sprite image sequence animation - how?

Post by Draise » 04 Jul 2013, 00:14

That would be a good solution!... Though it isn't in a simulated environment, it's strictly synced to a sound/music file, animated really.

... looping and retiming can also be done in the Animation Mixer directly.

Do you think using a similar approach in ICE would allow me to trigger a 30 frame sprite sequence on frame 1, then re trigger it at frame 45 again as keyframed?

Hmm.. man, I need to get into ICE more. /:)

NNois
Posts: 754
Joined: 09 Jun 2009, 20:33

Re: Trigger Sprite image sequence animation - how?

Post by NNois » 04 Jul 2013, 00:40

if it's not simulated it's way more simple, like in my first example...
the "trigger" is just the values in the rescale node.
you can automatise it by again using the current frame node in a modulo node, this would drive your start and end frames

Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests