Hi
Show the locations as points.
Maybe you are mixing up
global/local positions?
On 29/01/2014 5:59 PM, Sergio Mucino wrote:
Thanks a lot Alan!
Seems to be working, but I don't seem to be getting the right
values. As a test, I created a grid object and painted a brush
stroke on a weight map on it.
I then created 3 nulls and positioned them in space floating over
the grid. I know which ones are floating over an area where there
are no weights, and which ones are over an area with weights. I've
enabled Show Values in the ICE tree to see which values I'm
getting, and the numerical values reported do not match the value
of the weight map area directly under each null. Am I going all
wrong about this?
Thanks again for your help!
On 29/01/2014 5:28 PM, Alan Fregtman
wrote:
First of all, you probably wanna use a "Get
Closest Location" instead of "Get Closest Points"; that way
you can get locations between points (say inside a polygon)
and expect a useful interpolated result instead of the closest
vertex specifically.
ICE locations are based on barycentric coordinates and
they magically interpolate the values of the nearest
triangle's points that the location location is inside of.
So say if you have an equidistant triangle with two points
at 100% and one at 0%, if you get the location lookup at the
perfect center of it, it should return a weight of 50%.
Anyway, from the location "Get Closest Location"
gives you, plug it to the Source input of a GetData node
set to "cls.WeightMapCls.Weight_Map.weights" -- which
assumes your cluster is the default name of
"WeightMapCls" and your map the default name of
"Weight_Map". Change accordingly if not.
That should return you the correct weight
value.
--
|