*This is in response to your question : "how do you get a geometry's
velocity?"*
If it is a simulated point cloud with particles, you already have it by
default as an attribute (note that velocity is a fundamental data for a
simulation. No particle simulation can run without it)

If it is something else - like a geo moving around in space then you have
to interpret in different ways:

a) If the geo is animated through transforms (meaning that you have actual
keys on parameters) then you have to take the transform of the object and
calculate velocity as - position at current time - position at last time,
notice I use "time" instead of frame because it can mean anything, integral
frame / subframe (frame fraction).

or

b) If you have a geo that is driven by an operator like - envelope, some
sort of cache reader (alembic, pc2, realflow etc.) then you have to either
make a cluster and note its positions in time, or grab a good
representative point (usually the point closest to cog, preferably center)
get it positional change through an Ice tree (recommended for ease of use
and requires no expressions or coding).

Basically, you have to just get a change in position over a predefined time
step. Mathematically it is delta pos / delta time.

This value is obviously a vector - difference of two vectors(pos) divided
by difference of two scalars(time). So it has a direction (where it going
to be on next 'time' step) and a magnitude (how far will it go in that
direction). So in essence knowing the velocity of point, you can accurately
predict where the object will be on next time step.

Now you can use that interpretation as whatever you want.



*This is in response to your question : " how do I drive that into a weight
map?"*

Since this is very broad question, I will make a guess that you want to
drive the vertex of weight map from one velocity data.

This needs to be a one-one relationship. So either each vertex of a mesh it
mapped to each point of a weight map. Or each particle of a point cloud is
mapped to each point of a weight map.

Think if a weight map as a container for a number. In your case this number
is magnitude of velocity. In an ice tree, you can use a get data node and
in it pick the weightmap.weights attribute from the explorer. It is as
simple as that. Now that you have that attribute available to you, you can
always use setdata to write to the weight map. Just remember the contexts
are valid and also that there is well-defined one-one to relation between
the two data sets - driving data, weightmap data.

That's it.

I think you can easily do it in ICE, if you have the concept clear in your
head.


My response may seem verbose but really, I have no more concise
articulation for this based on a full discourse you might need.

Hope that helps.



On Mon, Oct 21, 2013 at 4:05 PM, Chris Johnson <[email protected]> wrote:

> so as there is no tutorial....and I 'm not that technical...how do you get
> a geometry's velocity?...The follow up question to that will be how do I
> drive that into a wieght map....sorry bit of a hack when it comes to ICE
>
>
> On Mon, Oct 21, 2013 at 3:45 PM, Eric Thivierge <[email protected]>wrote:
>
>> Actually little tip, you can set the weight map min / max to other values
>> to change the range of values aloud in it through ICE.
>>
>>
>> On Monday, October 21, 2013 3:35:14 PM, Sandy Sutherland wrote:
>>
>>> A Weightmap can hold greater than 1, so you just need to feed into a
>>> self.foo or something and see what your top level is, then add a
>>> weightmap that goes up to that level.  Then just fire stright into the
>>> WM.  Unless you want it to normalise to 1 as Alok says.
>>>
>>> S.
>>>
>>> On 2013/10/21 9:29 PM, Alok Gandhi wrote:
>>>
>>>> Don't know of a tutorial but I guess you can take the magnitude of
>>>> the velocity and plug it into weight values. Of course you will need
>>>> to normalize to [0, 1] using a rescale.
>>>>
>>>> On 10/21/2013 3:23 PM, Chris Johnson wrote:
>>>>
>>>>> Anyone know of a tutorial out there that shows how a weight maps
>>>>> intensity can be affected by velocity? Can you do that in ICE?
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> ALOK
>>>>
>>>> GANDHI
>>>>
>>>> / directeur technique senior- senior technical director
>>>>
>>>>
>>>> [email protected] 
>>>> <mailto:alok.gandhi@modusfx.**com<[email protected]>
>>>> >
>>>>
>>>> T:
>>>>
>>>> *450 430-0010 x225
>>>>
>>>> F:
>>>>
>>>> *450 430-0009
>>>> www.modusfx.com <http://www.modusfx.com>
>>>>
>>>>
>>>> ------------------------------**------------------------------**
>>>> ------------------------------**---
>>>>
>>>>
>>>> MODUS
>>>>
>>>> FX
>>>>
>>>>
>>>> 120 Rue Turgeon,
>>>>
>>>>
>>>> Sainte-Therese (Quebec) CANADA J7E 3J1
>>>>
>>>>
>>>> Follow us on
>>>>
>>>> Facebook 
>>>> <http://www.facebook.com/**ModusFX<http://www.facebook.com/ModusFX>
>>>> >
>>>>
>>>> &
>>>>
>>>> Twitter <https://twitter.com/Modusfx>
>>>> **
>>>>
>>>
>>>
>>
>


--

Reply via email to