PDA

View Full Version : Driving morphs in instances with a null proximity



Crocodilian
02-27-2016, 10:38 PM
Hi, I wonder if some kind soul can give me a headsup on this.

I've got a instances of an object with an endomorph.

I want to deform individual instances morphing by proximity to a null --eg so that different instances have different levels of morph applied-- but I'm getting confused by how to do it.

It appears that what's happening is that the evaluation is of the distance from the null to the base object, rather than to the individual instances.

What do I need to to to get this to evaluate correctly? Driving texture works fine in the same circumstance, but that happens on the Surface rollout, which is quite a different thing.

Many thanks for any who can indulge this noobish q.

I suspect that I'm doing something wrong in the "Proximity" rollout, which has some less than obvious choices under the "Use" pulldown . . .

132588

RebelHill
02-27-2016, 10:54 PM
You cant perform displacement per instance... each instance will always have the displacement assigned to the source object. So what you're trying to do cant be done. You'll need to use clones instead.

Crocodilian
02-27-2016, 10:59 PM
You cant perform displacement per instance... each instance will always have the displacement assigned to the source object. So what you're trying to do cant be done. You'll need to use clones instead.

Thank you . . . was making me crazy

jeric_synergy
02-28-2016, 12:13 AM
Rats. It would be nice if the displacement evaluation order were flexible enough to accommodate such a thing, but I imagine it would be a HUGE chore to make it so. And probably rarely used.

lertola2
02-28-2016, 07:16 AM
You could use the Python Bake Instance command to convert your instances to clones. Then you should be able to deform each based on distance to a null.

Kevbarnes
02-28-2016, 12:11 PM
I've got a instances of an object with an endomorph. I want to deform individual instances morphing by proximity to a null

Morph sequencing instances
I had a similar problem with a crowd of spectators that I wanted to stand up, progressively, as the race came past

I used a point object which defined the instances and then divided the points up using weightmaps
to create groups of characters. The base object (Spectators) are duplicated and instanced to the points, but limited by the weightmap.
The morphs for each character were then sequenced manually.

It ended up being 10 poly characters duplicated 10 times so I had to set 100 morphs then sequence them to occur every other frame - sounds like a lot of work but not really.

I can select all these morphs and slide them in time to occur when the race finishes.

so not quite as a proximity to an event automatically........ just manually adjusted.

I can give a you a more detailed description if you need it

Kev

Crocodilian
02-28-2016, 04:07 PM
You could use the Python Bake Instance command to convert your instances to clones. Then you should be able to deform each based on distance to a null.

Thank you . .. I was trying to avoid converting to clones if I could . .. but might have to, and I didn't know about the Python Bake Instance command, very helpful.


Morph sequencing instances
I had a similar problem with a crowd of spectators that I wanted to stand up, progressively, as the race came past

I used a point object which defined the instances and then divided the points up using weightmaps
to create groups of characters. The base object (Spectators) are duplicated and instanced to the points, but limited by the weightmap.
The morphs for each character were then sequenced manually.

It ended up being 10 poly characters duplicated 10 times so I had to set 100 morphs then sequence them to occur every other frame - sounds like a lot of work but not really.

I can select all these morphs and slide them in time to occur when the race finishes.

so not quite as a proximity to an event automatically........ just manually adjusted.

I can give a you a more detailed description if you need it

Kev

Hey, thanks Kev!

Yes . . . this is the kind of thing that I was thinking of-- Is it possible to trigger the morphs with an expression? Does sound rather daunting to be triggering them all manually.

My application is of cans being stomped on, wanted to control the stomper by a null, which would also trigger the morph

Would appreciate any more details about how you did this.

I prefer instances to clones, if I can figure out a way to do it with instances, because they're more flexible and lighter weight.

Kevbarnes
02-28-2016, 04:49 PM
Is it possible to trigger the morphs with an expression?

I would think so, it depends on how many you have, and how they are arranged - are the cans all the same shape texture?

you could control the cans that are being crushed by isolating area of points in the point object, to the area of the stomper
not sure but you might be able to use gradient to control area of crushed instances - I'll have to check instancing options.



My application is of cans being stomped on, wanted to control the stomper by a null, which would also trigger the morph

you could link expression to y channel of stomper null.



Would appreciate any more details about how you did this.

I can give better description but not for 24 hours I'll be at work tomorrow, if it can wait till tomorrow (29th) 6pm uk time I'll sort something out then.
sorry I cant do anything sooner.


Kev

Kevbarnes
03-03-2016, 05:03 PM
Hi
thought I might as well post this but I expect you may have sorted this out by now ...... anyway it maybe useful to others if they find this thread
The scene is complete guesswork on my part - I have no idea if it relates to your task but I thought it would explain the method I used
recently to get a crowd of spectators to stand up in sequence.


132742

132743

Scene : Cans_v03.lws
This scene displays Instances generated on a Point object.
The points have area weight maps to distinguish different areas, This enables the morph to be sequence in Time.
The scene relies on duplicating the objects with their embedded morphs and then associating them in groups to each of the weightmap areas.

This technique relies on defining the areas in advance, and would not work if morphed Instances are required to be 'dynamically' activated
(see Further test).


Instances
All instances get 100 % weighting to give an 'even' random field of objects that would occur if there were no weightmaps.

Morphs
The morphs could have been simply activated using the graph editor, being manually set over time.
I have made an attempt at proximity control using 'Morph_Actuator' null and a ClampMapRange expression.
once the distances have been set up (which are fixed in each of the expressions) then the rate at which the objects are morphed
is driven by the Actuator null.

This could also have been achieved by using node set-up or through the Deform tab:Normal displacement : Disp Direction and choose MorphMap then adding a texture : Gradient : distance to null. This is detailed by William Vaughan : LocalizedMorph(NormalD).mov
BUT this method will make the morphs action ON as the null approaches then OFF again as the null moves away ie. defined by distance.

Setting up with expressions allow the morph stay ON.


Application
Although this depicts a group of Cans being crushed I thought it would work well for say Grass being trodden down by a character and leaving a
foot marks in instanced grass.


Further test
Instead of defining fixed weight maps for areas of controlled instances we could try an animated image map or gradient distance null?

Crocodilian
03-08-2016, 08:51 PM
Thanks you Kev. . . very helpful.



This technique relies on defining the areas in advance, and would not work if morphed Instances are required to be 'dynamically' activated

{snip}

Instead of defining fixed weight maps for areas of controlled instances we could try an animated image map or gradient distance null?


yes, I think that's the right way to do it. Its not dynamic, but like a lot of things LW, sometimes "the way it works" isn't pretty, but it works. I remember, long ago, doing something like this in Sasquatch