Shasha

Shasha

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

PolyExtrude in VEX Feb. 4, 2019, 1:22 p.m.

ouroboros1221
Here I made a simple example, it's up to you to figure out how to procedurally organize the points so you don't have to type them in.

Thank you. Unfortunately, your file doesn't work properly, geometry is all messed up with open prims flying everywhere. But it's a starting point.

Nicolas Longchamps
Simple VEX inset. Run over prims.

vector centerPoint = v@P ;

int pts[] = primpoints(0,@elemnum);
int newPTS[] = {};

//generate inset points
foreach( int pt ; pts )
{

    vector pos = point(0,'P',pt);
    vector insetPos = lerp(pos,centerPoint,ch('inset'));
    
    int newPt = addpoint(0,insetPos);
    append(newPTS,newPt);
    
}

//inset prim
int prCenter = addprim(0,'poly',newPTS);

//contour prims
for(int i=0; i<len(pts); i++)
{

    int pr = addprim(0,'poly');
    addvertex(0,pr,pts[i-1]);
    addvertex(0,pr,pts[i]);
    addvertex(0,pr,newPTS[i]);
    addvertex(0,pr,newPTS[i-1]);

}

//remove original prim
removeprim(0,@elemnum,0);

Ideally you also interpolate point and vertex attributes on the inset points.

Thank you for your example. Simple indeed but very interesting.

PolyExtrude in VEX Feb. 3, 2019, 6:02 a.m.

Andr
following this thread.

I always wanted to try to build one in vex because the original one can't be compiled.

That's exactly why I'm asking hehe.

ouroboros1221
you just need to add points in the direction of a surface's normal, connect the dots and make a surface out of it

Thanks for your answer.I guess I'm looking for a bit more specific information on how to do that. Sorry my question wasn't clear enough.

PolyExtrude in VEX Feb. 2, 2019, 3:34 p.m.

Hi,


I've been wondering if anyone tried to recreate the polyextrude sop in vex? I'm particularly interested in the inset function of the sop, and how one would go about recreating this in vex.


Any ideas?


Thanks in advance.