Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


petz last won the day on October 21

petz had the most liked content!

Community Reputation

319 Excellent

About petz

  • Rank

Personal Information

  • Name

Recent Profile Visitors

9,836 profile views
  1. here's another one which is using rigid transformation similar to "extractTransform" but in sops. works also an geometries with points in arbitrary order as long as the pointcount is the same. if that's not the case you could try to use the file in this post: http://forums.odforce.net/topic/28907-wrapping-geo-like-wrap3/?tab=comments#comment-164108 hth. petz pc_match_001_1.hip
  2. Surface Curvature

    depending on your mesh and accuracy there exist numerous different algorithms to compute discrete curvature, all with their pros and cons. i don't think there's a single one which works flawlessly in all situations and for all meshes. anyways, here's a file i've posted a while ago on discord with different implementations. it might be a bit confusing without the conversation we had in the chat but you can just try which algorithm works best for you. (from left to right: classical taubin tensor using integral formula, tensor using euler formula, approximated shape operator, proper shape operator in surface space, polynomial fitting) hth. petz curvature.hipnc
  3. How to planarize dual mesh primitive ?

    your first picture seems to show something like a saddle surface which is partly concave. i don't think that it's geometrically possible to approximate such a surface with convex hexagonal polygons which are also planar and connected. you'll always end up with concave hexagons in your case ...
  4. VEX compare attrib values to each other

    depending on the number of vertices, the easiest method is most probably using setdetailattrib() like in f1's second example. however, for very dense meshes and if performance is important it's better to iterate over the vertices and resize the array in advance instead of appending in a loop. this way you avoid continuous bounds checking of the array. int num = detailintrinsic(@OpInput1, "primitivecount"); f[]@val_array; resize(@val_array, num); for(int i = 0; i < num; i++) @val_array[i] = vector(vertex(@OpInput1, "uv", i)).y; hth. petz
  5. VEX compare attrib values to each other

    you could put the following two lines in a vertex wrangle: setdetailattrib(geoself(), "min_val", @uv.y, "min"); setdetailattrib(geoself(), "max_val", @uv.y, "max");
  6. store point number in array

    to write point numbers to an array in detail mode you could just do: i[]@points = expandpointgroup(@OpInput1, "!"); or in point mode: int point[] = array(@ptnum); setdetailattrib(geoself(), "points", point, "append"); however, depending on the number of points, the second method might be slightly slower compared to iterating over points in detail mode ...
  7. Edge Flow

    i don't think it would be a problem. usually old nodes are hidden but they are still available for backwards compatibility, at least for a couple of years. to see older versions of nodes you can turn on "show all operators" in preferences->shelves and tab menu. for hidden nodes check out the hscript command opunhide. but in case you're feeling uncomfortable using old nodes, i've attached an alternative method. divide1.hipnc hth. petz
  8. take a look a GEO_Closure. or, if you're using GEO_HedgeInterface just get prim edges from vertices and next find prims which are sharing these edge. HERE is an example to a somewhat similar problem ... hth. petz
  9. Edge Flow

    you can use the old polyBevelSop in point mode for this. please take a look at the file. hth. petz divide.hipnc
  10. here's another one ... CentroidTrippling1.hipnc
  11. Attribute to Texture Map

    not sure if this is what you are after but take a look at the attached file. hth. petz attrib_to_cops.hipnc
  12. converting tris -> quads

    it's just to make sure the number is float. doesn't make much sense in vex tbh. and you should probably use 1.0 instead. but well, old habits die hard ...
  13. Computing the Dual With VEX

    this isn't necessarily true and depends on which type of dual you are using. in case of houdins barycentric based dual for instance, it isn't true. if you wanna get voronoi cells you have to compute the circumcentric (voronoi) dual instead. in this case the dual is orthogonal to it's primal triangulation which is one of the key properties of a voronoi. dual1.hipnc
  14. How Could I use Complex Number via VEX Language?

    ah, yes, cdiv is missing. might be worth an RFE!
  15. How Could I use Complex Number via VEX Language?

    if you are using houdini 16, just include complex.h in your vex code. it´s in $HFS/houdini/vex/include.