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.



On Wed, Jan 29, 2014 at 4:50 PM, Sergio Mucino <sergio.muc...@modusfx.com> wrote:
This is probably not that hard to do, but I haven't really worked with arrays in ICE, so I'm kinda stuck here.
I have a bunch of nulls near a poly surface. This surface has a weight map painted on it. I'm trying to get the weight map's value for the closest point to each null. I've already got a Get Closest Points node for each null connected to the poly surface I'm sampling for, and I'm also getting the weight values for the weight maps. However, I don't know how to connect one to the other, so that I could say "For each point returned by the Get Closest Points node, give me the weight from this weight map, average them, and return to me the resulting value" (this part I can do... I'll just set it on an attribute on each null).
This sure looks to me pretty straightforward (in my optimistic mind). Any help is appreciated. Cheers!
--


--


Reply via email to