Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


petz last won the day on February 3

petz had the most liked content!

Community Reputation

332 Excellent

About petz

  • Rank

Personal Information

  • Name

Recent Profile Visitors

10,379 profile views
  1. due to the use of "remove shared edges" in the divideSop you got always two coincident polygons for every section. you need to delete duplicates and then make sure the normals of remaining prims are pointing into the same direction. instead, you could also set the output of the booleanSop to "seam" and check the curve direction based on point neighbours ... hth. petz
  2. here's a simple one ... hth. petz perpenticular_tangent_1.hipnc
  3. here's another one. it's a simple vex solution which works basically by counting the number of intersections along the curve and the fact that an uneven number means it`s inside an object ... hth. petz curve-boolean.hipnc
  4. Jake's HIPs Don't Lie

    hey jake! well, what you're calculating is not curvature but some curvature-indicating value. this, of course, makes sense since you're relying on normals which are per definition closely intertwined with curvature. but instead of building the covariance matrix you could just do pretty much the same by averaging the normalized normals from surrounding points and calculate the difference to the normal of the current point. however, from the mathematical and geometrical side of things neither this, nor your method has much to do with measuring curvature and the result is most probably off by a large number. (in your case, for instance, it's a min. and max. value of 0.000332 / 0.7385 compared to mean curvature of -107.395 / 204.042). if you want to compute curvature by using eigenvalues you need to compute, for example, the shape operator by computing the jacobian of N, which in this case results in the hessian and finally project it onto the surface. building the covariance matrix of normals doesn't make much sense if you're talking about accurate curvature values. building the shape operator is one of the methods described at houdiniGubbins and no, it doesn't need to be a triangle mesh. fitting a polynomial and computing curvature analytically also doesn't need triangles. in fact it doesn't need any mesh at all and works even on a pointcloud. the same is true if you're computing the curvature tensor based on a simple diffusion distance and search for k1 and k2 in the least squares sense. the most accurate results, however, are possible on a triangular mesh. you're right that curvature computation on meshes is generally problematic but the reason is not because of irregular distances in the one-ring. the main problem is that second order derivatives of piecewise continuous functions are pretty much everywhere null and hence curvature is constant on a triangle. using the edgeTransportSop does not solve this problem. if we are talking about the smooth case, then your idea might makes some sense but on a smooth surface you simply wouldn't need it because here it's easy to compute derivatives. beside that, you would need geodesic distances and not the shortest path distances which the edgeTransportSop calculates... hth. petz
  5. 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
  6. 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
  7. 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 ...
  8. 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
  9. 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");
  10. 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 ...
  11. 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
  12. 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
  13. Edge Flow

    you can use the old polyBevelSop in point mode for this. please take a look at the file. hth. petz divide.hipnc
  14. here's another one ... CentroidTrippling1.hipnc
  15. 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