Archived post by toadstorm

there’s some local space fuckery involved with where you put constraint points and what orientation they’re in. they have to be generated in the rest space of the rbd objects, even if the rbd objects aren’t in rest space when the constraint is made

i built a tool for this in MOPs+, it generates constraints on the fly from collisions. it works roughly like this: “` // get position, orientation, and rest xform of impact prims vector P1 = point(1, “P”, i@impactprimnum); vector P2 = point(1, “P”, i@parentprimnum); vector rest1 = point(1, “rest”, i@impactprimnum); vector rest2 = point(1, “rest”, i@parentprimnum); vector4 orient1 = point(1, “orient”, i@impactprimnum); vector4 orient2 = point(1, “orient”, i@parentprimnum);
vector deltaP1 = @P – P1; vector deltaP2 = @P – P2;
// rotate these vectors into the local space of the impacting objects. deltaP1 = qrotate(qinvert(orient1), deltaP1); deltaP2 = qrotate(qinvert(orient2), deltaP2);
// shift by rest position. these are the local space constraint points. P1 = rest1 + deltaP1; P2 = rest2 + deltaP2;
// generate a polyline from P1 and P2 and set name attributes to match the two RBD objects being constrained… “`

the attributes will be different if you’re not generating stuff from collision points, but the math should be similar

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20231312/05/23/rbd_runtime_constraints.gif

Archived post by mattiasmalmer

sometimes xyzdist() is not really what you want when you want to get distance from the edge of a font and so on because you get all these rounded corners. i wrote a quick wrangle that gives you the same type of sharp distance that an inset would give you:

“` int numprims=nprimitives(1);
float dist=10000000000000000000; for (int i=0; ipp=v@P-p0; if (dot(normalize(-normalize(p3-p1)+normalize(p0-p1)),v@P-p1)>=0) { if (dot(normalize(-normalize(p2-p0)+normalize(p1-p0)),pp)>=0) { dist=min(dist,(length(cross(pp,dir))/length(dir))); } }
}
@dist=dist; “`

(the second input is a “convertline” of the font)

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20233912/04/23/houdinifx_CuEDfyQLMW.gif

Archived post by mattiasmalmer

sometimes xyzdist() is not really what you want when you want to get distance from the edge of a font and so on because you get all these rounded corners. i wrote a quick wrangle that gives you the same type of sharp distance that an inset would give you:

“` int numprims=nprimitives(1);
float dist=10000000000000000000; for (int i=0; ipp=v@P-p0; if (dot(normalize(-normalize(p3-p1)+normalize(p0-p1)),v@P-p1)>=0) { if (dot(normalize(-normalize(p2-p0)+normalize(p1-p0)),pp)>=0) { dist=min(dist,(length(cross(pp,dir))/length(dir))); } }
}
@dist=dist; “`

(the second input is a “convertline” of the font)

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20232412/04/23/houdinifx_CuEDfyQLMW.gif

Archived post by have_you_tried_google.

tough one to get the exact shapes without more control and art direction, but a start….

little closer

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20232311/28/23/squashMetalVellum_HIM_v002.hiplc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20232311/28/23/squashMetalVellum_HIM_v005.hiplc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20232311/28/23/image.png

Archived post by fabriciochamon

I’ve been fiddling with the onnx sop to get a clue on how to feed the data, since it’s not super intuitive at first sight. Here’s a commented hip if someone is interested. (style transfer / resnet image classifier)

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20230911/23/23/onnx_examples.hiplc
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20230911/23/23/image.png