now it makes sense then! I've read/know that the closest location returns values in global space, I assumed that the feeding positions should be in global space as well. Thanks Gray, this cleared up things!
On 30 January 2014 17:17, Grahame Fuller <[email protected]>wrote: > Position inputs for geo queries like Get Closest Location are local to the > object with the ICE tree. (Ditto for positions returned from locations.) > > So if the ICE tree is on the null and you want the closest location to the > null, then (0, 0, 0) is indeed the input position you should use. > > gray > > From: [email protected] [mailto: > [email protected]] On Behalf Of Kostas Strevlos > Sent: Thursday, January 30, 2014 12:06 PM > To: [email protected] > Subject: Re: Getting weight values for given points... > > Hi, > > I had a quick test as well and I got the same issue. The only way I could > get it to work is by leaving the position input at 0,0,0 (on the closest > location node). This is probably due to what Stephen suggested? Although > since the ice tree is on the null I don't think is possible to convert the > grids points to a global space, cause the closest location is only asking > for a geometry. Now I don't want to confuse you so try leaving the position > 0,0,0 on the closest location (even though it doesn't make much sense) and > see if you are getting the correct result. Otherwise there must be a more > sensible way to approach it. I'll leave that to the experts :) > > Kostas > > On 29 January 2014 23:11, Stephen Blair <[email protected]<mailto: > [email protected]>> wrote: > 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! > [cid:[email protected]] > 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 <[email protected] > <mailto:[email protected]>> 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! > -- > [cid:[email protected]] > > > -- > > >

