[Sidefx-houdini-list] transfer attributes from metaballs to geometry?

Andrew D Lyons tstexture at gmail.com
Thu Dec 4 13:29:04 EST 2008


Vex tool could be cool for other stuff.

The attrib transfer sop has some pretty blazingly fast octree code at
it's heart though, and handles all the kernel stuff already - so you
might find it's still faster. Lets us know how it goes!

Cheers


2008/12/4 Robert Kelly <isstuff at gmail.com>:
> not a bad idea. But i am inspired by the help document
> /vex/functions/metaimport it has some vex code there that may be just what i
> need and become a everyday tool.
>
>
> from the help docs.......
>
> The attributes evaluated are un-premultiplied by the weight of the metaball
> at the position and must be multipled for blending. For example, to evaluate
> a vector attribute (say color) on metaballs, the following function could be
> used:
>
> vector
> meta_attribute(string file, attrib_name; vector P)
> {
>    int        handle;
>    vector    result, tmp;
>    float    density;
>
>    handle = metastart(file, P);
>    result = 0;
>    while (metanext(handle))
>    {
>    if (metaimport(handle, "meta:density", P, density))
>    {
>        if (metaimport(handle, attrib_name, P, tmp))
>        result += density * tmp;
>    }
>    }
>    return result;
> }
>
>
>
>
> 2008/12/4 Andrew D Lyons <tstexture at gmail.com>
>
>> OK,
>>
>> Maybe get rid of metaballs and use their centre points with attrib
>> transfer.
>>
>> If you transfer Cd, and Alpha as a radius/weight - then attribTransfer
>> "Blend Width" should give you what you are after.
>>
>> Cheers
>>
>> 2008/12/4 Robert Kelly <isstuff at gmail.com>:
>> > when you tick colours it shows the transform in a colour, probably good
>> for
>> > doing the difference between the deformed un deformed geometry in the
>> > previous trick to find metta weight, but it isnt about transfeing Cd
>> > atributes.
>> >
>> > 2008/12/4 Andrew D Lyons <tstexture at gmail.com>
>> >
>> >> Oh - I see what you are doing. The magnet SOP is what you want (as
>> >> Brian Goodwin suggested). That does colors. Is it not working?
>> >>
>> >>
>> >> 2008/12/4 Robert Kelly <isstuff at gmail.com>:
>> >> > hmm attribute transfer only listens to the  attribute and the location
>> of
>> >> > the center of the metaball, not the weight of the metaball. to test it
>> >> you
>> >> > make a big strong red metaball and suround it with 4 small weak blue
>> ones
>> >> > and see what colour the grid listens to. rangi's trick that works on
>> one
>> >> > atribute is to get a magnet sop and move the geometry in the Y and
>> mesure
>> >> > the difrence between each points position and that will give you the
>> >> > strength of the metaball at each points location. But this dosent get
>> you
>> >> > the colour.
>> >> >
>> >> >  Andrew D Lyons methoud works to an extent (the closest to it ) but
>> not
>> >> at
>> >> > the heart of the metaball
>> >> >
>> >> > I think i will have look into a vex related answer. Unless there is
>> some
>> >> > more surgestions?
>> >> >
>> >> > Robert
>> >> >
>> >> > 2008/12/4 Andrew D Lyons <tstexture at gmail.com>
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> 1 convert-meta
>> >> >> 2 attribute transfer SOP.
>> >> >>
>> >> >> Cheers
>> >> >>
>> >> >> 2008/12/4 Robert Kelly <isstuff at gmail.com>:
>> >> >> > Am I missing something or is ther a simple way to... for example.
>> >> >> >
>> >> >> > You have a grid, some metaballs of different sizes and weights,
>> each
>> >> with
>> >> >> a
>> >> >> > different color in the Cd attribute. the mettaballs are
>> intersecting
>> >> the
>> >> >> > grid. How can i transfer the Cd attribute onto the grid and have it
>> >> >> transfer
>> >> >> > as you would expect.
>> >> >> >
>> >> >> > Or do I need to get into writing a vex sop to do this?
>> >> >> >
>> >> >> > Robert.
>> >> >> > _______________________________________________
>> >> >> > Sidefx-houdini-list mailing list
>> >> >> > Sidefx-houdini-list at sidefx.com
>> >> >> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> =======================================
>> >> >> Andrew D Lyons | Digital Artist | http://www.tstex.com
>> >> >> =======================================
>> >> >> _______________________________________________
>> >> >> Sidefx-houdini-list mailing list
>> >> >> Sidefx-houdini-list at sidefx.com
>> >> >> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>> >> >>
>> >> > _______________________________________________
>> >> > Sidefx-houdini-list mailing list
>> >> > Sidefx-houdini-list at sidefx.com
>> >> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> =======================================
>> >> Andrew D Lyons | Digital Artist | http://www.tstex.com
>> >> =======================================
>> >> _______________________________________________
>> >> Sidefx-houdini-list mailing list
>> >> Sidefx-houdini-list at sidefx.com
>> >> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>> >>
>> > _______________________________________________
>> > Sidefx-houdini-list mailing list
>> > Sidefx-houdini-list at sidefx.com
>> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>> >
>>
>>
>>
>> --
>> =======================================
>> Andrew D Lyons | Digital Artist | http://www.tstex.com
>> =======================================
>> _______________________________________________
>> Sidefx-houdini-list mailing list
>> Sidefx-houdini-list at sidefx.com
>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



-- 
=======================================
Andrew D Lyons | Digital Artist | http://www.tstex.com
=======================================



More information about the Sidefx-houdini-list mailing list