How to morph instanced shapes?

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

How to morph instanced shapes?

Post by Pancho » 14 Nov 2012, 11:41

I wonder how this works at all and how it works in the most efficient way.

Would I initialize a "morph amount" attribute in a modeling ice tree and evaluate this attribute in a simulated one (on my object which will be instanced)? The point cloud would need to set this attribute during simulation.

Or do I need to write all the morph amounts into an array with the particle id as an index and somehow for the ice tree on the instances to read this value? Question would be how to bring the instance to get to know its own id?

Couldn't find anything on this subject yet.

Cheers

P.s.: For ice rigging I assigned (via a script) bone ids. So each bone could look up its global kine in an array. But the bone was present before simulation. The particles won't exist until they are emitted. So ids need to be assigned kn the fly.

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: How to morph instanced shapes?

Post by Pancho » 14 Nov 2012, 12:22

O.k., back home I tried version A. On the object create an ice tree which sets the morph amount to 0 (modeling stack). Another Ice three which gets "morph amount" and sets the morph based on this value (simulation stack or post simulation).

The point clouds sets "morph amount" on a per point context (distance to emit location). Controlling the values proofs that the particle sim works correctly. Unfortunately the objects don't change their appearance. No morph takes place. The morph amount stays the same as initialized.

So, any idea?

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: How to morph instanced shapes?

Post by Pancho » 14 Nov 2012, 12:46

I tried to display the "morph amount" on the instanced objects. While on the instance master object the value gets displayed on screen, it doesn't for the actual instances. Seems like the ice trees on the instances don't get evaluated any more.

There needs to be a way to do this!?

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: How to morph instanced shapes?

Post by Pancho » 14 Nov 2012, 12:51

P.S.: In the end the morph needs to be altered either by the distance to the emit location or particle age or distance to a null/surface.

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: How to morph instanced shapes?

Post by Pancho » 14 Nov 2012, 21:10

In case this doesn't work with an ice tree, is there a way to set a shape key via the emitter?

The only other solution which comes to my mind is to animate the morph across a 1000 frames and just play back a single frame based on the distance to the emit location or some other value. Is this possible? Something like "goto frame 687 and stop"?

In this case it would work, but if you have an animated object, I guess you would need to sacrifice the real animation in favour of a morph animation.

So, anybody? Morphing an instance?!

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: How to morph instanced shapes?

Post by Mathaeus » 14 Nov 2012, 23:18

As far as I know, 'Shape Instance Time' is exactly for that purpose. You'll want to animate vertices in some way, than just to choose which frame is used for instance. There's a lot of written about it, including related issues.

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: How to morph instanced shapes?

Post by Pancho » 15 Nov 2012, 19:31

Thanks Mathaeus,

for the shape instance animation there is indeed documentation out there. But it would be just some kind of workaround. if it is not possible to set and evaluate data on an instance ice tree, is there a way to set a shape key amount on an instance? I couldn't find any docs, tips and tricks on this subject. So it's hard to tell what's possible or not. Seemed to me not like a very complicated task, but probably it is.

Thanks so far!

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

Re: How to morph instanced shapes?

Post by NNois » 16 Nov 2012, 09:06

Hello,
Actually i think you can't do that but as said Mathaeus controling the shape via the instance time works very well, just control your time with "Self.ShapeInstanceTime".

Also note that it's mandatory to "round" your shape evaluation time to limit the number of shapes at render time ;-), for example if you control your time via a randomizer.

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

Re: How to morph instanced shapes?

Post by NNois » 16 Nov 2012, 09:21

Beside that, in response to your question about "goto frame 687 and stop" you can use the "modulate value over time" compound to simply control your shapetime and launch an animation at a certain time in your simulation.

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: How to morph instanced shapes?

Post by Pancho » 16 Nov 2012, 14:31

THanks for the tips! I'll look into them during the weekend!