Jump to content

animatrix

Members
  • Content count

    212
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by animatrix

  1. Weathering texture tool

    Super cool Konstantin! I love seeing this kind of very unique and original ideas. Would be a great tutorial I can imagine a dozen uses just off top of my head!
  2. iterate over certain points

    No, 1 will become (1,1,1). I just posted an example. He should be able to adapt it to his needs.
  3. iterate over certain points

    I tried it before posting, it works fine. Can you post what error are you seeing? 1. {} is not needed in my code. Look here for similar C style syntax rules: http://www.cplusplus.com/forum/beginner/180452 2. You don't need to provide a vector type. VEX will automatically cast 0 into a vector.
  4. iterate over certain points

    Hi, You can do it using a detail wrangle: int pts [ ] = array ( 1, 3, 4 ); foreach ( int pt; pts ) setpointattrib ( 0, "P", pt, 1 );
  5. Hi, This is a common feature request but it's not possible. Only think you can do is a hack where you create a for loop network with Iteration Method set to Count with 1 iteration. That way all the nodes inside would only execute once, just like having no loop. The downside is it might confuse other people.
  6. Pragmatic VEX: Volume 1 [4K] [H18]

    Subdivision surfaces are piecewise parametric surfaces defined over meshes of arbitrary topology. It's an algorithm that maps from a surface to another more refined surface, where the surface is described as a set of points and a set of polygons with vertices at those points. The resulting surface will always consist of a mesh of quadrilaterals.
  7. Pragmatic VEX: Volume 1 [4K] [H18]

    After more than 5 months of unimaginable amount of work, I am proud to release my first in-depth Houdini course on VEX More details in the video description and the website. Active Patreon members will receive additional discounts proportional to their lifetime support (25% of their lifetime support). Message me on Patreon for your discount coupon. Enjoy! Table of Contents 01 - Introduction [Point Clouds] 02 - Introduction [pcopen() vs pcfind() vs nearpoints()] 03 - Introduction 04 - Implementation 05 - pcfilter() Implementation for pcfind() 06 - pgfind() 07 - pcfind_radius() 08 - Excluding the Current Point & Ad-Hoc Groups 09 - Finding Min & Max Neighbour Points [Unique Pair Matching] 10 - Concept 11 - Implementation [Camera Based Occlusion with Variable Pscale] 12 - Concept 13 - Implementation [Uniform Point Distribution Over Polygonal Surfaces [Point Relaxation]] 14 - Concept 15 - Implementation 16 - Decoupling Operators [Convolution Kernels] 17 - Introduction 18 - Border Handling [Connectivity & k-Depth Point Neighbours Using Edges] 19 - Introduction 20 - Concept 21 - Implementation [Connectivity & k-Depth Point Neighbours Using Primitives] 22 - Concept 23 - Implementation [Extending k-Depth Point Neighbours Using Edges] 24 - Introduction 25 - Concept 26 - Implementation [Extending k-Depth Point Neighbours Using Primitives] 27 - Concept 28 - Implementation [smoothstep() [Cubic Hermite Interpolation]] 29 - Concept 30 - Implementation [Shaping Functions] 31 - Introduction 32 - Implementation 33 - Blurring Attributes [Sharpening Attributes Using Unsharp Mask] 34 - Concept 35 - Implementation [Generalizing the Kernel Code to Handle All Attribute Types] 36 - Concept 37 - Implementation [Attribute Gradient] 38 - Introduction 39 - Concept 40 - Implementation [Gradient Ascent & Descent] 41 - Planar Geometry - Introduction 42 - Planar Geometry - Concept 43 - Planar Geometry - Implementation 44 - 3D Geometry [Contour Lines] 45 - Introduction 46 - Concept 47 - Implementation 48 - Heightfields [Geometric Advection - Orthogonalization & Flowlines] 49 - Introduction 50 - Concept 51 - Implementation [Clustering & Quadtrees] 52 - Concept 53 - Implementation [Adaptive Subdivision] 54 - Introduction 55 - Implementation 56 - Hashing [Adaptive Subdivision] 57 - Improving OpenSubdiv Catmull-Clark Subdivision Surfaces Algorithm 58 - Half-Edges [Adaptive Subdivision] [Aggressive Performance Optimizations] 59 - Eliminating Groups 60 - Custom Fusing In VEX 61 - Recreating Proximity Structures In VEX 62 - Get Unshared Edges In VEX 63 - Final Optimizations [Limit Surface Sampling] 64 - Introduction 65 - OpenSubdiv Patches 66 - Moving Points to the Subdivision Limit Surface 67 - Scattering Points on the Subdivision Limit Surface 68 - Generating a Point Cloud on the Subdivision Limit Surface 69 - Pre-Generating a Point Cloud on the Subdivision Limit Surface 70 - Creating Isolines on the Subdivision Limit Surface [Adaptive Subdivision] 71 - Computing Surface Normals from the Subdivision Limit Surface [Custom Subdivision Surfaces] [Splitting Edges [Edge Divide]] 72 - Concept 73 - Converting Edges to Primitives 74 - Creating New Edge Points [Rebuilding Polygons] 75 - Concept 76 - Implementation 77 - Preserving & Interpolating Attributes 78 - Multithreading by Connectivity 79 - C++ vs VEX 80 - Preserving Groups 81 - Final Optimizations [Implementing Bilinear Subdivision] 82 - Introduction 83 - Concept 84 - Modeling Test Geometry 85 - Starting from Edge Divide 86 - Creating New Face Points 87 - Creating New Edge Points [Creating New Closed Polygons] 88 - Concept 89 - Implementation [Creating New Open Polygons] 90 - Concept 91 - Implementation 92 - Preserving Primitive Groups & Interpolating Primitive Attributes [Preserving Vertex Groups & Interpolating Vertex Attributes for Closed Polygons] 93 - Concept 94 - Implementation 95 - Preserving Vertex Groups & Interpolating Vertex Attributes for Open Polygons 96 - Implementing Iterations 97 - Preserving Literal Groups 98 - Creating Neighbour Primitives 99 - Final Changes 100 - Testing On Complex Geometry [Implementing Catmull-Clark Subdivision] 101 - Introduction [Closed Surfaces] 102 - Rules [Gathering Edge & Face Points] 103 - Concept 104 - Implementation [Computing Weights for New Edge Points] 105 - Concept 106 - Implementation [Computing Weights for Original Points] 107 - Concept 108 - Implementation [Attribute Interpolation] 109 - Concept 110 - Implementation [Boundary Interpolation Rules for New Edge Points] 111 - Concept 112 - Implementation [Boundary Interpolation Rules for Original Points] 113 - Concept 114 - Implementation 115 - Open Surfaces - Handling Corner Points 116 - Handling Non-Manifold Topology [Open Polygons] [Computing Weights for Original Points] 117 - Reverse Engineering OpenSubdiv 118 - Implementation [Computing Weights for New Edge Points] 119 - Reverse Engineering OpenSubdiv 120 - Implementation 121 - Handling Open Polygonal Curves [Handling Mixed Topology] 122 - Full Geometry 123 - Sub-Geometry 124 - Testing On Complex Geometry [Performance] 125 - Profiling [Grouping Boundary Edges from Primitive Group] 126 - Concept 127 - Implementation 128 - VEX vs C++ [Caustics] 129 - Introduction 130 - Sea Caustics 131 - Pool Caustics 132 - Conclusion
  8. Get prim attribute value via python

    Hi Saori-san, You need to access the geometry on your hou.Node instance. For example: hou.node("/obj/GEO_model/null1").geometry().attribValue("name")
  9. Pragmatic VEX: Volume 1 [4K] [H18]

    We have already seen how to apply gradient ascent, descent and contour lines to heightfield like planar geometry. The same concept can be applied to heightfields. Because heightfields are volumes, getting the gradient is very easy by using the volumegradient function. The normal of a heightfield is (0, 1, 0) if the heightfield is an XZ volume, meaning facing up. Getting the cross product of both of these vectors will give you the contour lines.
  10. how to change HDA node color?

    Hi, You can put this code in Scripts > Python Module: def setNodeColor(kwargs): this = kwargs['node'] color = hou.Color(1, 0, 0) readmode = this.evalParm('readmode') if readmode == 1: color = hou.Color(1, 0.8, 0) elif readmode > 0: color = hou.Color(0.6, 1, 0.2) this.setColor(color) Then call it in the parameter's Callback Script parameter like this: hou.phm().setNodeColor(kwargs)
  11. Hi, I don't think that's possible.
  12. Pragmatic VEX: Volume 1 [4K] [H18]

    Now that we know about gradients, there is another concept that's related to them that can be acquired quite easily, and that concept is contour lines. A contour line (also isoline) of a function of two variables is a curve along which the function has a constant value, so that the curve joins points of equal value. There are very interesting relationships between the gradients and the contour lines.
  13. Hi, If all you want is an array of elements in that group, you can use the expandprimgroup function:
  14. Pragmatic VEX: Volume 1 [4K] [H18]

    We have implemented gradient ascent and descent on planar geometry, much like a terrain where we used the gradient of the height. For an arbitrary geometry, what can we use as the cost attribute? One thing we can use is depth.
  15. Pragmatic VEX: Volume 1 [4K] [H18]

    Thanks a lot guys! You can always interleave with other content Even though the course is advanced, there is still a progression of complexity within the course. So starting with basic elements, it gradually ramps up in complexity and ends with highly technical topics.
  16. Curve edge normals?

    Hi, I think PolyExtrude SOP is using the same code as PolyFrame SOP to compute the normals for curves. So if you use the Bitangent attribute from PolyFrame SOP, it should match the default extrusion result of PolyExtrude SOP.
  17. partition groups by name attribute vex

    It works here. "set" is the default behaviour.
  18. How to group prims by similar curvature

    The implementation should be similar more or less, but you might want to add maxangle also for completeness. I just wanted to show another way to select edges by angles in VEX.
  19. How to group prims by similar curvature

    Hi, You can also select edges using the angle between the faces sharing it: float getAngleBetweenVectors ( vector v0; vector v1 ) { vector v0n = normalize ( v0 ); vector v1n = normalize ( v1 ); return atan2 ( length ( cross ( v0n, v1n ) ), dot ( v0n, v1n ) ); } int pts [ ] = neighbours ( 0, @ptnum ); foreach ( int pt; pts ) { if ( @ptnum < pt ) continue; int prs [ ] = { }; int firsthedge = pointhedge ( 0, @ptnum, pt ); int count = hedge_equivcount ( 0, firsthedge ); if ( count == 2 ) { int hedge = firsthedge; do { int pr = hedge_prim ( 0, hedge ); if ( pr != -1 && find ( prs, pr ) < 0 ) append ( prs, pr ); hedge = hedge_nextequiv ( 0, hedge ); } while ( hedge != firsthedge ); vector n0 = primuv ( 0, "N", prs [ 0 ], 0.5 ); vector n1 = primuv ( 0, "N", prs [ 1 ], 0.5 ); float angle = getAngleBetweenVectors ( n0, n1 ); if ( angle >= radians ( ch("minangle") ) ) setedgegroup ( 0, chs("vex_selectiongroup"), @ptnum, pt, 1 ); } }
  20. Pragmatic VEX: Volume 1 [4K] [H18]

    Thanks a lot Kiryha! I achieved the overlay network editor by writing a lot of Python Qt code https://gumroad.com/animatrixx#Igugf It doesn't seem to work on mac/iOS though due to some weird Qt bug.
  21. Pragmatic VEX: Volume 1 [4K] [H18]

    Gradient descent is an optimization algorithm used to minimize some function by iteratively moving in the direction of steepest descent as defined by the negative of the gradient.
  22. Hi, You can try using PolyPath SOP before Resample SOP.
  23. Houdini 19 Wishlist

    You can implement recursion inside a wrangle using a stack: https://docs.microsoft.com/en-us/archive/blogs/ericlippert/recursion-part-two-unrolling-a-recursive-function-with-an-explicit-stack And outside using a Solver SOP.
  24. Hi, It's more of a workflow thing. I personally use vector to float myself. I think vector to float might be faster as it's modifying 3 parameters by reference vs calling vop_getcomp 3 times to get 3 values, if you need 3 values that is.
×