Oh and the Color to RGBA and RGBA to Color nodes are just there to strip the alpha out of the display color, which is 0.
On Mon, Dec 16, 2013 at 5:06 PM, Leonard Koch <[email protected]>wrote: > You can definitely have it in the same tree. That actually isn't a problem. > > I have attached a screenshot of a scene in which we have 4 meshes and 1 > pointcloud. > We give each of the meshes a different display color (this is just for > example's sake and doesn't actually have any use.) > And then create an icetree on the pointcloud where we create some > particles, set a different integer for myvalue on each of the 4 > meshes(cube.myvalue(Value 0), cube1.myvalue(Value 1), cube2.myvalue(Value > 2) and cube3.myvalue(Value 3)) and then read that value out for every > particle using the get closest location node and a get data node using it > as a data-source. > We then plug the output of the get data into a select case node into which > we have plugged the corresponding display colors of all 4 meshes into the > corresponding cases(cube(case 0), cube1(case 1), cube2(case 2) > cube3(case3)). > The output of that select case node is then plugged into the self.color > port on a set data node. > Since each particle gets the myvalue of the object closest to it and we > plugged the display colors of the different meshes into the same case ports > as their myvalues, every particle now has the same color as the > display-color of the object closest to it. > > I hope this helped. > > > On Mon, Dec 16, 2013 at 4:56 PM, Chris Marshall <[email protected] > > wrote: > >> Oh I see! I was thinking of it all being self contained in the one tree, >> but I understand now about making an Ice tree on each. I guess it would be >> useful to be able to do it all in one through scripting, but that'll be >> beyond my ability. I can get by without doing that. >> Thanks both! >> >> >> >> On 16 December 2013 15:51, Alan Fregtman <[email protected]> wrote: >> >>> It's as straightforward as it sounds... >>> >>> On each mesh make an icetree. Grab a simple Integer node and a SetData >>> and plug them together. Call your attribute something and use the same name >>> on all the meshes, for example "self.meshID". >>> >>> Your "Get Closest Location" node will output a *location* so with a >>> GetData node, plug the output location of the location lookup into the >>> GetData's "Source" input (NOT "In Name") and then set your attribute name >>> in that GetData but without the "self." bit, so if you're using the >>> previous example naming, just use "meshID". >>> >>> That is all, really. It's quite simple. -- If it's something you're >>> gonna do a lot, you may wanna look at the SDK for how to set ICE data from >>> scripting (avoiding making extra icetrees altogether.) >>> >>> >>> >>> On Mon, Dec 16, 2013 at 10:41 AM, Chris Marshall < >>> [email protected]> wrote: >>> >>>> OK That makes sense, but can you just run through how to do that? How >>>> do I set an integer for every mesh? Then how do I read that through the Get >>>> Closest Location node? >>>> Thanks >>>> >>>> >>>> >>>> On 16 December 2013 15:37, Leonard Koch <[email protected]>wrote: >>>> >>>>> There aren't really any super optimal ways of doing that. >>>>> What you can do is just set an integer for every mesh as a per object >>>>> value, giving each a different number and then reading those values out >>>>> through the Get Closest Location-node. >>>>> It is not exactly the best workflow but it does work. >>>>> >>>>> >>>>> On Mon, Dec 16, 2013 at 4:31 PM, Chris Marshall < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi All, >>>>>> I'm using the Get Closest Location on Geometry compound, with 5 >>>>>> geometry inputs. What would be very useful is to somehow identify which >>>>>> of >>>>>> the 5 is the closest, 1 - 5 as an integer. >>>>>> Any thoughts on how to do this? >>>>>> >>>>>> Thanks >>>>>> >>>>>> Chris >>>>>> >>>>>> >>>>> >>>> >>>> >>>> -- >>>> >>>> Chris Marshall >>>> Mint Motion Limited >>>> 029 20 37 27 57 >>>> 07730 533 115 >>>> www.mintmotion.co.uk >>>> >>>> >>> >> >> >> -- >> >> Chris Marshall >> Mint Motion Limited >> 029 20 37 27 57 >> 07730 533 115 >> www.mintmotion.co.uk >> >> >

