Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by f1480187

  1. Here is my attempt, with some nice techniques. Not overwhelmingly realistic, assume I've never seen an ice cream. cornetto.hipnc
  2. Try Even–odd_rule. You can check if a next step will bring the point outside of the polygon, and change direction to prevent it. Also, there is Vector2 class in HOM. I would subclass it and define my own methods in case I need extra functionality.
  3. My scenes usually less than one megabyte. I unlocked couple of rigged characters (default male and female) with geometry stored in HDAs. This action increased the file size to 50 MB. I think something is bloating your scenes unusually big.
  4. According to odforce scenes, no. The only common thing is an arbitrary color saying "attention/problem/fix there". H16 started to colorize many nodes. Now it's a bit confusing, since old nodes kept their colors. When you add op, new color differentiates it from similar node created before. IMO, the better way is automatic coloring and shaping. Like syntax highlighting in code editors. Divide operators into classes, then users can customize colors and override classes to their own preferences.
  5. Add Hole SOP.
  6. Convert the volume to a mesh and intersect it with many Grids using the Boolean SOP. volume_to_slices.hipnc
  7. 2/3. It's trivial to place split geometry on different groups using Partition node. You can even transfer it back to original geometry. 3. Try Dissolve node instead. 4/5. Polywire it. You can control the width of the Polywire's output geometry. Setup ramp parameter in VOPs or Wrangle to map width to arbitrary shape you need. edges_to_path_driven_geo.hipnc
  8. You need to get an instance of hou.Geometry. Sometimes there is no easy way to track what set of calls you need to get hou.Something. You may try to construct it by calling hou.Something(). It may throw an "AttributeError: No constructor defined", which is, I think, will happen with most of hou classes. Even if you can construct hou.Geometry, you obviously need a specific geometry, not an empty one. Fortunately, any SopNode seems to have a Geometry. Here is Python Shell example: >>> node = hou.node('/obj/geo1/platonic1') >>> geo = node.geometry() >>> bb = geo.boundingBox() >>> bb <hou.BoundingBox [-0.92793, 0.92793, -0.975684, 0.975684, -0.789344, 0.789344]> >>> mv = bb.minvec() >>> mv <hou.Vector3 [-0.92793, -0.975684, -0.789344]> >>> tuple(mv) (-0.9279304146766663, -0.9756839275360107, -0.7893444299697876)
  9. Simple control over many deformation kinds by a custom weight: deform model at full strength, add Point Wrangle, input both models, blend with "lerp(@P, @opinput1_P, @weight)". weighting.hipnc
  10. Variable access uses dollar sign syntax: $MYVAR. @myattrib is a wrangle-style access and it uses actual attribute name. You don't need to create a variable and use addvariablename function in late Houdinis. "varmap" is a detail attribute. Keep Geometry Spreadsheet nearby to inspect it's contents.
  11. There is also a Solver SDF subtraction approach posted in several threads. Didn't find them quickly, but the principle is basically this: vdb_track.hipnc
  12. Interesting scene. Played with it's RBD part: wall_crack_rbd.zip UVs are moving because you are transferring it to the moving simulation pieces. UV will be different at every frame. You should transfer on static geometry. Attribute transfer matches geometry by proximity, it's not a best way to deal with vertex UVs, but often you can't use anything else. In your case, however, you can transfer UVs by Convert VDB node using second input. It will work way better, and you can reduce your network by a half. It also makes sense for me to separate geometry into a low-res simulation proxy and high-quality mesh for rendering. This way you don't need to restore UV on decimated simulation meshes. You only need their position data, which can be stored and cached as points for Packed RBDs. You could also compute geometry once, then use cached version to transform it's pieces by such points.
  13. @eistan, array "a" is a string type, and member type must be a string too. Foreach also expects semicolon as a separator. foreach (string $string_pt; split($pts)) { if ($value_to_check == atoi($string_pt)) { $color = {1, 1, 1}; } }
  14. Do you want it to be perpendicular to the plane created by two edges with angle? For any non-corner case you can compute rotation matrix: // Point wrangle. // Compute matrix aligned with plane created by two edges. vector e0 = point(0, "P", @ptnum-1) - @P; vector e1 = point(0, "P", @ptnum+1) - @P; vector y = normalize(e0 + e1); vector z = normalize(cross(e0, e1)); vector x = normalize(cross(z, y)); 3@r = set(x, y, z); After that, you may use it in your point creation loop like this: // Create position on circle centered at the origin. // Scale it by radius. Rotate it by rotation matrix. // Translate it to desired location. set(cos(theta), sin(theta), 0) * radius * r + pivot It's an example expression, not a final code. From your code, value .05 can be used as a radius, @P can be a pivot and r is a matrix computed by the snippet above. There are common cases where it will not work. You should decide which orientation to prefer from infinite possible variants: End points. One or both edges has zero length. Angle between edges is 0 or PI align_circles_to_curve.hipnc
  15. I think your setup is simply wrong somewhere, it should work as described. Post scene. Bias should place ray starting point above a surface. Try to scale your negated normal by a small value and use this as bias. Curvature mask produces better results than occlusion masking, but meshes must have a nice curvature, therefore be smooth. worn_edges.hipnc
  16. I guess, Attribute Expressions assumed to be simple and artist-friendly. You can use just a Wrangle for complex code, obviously. It's the most straightforward way. It also supports VEXpressions.txt file. Since it is VEX, you can use semicolon to split instructions. It is possible to place almost everything in a single line. You can't hack everything with it: for example, modifying other attributes will output an error due to Python scripted restriction on exported bindings list (which attributes can be modified). Why this is forced to be selected attribute and not left to the default asterisk? Strange. Here is the hack. Start with "bypass" statement. It will allow for @P to stay unmodified and terminate initial assignment. Then add any statements you want. Check Generated Code tab to see the final snippet. It's all just a dirty hack, but it will work. So you don't need to call same expensive geometry traverse function again and again. // Attribute expression. @P; float x = @P.x + 1; @P = set(x, @P.y, @P.z) // Generated Code. v@P = @P; float x = @P.x + 1; @P = set(x, @P.y, @P.z); // Same, but split statements by newlines. v@P = @P; float x = @P.x + 1; @P = set(x, @P.y, @P.z);
  17. 1. Same thing, but you can use any generic Perlin noise. Being lazy to setup full noise or ramp mechanisms with VOPs, I often prefer to do a basic code in wrangle. It is less convenient to fine-tune and remap in code, though. 2. Use lower frequencies. There are visualizers set on wrangles. You can see the noises looks more like a animated gradients. 3. I'm not sure about this part. As usual, an original creator played randomly with different parameters and nodes, and learning person got a living hell trying to achieve same thing with a determined algorithm. It seems more like simple scaling, but using actual Voronoi and it's "Cut Plane Offset" may be involved. You get squares when cell points aligned into a square grid. This cells may be actual squares and triangles, but at same time they may only appear like that, due to cell point alignment. Since you do a single high-resolution effect, I think it is nice to arrange some points by hand. 4. And I know nothing useful about such VDBs techniques, hope other can help with that.
  18. Try to modify the code with this: int newpt = addpoint(0, @P); setpointgroup(0, "asdf", newpt, true); add_point_set_group.hipnc
  19. It's right, try it. "root/HIP/../geo/foo.bgeo.sc" would work same as "root/geo/foo.bgeo.sc" here. Check here about relative paths, Houdini uses UNIX-like. relative_path_example.zip
  20. VEX allows to define two functions with same name returning different types, but HScript Expressions not. There is a string-returning alternative ended with s for functions where string result can be expected alongside with floats: Common: chs, ifs, stamps Attributes: points, prims, vertexs, details Other: pythonexprs, evals, propertys, copmetas, dopfields, dopoptions, iprquerys
  21. My mistake, prims usage syntax should be prims(somepath, 0, "name"). Sorry for misdirection. Fixed my post and added a scene with working expressions.
  22. If you see spikes, it probably Extrude, Bevel or Starburst. All three seems to use same unreliable algorithm producing spikes. Try to toggle Limit Insetting checkbox several times: it didn't even output same spike artifacts. There is no good solution, probably. Execute "cd /path/to/current/geo/; opadd -e polyextrude" in textport and find ancient PolyExtrude node. As far as I remember, it also produced spikes, but it seems to work on dinosaur. ap_hypernose_fix.hipnc
  23. *master steps in* Joking aside, seems like an adaptive remesh for me. It works nicer with curvature for smooth meshes. hypernose.hipnc
  24. You didn't specify primitive number argument. VEX and HScript Expressions syntax are different. Another options: 1. Use this expression in-place with dot replaced by the path to the Wrangle, without creating an extra-parameter on the Wrangle. 2. Don't create Wrangle. Check for the string "name" attribute in-place using prims() function. You can't use "foo" == "foo", it only works for numbers in HScript Expressions. You need to use strcmp(). It returns zero if strings are equal and non-zero if not: (strcmp(prims("/path/to/operator", 0, "name"), "density") == 0) || (strcmp(prims("/path/to/operator", 0, "name"), "surface") == 0) Sometimes, you can encounter an elegant uses: "!strcmp(x, y)" instead of "strcmp(x, y) == 0" for true check; "!!strcmp(x, y)" instead of "strcmp(x, y) != 0" for false check. prims_and_strcmp.hipnc
  25. $HIP/../geo/$OS.bgeo.sc