Archived post by blacknye

I wonder if the look at component could be useful here. Using a separate auxiliary joint (the green circle) like @esttri mentioned, but instead of the clavicle method, you just keep it outside the ik chain, capturepack it to the upper arm, and set the look at target to an elbow auxiliary joint with an appropriate up joint. Up joint might get a little tricky, since you’ll probably want that to follow the yaw of the ankle/ikTip which will allow the upper arm to yaw nicely.

@fabriciochamon Using the auto clav method like @esttri mentioned earlier is the best/easiest solution I found out of all my other attempts, I was checkmated at every other solution.

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20262507/10/26/ik_shoulder_roll_v001.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20262507/10/26/ik_shoulder_roll_v001.hip

Archived post by jim.meston

I updated this method for position noise ‘fake rig type’ deformation [here.](discord.com/channels/270023348623376395/351975587109273601/1522966273489899680)
The coherency benefits of position noise with some deform pre-process and post-process which makes it a somewhat rotation noise hybrid. It is fairly throwaway but might be useful to someone who has to iterate fast, also will run into problems when the noise frequency gets near the segment length.
Using @v for deform vector, first project onto plane of curve direction, this harmonizes the deformation for the post-process.
“`cpp // pre-process vector d = normalize(v@dir); v@v -= dot(v@v, d) * d;
// deform @P += v@v; “`
Then instead of doing the @localtransform z component trick just write positions. If you don’t need transforms it is 5 – 10 times faster.
“`cs int pts[] = primpoints(0, @primnum); int npts = len(pts); vector prevOrig = point(0, ‘P’, pts[0]); vector delta = {0}; for(int i=1; i<npts; i++){ float rest = point(0, 'seglength', pts[i]); vector origp = point(0, 'P', pts[i]); vector raw = origp – prevOrig; float curlen = length(raw); vector newp = prevOrig + delta + raw*(rest/curlen); delta = newp – origp; setpointattrib(0, 'P', pts[i], newp, 'set'); prevOrig = origp; } “`

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20261407/05/26/seglength.gif
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20261407/05/26/position_noise_coherence.hipnc

Archived post by mysterypancake

it seems like something that should be part of osl, unless there’s a reason for it to be render engine specific

i just ported fractal noise 3d from cops to sops, if this is the one you mean just swapped the layer bindings to attribute bindings

running on 3d geo

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20262407/02/26/image.png
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20262407/02/26/fractal_noise_3d.hip

Archived post by flakypastries

“`py
def wrap_in_network_box( nodes: list[hou.Node], name: str | None = None, comment: str | None = None, color: hou.Color | None = None, ) -> hou.NetworkBox | None: “””Wraps nodes in a network box sized to fit them. Args: nodes: Nodes to enclose. Must share the same parent. name: Optional box name. Auto-generated if omitted. comment: Optional comment shown in the box header. color: Optional box color. Returns: The created network box, or None if nodes is empty. Raises: ValueError: If nodes do not share a common parent. “”” if not nodes: return None parent = nodes[0].parent() if any(n.parent() != parent for n in nodes): raise ValueError(“All nodes must share the same parent.”) box = parent.createNetworkBox(name) for node in nodes: box.addNode(node) if comment: box.setComment(comment) if color: box.setColor(color) box.fitAroundContents() return box
# Wrap the current selection: wrap_in_network_box(hou.selectedNodes(), comment=”My group”)“`

Archived post by remipierre

By the way, I will go back to the **quadrangulate **discussion we had a while, my geometry comes triangulated as it comes from a game engine and doesn’t keep quads.
In the end, I replaced the dissolve node by a wrangle in the node and it runs way faster, I basically recreate polygons myself. I will put it there if someone needs it
It might not work with all cases, works in mine, though

“` int ordered_poly[]; int shared_pts[]; int vtx_tmp[];
// Get the edge group from the first input int pts[] = expandedgegroup(0, “long_edge”);
// Loop through the point pairs making up the edges for (int i = 0; i < len(pts); i += 2) { // Get positions of the two points for the current edge int first_hedge = pointedge(0, pts[i], pts[i+1]); int first_prim = hedge_prim(0, first_hedge); int second_hedge = hedge_nextequiv(0, first_hedge); int second_prim = hedge_prim(0, second_hedge); int vtx1[] = primpoints(0, first_prim); int vtx2[] = primpoints(0, second_prim); shared_pts = array(pts[i], pts[i+1]); // get unique points int p_shared_a = shared_pts[0]; int p_shared_b = shared_pts[1]; vtx_tmp = vtx1; removevalue(vtx_tmp, shared_pts[0]); removevalue(vtx_tmp, shared_pts[1]); int p_unique_0 = vtx_tmp[0]; vtx_tmp = vtx2; removevalue(vtx_tmp, shared_pts[0]); removevalue(vtx_tmp, shared_pts[1]); int p_unique_1 = vtx_tmp[0]; // Find winding int idx_a = find(vtx1, p_shared_a); int idx_b = find(vtx1, p_shared_b); if((idx_a + 1) % 3 == idx_b){ ordered_poly = array(p_unique_0, p_shared_a, p_unique_1, p_shared_b); } else { ordered_poly = array(p_unique_0, p_shared_b, p_unique_1, p_shared_a); } // put prims to delete in a group setprimgroup(0, "__to_del", first_prim, 1); setprimgroup(0, "__to_del", second_prim, 1); // Create polygon int new_poly = addprim(0, "poly"); foreach(int p; ordered_poly){ addvertex(0, new_poly, p); } } “`