[Sidefx-houdini-list] HDK: parse point/prim groups

Andrew Lyons tstexture at gmail.com
Tue Nov 29 11:36:04 EST 2011


<2c>
I'm thinking it's acceptable to ask a user to put down a "group geometry"
SOP and use the "Edit/Convert" functionality to prepare their data for your
tool by converting the prim groups to point groups there. This would be
consistent with Houdini in general. There's certainly a great number of
precedents in Houdini where point groups are required by SOPs...

If you still want to do the convert for them, you might consider preserving
the generalized nature of your deformer tool. You could do this by wrapping
it in an otl with a group geometry SOP that does the convert. and perhaps a
switch SOP so users can toggle the convert on and off. You could also
expose a group mask at the top level for them to choose which groups to
convert. The group conversion then becomes part of the new higher level
tool - but it lives outside the deformer HDK code - which remains
unencumbered by the demands of this particular use-case.
</2c>



On 28 November 2011 14:14, Szymon Kapeniak <szymon.kapeniak at gmail.com>wrote:

> Thanks Andrew,
>
> 2011/11/28 Andrew Lyons <tstexture at gmail.com>:
> > It is possible to have a point group called "group1" and a prim group
> > called "group1" in the same geo detail. Note sure that you could avoiding
> > testing for the existence of both at all times...
> >
> > Perhaps exposing a "group type" switch/menu parm on the node would help
> > clarify user intent for the system?
> >
> > I might be missing something though.
>
> No, it was me blurring in fact simple question. You're right, groups
> can be ambiguous, Let me rephrase my question: how to start with
> primitive groups but utilitize at the end:
> duplicatePointSource/cookInputPointGroups/FOR_ALL_OPT_GROUP_POINTS
> combo (or any other performing similarly)?
>
> My Sop is a deformer working on points, but an user is providing
> mostly prim groups, how to manage this without explicitly building
> point group from prim vertices?
>
> thanks!
>
> > Cheers
> >
> >
> > On 28 November 2011 13:27, Szymon Kapeniak <szymon.kapeniak at gmail.com
> >wrote:
> >
> >> Hello,
> >> I'd like to modify an user specified group whenever it is a point or
> >> primitive group. The thing I'm doing in essence is that I iterate over
> >> points belonging to a point group, *or* laying on a primitives
> >> belonging to the prim group. Is there a dedicated way of doing this?
> >>
> >> Currently my sop uses SOP_Node::cookInputPointGroups() and iterates
> >> with FOR_ALL_OPT_GROUP_POINTS macro and I would love to leave it this
> >> way for, at least theoretical, optimization.
> >>
> >> Should I basically use things like, parseInputGroup(),
> >> cookInputAllGroups(), and then manually figure out type of a group,
> >> and in case of prim group, iterate over prim to add point to some
> >> array, or... I have better option?
> >>
> >> thanks!
> >> skk.
> >> _______________________________________________
> >> 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
> >
>
>
>
> --
> skk.
> _______________________________________________
> 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