ICE Parametrized Instances

Discussions about SOFTIMAGEs© Interactive Creative Environment©
flyby
Posts: 13
Joined: 30 Sep 2013, 17:07

ICE Parametrized Instances

Post by flyby » 10 Oct 2013, 13:07

Here's what I've been struggling with:

to create instances, like those Particle-Shape ones, but pass along several parameters, so the ICE-tree inside the instance object constructs a different model for that particular particle... Im not sure you can even call them instances at this point... but im basically trying to get the whole modifier stack into the particle, not just the the final geometry. The shape object has more then just an ice Tree, so I cannot just dump everything into a compound and use a repeat-node on it, to generate the copies using different parameters.

Ideally, later on, I'd want to animate the instances, using some of these parameters, so a solution that preserves the parameter connection (main ICE-Tree -> instances) after instance creation would be nice.

Ideas? :-?

flyby
Posts: 13
Joined: 30 Sep 2013, 17:07

Re: ICE Parametrized Instances

Post by flyby » 12 Oct 2013, 18:28

Ok... different question:
is there maybe a way to get an object based on it's name? I can find a "Reference to String" node, but i need the exact opposite, which seems to not exist...

using such a node I can create a workaround to the original problem.

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: ICE Parametrized Instances

Post by Bullit » 12 Oct 2013, 18:36

I don't think i am following you. Can you be more specific about the effect you want?

flyby
Posts: 13
Joined: 30 Sep 2013, 17:07

Re: ICE Parametrized Instances

Post by flyby » 12 Oct 2013, 18:48

I come from programming background so let me explain in those Terms:

I created a class (My shape object) and want to create Instances of this class. On creation each instance is supposed to create it's own version of the topology and is supposed to be animated by being controlled by parameters from the initial ICE tree that created them in the first place. (only few things are key-animated in the scene, the rest walks on ICE ;) )

flyby
Posts: 13
Joined: 30 Sep 2013, 17:07

Re: ICE Parametrized Instances

Post by flyby » 13 Oct 2013, 00:42

I got it all to work :D

For anyone interested, here's the complete solution:
The idea is not to write data from your main simulation ICETree into the objects, but instead let them fetch the data. Yeah that simple :- As a result no code for managing dataflow needed, avoids the repeat node. Maybe softimage even handles all the objects concurrently... one can hope ;))
And fetching the data is just 1 lightweight compound

Steps:

- Create an object, name it with a "_0" at the end, like... robo_drone_0 hehe
- build around the "Reference to String" node to query data from the main ICETree (or use my attached compound)
- Duplicate the object. The names are automatically robo_drone_1, robo_drone_2, and everything instantly works

Drawback:

- need to delete/recreate all the objects in that exact number each time you change something in the "robo_drone_0" object. Please tell if anyone knows a nice solution to this, Clone/Instances only copy the final geometry, they dont reevaluate the modifier Stack of the original object... for obvious performance reasons. Otherwise it seems I need to get into scripting to make this massive object removal/recopying semi-automatic.... and most importantly, controllable using a custom parameter, for the number of copies :-?
- If you have no obvious upper limit, you will have to precreate enough so the simulation doesn't "run out" of them.

Happy ICEing everyone
You do not have the required permissions to view the files attached to this post.

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: ICE Parametrized Instances

Post by Bullit » 13 Oct 2013, 10:13

More or less still at bay.

In the end you'll have instances not meshes being driven by particles?
What kind of data you want from objects that doesn't go already?
Typically if you animate something in original object it is replicated in instance with Control Instance Animation node.

flyby
Posts: 13
Joined: 30 Sep 2013, 17:07

Re: ICE Parametrized Instances

Post by flyby » 13 Oct 2013, 11:04

In the end you'll have instances not meshes being driven by particles?
The other way around, now I have Meshes, not Intances, driven by particles. Each Agent is a duplicated Mesh. They all have kinda similar Topologies, but each is procedurally.. more or less.. generated based on Parameters passed from the Initial ICETree at time of birth of the particle.
What kind of data you want from objects that doesn't go already?
Typically if you animate something in original object it is replicated in instance with Control Instance Animation node.
Well typically all you can control about crowds when using Particles is:
Transform (of the whole object)
Local Animation Frame (just an integer for scrubbing the per-particle timeline)
Color(only 1 color for the shader.... what if you want to randomize 2 colors? like pants and shirts...)

The reason for this limitation is optimisation. The Renderer just caches the geometry and reuses for each Particle.

But if I understand animation correctly, the instance will look exactly like the original animation. What if additionally to the walk cycle that you animated using key-frames, you want each Instance to:
- Turn their head towards a null?
- Have different number of arms sticking different places on the body
- Have a difference in behaviour. Like a "interested" parameter which controls how much that guy is willing to turn his head towards the null to see it, if at all
- If it has legs, what if you want the legs to actually stick to the ground?
you get my point @-)

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: ICE Parametrized Instances

Post by Bullit » 13 Oct 2013, 12:12

Okay understood. I 'll look into this.

Edit:I remember there was some crowd lesson about looking or some secondary action.