# Parboil

Members

11

## Community Reputation

6 Neutral

• Rank
Peon
• Birthday January 21

• Website URL

• Name
Rob
• Location
London

## Recent Profile Visitors

211 profile views

1. ## vector flows along edge of primitive

You can use the neighbours() function. int pt = 0; vector pt_pos = point(0, "P", pt); int neighbours[] = neighbours(0, pt); vector neighbour_pos = point(0, "P", neighbours[0]); vector along_edge = normalize(neighbour_pos - pt_pos);
2. ## Finding Same piece at @name

Awh think i misunderstood what was being asked. If you want to convert "Name" attribute into an integer and strip the "piece" you can try this. I've also made a new group per piece i@p = atoi(strip(@name, "piece")); string grp_name = sprintf("newGroup%d", @p); setprimgroup(0, grp_name, @primnum, 1, "set"); @Cd = random(@p);
3. ## Finding Same piece at @name

You can check for multiple of the same attribute value using the findattribvalcount() function in vex. I used this in a Attribute Wrangle set to Primatives string val = prim(0, "name", @primnum); int attrib_clash = findattribvalcount(0, "prim", "name", val); if (attrib_clash > 1){ setprimgroup(0, "clash", @primnum, 1, "set"); }
4. ## copy to points rotation

Recreated the chain rotation setup a slightly different way. Using 45 degree interval rotations and there is a global rotation offset. vector temp_up = set(0, 1, 0); @N = normalize(@N); @up = cross(temp_up, @N); v@binormal = cross(@N, @up); setattribtypeinfo(0, "point", "binormal", "point"); matrix3 mat = set(@N, @binormal, @up); float rot = radians(chf("rotate")); rot += 45 * @ptnum; rotate(mat, rot, @N); @orient = quaternion(mat);
5. ## Q for remove the point

The Facet SOP has Remove Inline Points - Remove points from polygons if they lie on the line connecting the previous and next point.
6. ## (SOLVED) Mirror in vops?

You can also create a triangle wave using modulus to determine the tiling frequency on the mirrored noise. Just had a quick go with a wrangle ... float repeat_frequ = 2; vector mirror_pos = abs(abs(@P)%(repeat_frequ*2) - repeat_frequ); mirror_pos[1] += chf("offset"); @P.y += snoise(mirror_pos, chi("turb"), chf("rough"), chf("atten"));
7. ## how to customize rop alembic output

No problem, you could rename the shape nodes with something like this ... super rough! I haven't come across a solution that doesn't involve writing a script. Let me know if you find anything import pymel.core as pm ls = pm.ls(sl=True) for x in ls: name = pm.listRelatives(x, type = "mesh")[0].name() pm.rename(x, name)
8. ## how to customize rop alembic output

On the Alembic ROP "Hierarchy" tab check the "build hierarchy from attribute", then specify an attribute you would like to split the geometry by in the "Path Attribute". If you created a string attribute on each of the meshes, i.e name = "box", "sphere", "torus" ... when the alembic is brought into Maya each mesh will be named and combined accordingly.
9. ## [QUESTION] Clamping parameter inside detail attribute?

Hope this helps. I used a detail wrangle. int pt = chi("center_pt"); int upper = clamp(pt + chi("upper"), 0, npoints(0)); int lower = clamp(pt - chi("lower") -1, 0, npoints(0)); for (int i = lower; i< upper; i++){ removepoint(0, i); }
10. ## Add Name Attribute Via Python

Another method of string concatenation is to use the format() function. name = "piece{0}".format(point.number())
11. ## How do i scale an object using the position of the vertices of another geometry?

Hope this gets you in the ball park. I've added a ramp so you can remap the @pscale value for more complex animations. The upper and lower bounds are for shifting the animation before and after the carve point. This doesn't take into account distance between points, only their point number divided by the total. carve_with_anim.hipnc
×
• Donations