[Sidefx-houdini-list] Point promotte per class ?

Jordan Walsh jordan.h.walsh at gmail.com
Wed Dec 28 17:41:53 EST 2016


Hadn't thought about leveraging polysoups!
I would have done it with a attribCopy and use the match by attrib setting
to copy one attrib value to all the matching prims.
Ive done a quick setup with points (cos its quicker!)

Jordan

On 27 December 2016 at 22:41, Olivier Jeannel <facialdeluxe at gmail.com>
wrote:

> Ben this is an impressive trick !
>
> I wasn't really keen on going on a workaround, this is my first Polysoup
> ever, but it is really fast.
>
> On a side note, if someone have a For Each Loop method either in VEX or
> VOP, to collect such datas (Get attribute from index 0 of each Primitive
> (@name Primitive) and SetAttribute it to every point of each Primitive.
> That would be usefull.
>
> 2016-12-27 18:16 GMT+01:00 Ben Schrijvers <
> ben.schrijvers at guerrilla-games.com>:
>
> > Hi there,
> >
> > Well this is kind of a dirty trick but it's definitely faster than a For
> > Each Sop loop.
> > But this only works if you want all the primitives in each piece to have
> > the same value.
> >
> > Use a PolySoup Sop as it will create a polysoup for every piece with a
> > unique @name if that is the only primitive attribute you have. If you
> have
> > more it will also spit up the geometry using the other attributes. (You
> > could temporary promote those other attributes to vertex attributes.)
> >
> > Each polysoup is a single primitive so you should have the same amount of
> > primitives as you would expect pieces.
> >
> > Now you can use an Attribute Promote Sop to promote your @mod point
> > attribute to primitive attribute.
> > This node will do the looping for you as it processes each primitive
> > (=polysoup,=piece).
> > As promote method use First Match to give you point 0 as the source of
> > your value.
> > Set Change New Name to mod2 and toggle off Delete Original if nessecary.
> >
> > Now convert back using a Convert Sop. Use another Attribute Promote Sop
> if
> > you want the @mod2 primitive attribute to be a point attribute.
> >
> >
> > Hope it helps and else it was a good opportunity to share that Poly Soup
> > Sop trick.
> > I'm using it a lot and has replaced many cases where I was using the For
> > Each Sop before.
> >
> >
> > Merry Christmas!
> > benS
> >
> >
> >
> > -----Original Message-----
> > From: sidefx-houdini-list-bounces at sidefx.com [mailto:
> sidefx-houdini-list-
> > bounces at sidefx.com] On Behalf Of Olivier Jeannel
> > Sent: Tuesday, December 27, 2016 5:48 PM
> > To: sidefx-houdini-list at sidefx.com
> > Subject: [Sidefx-houdini-list] Point promotte per class ?
> >
> > Hi list,
> >
> > I have a point float attributes (f at mod)  going from 0.00 to 1.00
> >
> > I have some pieces (fractures) primitives (@name) that I can identify
> with
> > a "class" connectivity attribute.
> >
> > I would like to "promotte" the @mod point attribute to the pieces.
> >
> > For the moment I'm doing this with a VOPSOP withinin a SOP "for each
> > loop", but is is dead slow.
> >
> > what it does :
> > For each piece
> > Import point attribute "@mod" from point 0 bind export "@mod2"
> >
> > So every point in the primitive get the value of the point 0
> >
> > I'm defenetly looking for a faster solution without a for each sops.
> >
> > Any idea ? I think I'm missing something obvious :/
> > _______________________________________________
> > 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
> >
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>


More information about the Sidefx-houdini-list mailing list