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

Ben Schrijvers ben.schrijvers at guerrilla-games.com
Tue Dec 27 12:16:46 EST 2016


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



More information about the Sidefx-houdini-list mailing list