Geordie Martinez

geordiemartinez

About Me

Expertise
VFX Artist
Location
Canada
Website

CG Supe Versatile.media Vancouver

Connect

My Tutorials

obj-image Intermediate
Vellum Creature Setup

Recent Forum Posts

Vex equivalent of Group Expand node? Feb. 12, 2021, 12:12 p.m.

Animatrix, this is great! thank you. I was able to adapt that.

Here are the two functions I came up with with help from Animatrix_ to contract a group:


function int [ ] groupexpand ( int geo; int pts []; int depth ){
    //int pts [ ] = expandpointgroup(0,groupname);
    int lastpts [ ] = pts ;
    for ( int i = 0; i < depth; ++i ){
        int newpts [ ] = { };
        foreach ( int pt; lastpts ){
            int connected [ ] = neighbours ( geo, pt );
            foreach ( int c; connected ){
                if ( find ( pts, c ) < 0 ){
                    append ( pts, c );
                    append ( newpts, c );
                }
            }
        }
        lastpts = newpts;
    }
    return pts;
}


function int [ ] groupcontract (int geo; int pts []; int depth  ){
    //int pts [ ] = expandpointgroup(0,groupname);
    int lastpts [ ] = pts ;
    for ( int i = 0; i < depth; ++i ){
        //printf("lastpts loop %d len: %d \n",i,len(lastpts));
        int rempts [ ] = { };
        int keeppts [ ] = { };
        foreach ( int pt; lastpts ){
            int connected [ ] = neighbours ( geo, pt );
            foreach ( int c; connected ){
                if ( find ( lastpts, c ) < 0 ){
                    if (find ( rempts, pt ) < 0 ){
                        append ( rempts, pt );
                    }
                }
            }
        }
        foreach (int kpt; lastpts){
            if (find(rempts,kpt)<0){
               append ( keeppts, kpt );
            }
        }
        lastpts = keeppts; 
    }
    return lastpts;
}

Vex equivalent of Group Expand node? Feb. 12, 2021, 2:12 a.m.

Hey all,
Does anyone have the vex equivalent of the group expand node?

why:
I want to contract a group by n levels and then expand it again by n levels to get clear out of singleton points that are not connected to the main body of points.

this is to clean up the results of an Attribute Transfer node that has pieces that are overlapping and the values need to be part of a single island so I can use it in a point deform node as the piece attribute.

Vellum pdg sims not colliding properly Dec. 6, 2020, 2:36 p.m.

UPDATE:
user error.
I had wedge values driving density of the tetmesh and they were coming up zero instead of the value I submitted in the wedge. this made it floaty and no collisions because of no mass.

Also, I was calling my density attribute “mass” which was clobbering the mass in the vellum solve. so I changed the attrib name to densityx and testing now.