Jump to content

petz

Members
  • Content count

    343
  • Joined

  • Last visited

  • Days Won

    37

petz last won the day on August 21

petz had the most liked content!

Community Reputation

309 Excellent

About petz

  • Rank
    Illusionist

Personal Information

  • Name
    petz

Recent Profile Visitors

9,443 profile views
  1. 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 ...
  2. 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
  3. 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");
  4. 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 ...
  5. 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
  6. 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
  7. Edge Flow

    you can use the old polyBevelSop in point mode for this. please take a look at the file. hth. petz divide.hipnc
  8. here's another one ... CentroidTrippling1.hipnc
  9. 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
  10. 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 ...
  11. 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
  12. How Could I use Complex Number via VEX Language?

    ah, yes, cdiv is missing. might be worth an RFE!
  13. 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.
  14. Resample curve by width/pscale

    what if you simply calculate the circumference and divide it by the number of polywire´s division? resample2.hiplc
  15. Resample curve by width/pscale

    attached is one way how you can do this ... hth. petz resample1.hiplc
×