Jeff Lait

jlait

About Me

Expertise
Developer
Location
Not Specified
Website

Connect

My Tutorials

obj-image Masterclass
Houdini 17 Masterclass | Vellum Drape
obj-image Masterclass
Houdini 17 Masterclass | Vellum Overview
obj-image Masterclass
Houdini 16.5 Masterclass | OpenCL
obj-image Masterclass
Houdini 16 Masterclass | Heightfields
obj-image Masterclass
Houdini 16 Masterclass | Compiled SOPs
obj-image Masterclass
H15 Masterclass | Grains

Recent Forum Posts

Overhead hit for fit vs. fit01? Nov. 14, 2018, 11:13 a.m.

In VEX:
#define CREATE_FIT01(TYPE) \
TYPE fit01(const TYPE val; const TYPE nmin; const TYPE nmax) \
{ \
    return fit(val, TYPE(0), TYPE(1), nmin, nmax); \
}

CREATE_FIT01(float)
CREATE_FIT01(vector2)
CREATE_FIT01(vector)
CREATE_FIT01(vector4)
#undef CREATE_FIT01

In the EXPR world (expressions outside of VEX)

EV_START_FN(fn_fit01)
{
    fpreal val = SYSfit(argv[0]->value.fval, 0, 1,
                      argv[1]->value.fval, argv[2]->value.fval);
    EV_END_FN(val);
}


So it is just convenience.

Can xyzdist VEX function be used on specific primitives without making a group per prim? Oct. 31, 2018, 10:15 a.m.

Groups can be ad hoc groups, so don't need to be created ahead of time.

So you can use the group “53” (note a string holding 53, not the integer 53) to find distance to primitive 53. sprintf(“%d”, primnum) can be used to generate such a group.

A big warning, however: internally it will have to create a group for all those primitives. So while it won't be as clunky, there may be more expense than you expect if every point creates a different group.

Appending data to attributes doesn't work in POPs? Oct. 25, 2018, 10:28 a.m.

Attached is an example appending to a detail attribute from a popwrangle.

There very much is memory in a POP Network, the geometry is always fed forward to the next frame. So all detail attributes should be preserved. I'm not sure why it is resetting in your case.

Note that in the attached I append a int, not an int. The setdetailattrib() uses the type of the value to hint the type of the attribute to create, so you want to append an int array, not an int.

Also, I gate the append on @ptnum==0 because other wise it will append for every point. However, I could also have done a Geometry Wrangle and set the Run Over to “Detail (Only Once)” instead.