Jump to content

Search the Community

Showing results for tags 'vex'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Found 604 results

  1. Joy of Vex 7 coding issue

    i'm going through the "Joy of Vex" and i've run into an issue at day 7. this code (below) isn't giving me the results of this gif. /////////////// int pt = nearpoint(1,@P); vector pos = point(1,'P',pt); float d = distance(@P, pos); d *= ch('scale'); d += rand(pt); d -= @Time; @P.y = chramp('pulse',d)*ch('amp'); /////////// Joy_of_vex7issue.hipnc
  2. what is intrinsic in VEX?

    some function like below one: setprimintrinsic() carry the intrinsic with themselves, what are they, and how we can use them?
  3. I'm gonna use nearpoint with the position of add+transform. int point = nearpoint(0,v@opinput1_P,1); if(point == @ptnum) { @Cd = {1,0,0}; } but it doesn't work.
  4. iterate over certain points

    I have this code below: i[]@TP = neighbours(0,0); foreach(int i ; @TP) { @P.y = 1; } how can I tell Houdini to just move the points insideTP array? foreach move all the points.
  5. volume of an object affect on your effect

    hey guys , how can I calculate the volume of an object in VEX , I want to write something like this one below: the line of your script * volume of a specific object I used getbbox_size but the result is a scalar. I want everything in the object to have the effect. what should I do? best regards
  6. 1 Minute VEX

    Hello everyone! Every Monday at 12am for the last 3 weeks I have been uploading VEX snippets as mini-tutorials on my website: https://aaronsmith.tv/1-Minute-VEX Here, through '1 Minute VEX', I'll try to walk you through some of the more obscure and advanced functions that exist, and add as much explanation as possible to accompany the images in text based form. These are not for Houdini beginners! I also intend on all of my website's educational content being free - permanently. No donations, no subscriptions, no coupons. Below is 1 Minute VEX III as an example; Let me know if anyone has any suggestions for improvement! - 1 Minute VEX III - Ray-Cast Ambient Occlusion
  7. Just Have Fun Now Flower Effects and much more Its Crystal Case mystiqueTransform.rar
  8. Hi, Is there a way to do @disableexternal on each object individually ? I would like to disable it for one object but not the other. Thanks !
  9. [SOLVED] @P in Flip/POP Vexpression

    Hello everyone, I am currently working on something with FLIP Fluids and need to decrease the POP Windforce depending on the distance to a point. I assumed I could use the Vexpression inside the POP Wind but I can't seem to be able to access the particle Position. I have created a basic HIP file. Inside the AutoDOP Network, you will find the POP Wind in which I'm simply trying to export a test attribute that should be "@P". I've already tried a couple of things like Google, reading the float values separately ("@P.x"), or simply using it like I would use VEX in SOPS ("float length = length(@P);"). I am sure there is an easy way that I haven't found yet or a logical reason why I can't access "@P". Any help would be appreciated! Position_in_Vexpression.hiplc
  10. Javascript to Vex snippet

    Can delete this post
  11. Hi there, So I'm trying to fit the point velocity attribute range from 0-1. In my test scene, I have a simple RBD sphere shooting upwards and slowly slows down once landed. I'm using the length of velocity, promote it to detail attribute with min and max v and imported the detail attributes in a second wrangler where I fit it in an attribute called @speed, the issue is instead of @speed going from 0-1, it always starts at 0.5? Or is my setup wrong? Thanks. *hip file attached* min_max_v.hip
  12. 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
  13. Hi all, i've got some points with trails and i'm filtering them randomly to leave some behind as the trails move forwards. each trail is split into a leading point and the trailing points, and each trail and its leader have a unique id. what I want to do is take the points i've left behind and remove them if they come into contact with another point trail that has a different id. so something like an attribute transfer but with a condition that checks the near points id and only transfers some attribute if that id is different. so the white points from trail 1 would exist until the come in contact with the red points from trail 2. Any ideas how to do this in vex or vops? Many thanks,
  14. Procedurally split faces

    Hey guys, it's me again, I have another "complicated" question : is it possible to procedurally split faces with vex ? I'm modeling roofs, and I needed to split the top faces to get to and be able to get a triangle shape (by translating the created point on the Y axis). The edge divide sop makes a wonderful job, but sometimes it doesn't cut faces properly (it's very rare but very annoying). For now, I detect the bugged faces by counting the vertices on each face, and if one has 6 vertices then it's a bugged face; but I don't know how to split them procedurally. One method that came to my mind was making a python script that creates a polysplit node for each face with the split coords but it's not very efficient.. If anyone has an idea ! Cheers, edit : added a screenshot for a better explanation!
  15. Hey guys, I'm working on some procedural tools and I need to add points on 2 primitives (they are approximately the same) to then add polylines for each pair of points (to make some grooves like there is on haussmannian building rooftops). This screenshot may help to understand : The thing I do for now is resample the bottom prim, and then use primuv() to sample the pos based on the @curveu (or u in the screenshot) attribute on the upper prim, and for the line I have a Add node -> by group -> by attribute, and it works like a charm; until the 2 primitives have different parametric coordinates. Sometimes it have offset, or even it's inverted, and the points aren't interpolated as I want. So, I wonder if there is a way to copy the uv coordinates from one primitive to another one, or a better solution to this ! Cheers,
  16. save particle velocities every frame

    Hi All, TL;DR - How do you save particle velocities each frame to feedback into a sim? I'm working on a particle effect for rain on a window. Currently adapting a nice example from Toadstorm. I've made some changes to his setup. He has new particles growing over time and becoming droplets past a certain pscale, so i've derived mass from pscale to connect droplet size and speed, as the wind force i'm using to move them is not set to ignore mass. video I added a sop solver after the DOP to delete still particles touched by moving ones. And a popinteract and a popfluid to try and get the moving drops to coalesce and follow each other as they move down, but this has only slightly worked. Ideally i'd like to write the velocities of the moving drops into a volume which could then come back into the sim the advect the particles, or some other technique that follow make it so that new drops hitting and existing trail would follow its path precisely, and add a little to their speed and size. I presume I would use a sop solver inside my DOP network for this, but no clue beyond that. Any advice much appreciated, H windowdrops-uv3-w.mp4
  17. vex : addvertex with foreach

    What do these two lines mean? I do not understand. Please explain. addvertex(0, prim, @ptnum); addvertex(0,prim,pt); I don't konw why "ptnum" is needed here.
  18. VEX for artists

    I have a Houdini GitHub repo where (in addition to the code section, which is the Houdini pipeline for my personal projects) I store all my R&D notes related to the pipeline developing and programming organized as one wiki. The valuable part of this wiki is VEX for Artists tutorial, where I record everything I was able to understand about VEX in form of tutorials, so it might be useful not only for me but for anybody else, who is going the same route of learning programming from scratch. It was built by a guy with an artistic background and no technical education and skills, so it might be suitable for the same type of peoples. Easy and clean, a lot of simplification, a lot of explanation of basics. This VEX tutorial was just updated with a new section: Solving problems with VEX. Here, using the basic blocks studied earlier we will create something meaningful for the production. The first example we look into is the creation of a hanging wire between 2 points. For those who tried or even afraid to begin to learn VEX but fail and stop because it was too hard. Enjoy!
  19. Hi All, sorry for the heading, Its a hard one to describe lol. I have a booleanfracture piece and want to process only the middle points , then with that create geo that knows the distance to top and bottom of its local position (as the slice fracture is not a flat plane, hopefully a picture helps). Im not sure the best approach, I would start with nearpoints in some way ,finding the top points and test down for a middle storing the lowest for distance checks?? lol, well its a tricky one
  20. I got an array of point numbers int searchPts[] = [0, 1, 2, 3] that I want to pass into the pcfind function as a ptgroup so it only operates on those points. How do I convert this to a string of "0 1 2 3"? Is this how I should even approach it? pcfind(<geometry>geometry, string ptgroup, string Pchannel, vector P, float radius, int maxpoints) Thanks!
  21. I'm trying to make a procedural bridge system and now creating a vertex in the surface below but it seems to detect the grid without the edit instead.
  22. Hi Superior brains, as I approach modelling methodologies, I've turn my attention towards VDB's In the below example I've used a grid (but this would be an arbitrary shape Convex/concave "2Shape") with a noise pattern to create heights for a later extrude; I then convert to VDB to "cleanup the geo" My question: is it possible to directly manipulate the VDB via VEX to do something similar without having to go through the conversion process (poly to VDB) One reason behind this is the shape I wish to extrude can be fairly complex and dense thus making the conversion process slow, so perhaps adding voxels or extruding/expanding/manipulating voxels is possible in some way? ( VDB Wrangle?), feels like this is not possible but never hurts to ask... unless its physical...;)
  23. pnoise: remapping output values

    I need a simple noise that loops over the course of five (or however many) seconds, moving the @P.x of the points on a line back and forth, and so I'm using pnoise. I would like to give it precise min and max values (I want things to be able to bump against each other but not intersect), which would be easy enough with a fit, but I haven't been able to find it's precise output values in any reference. Over the course of 120 frames the output appears to be 0.5-centric and it goes between 0.22398 and 0.800649, so it doesn't appear to be an even +/- any obvious value like 1 or 0.5. How can I find the actual minimum and maximum outputs for pnoise so I can make sure it hits zero (or 1) at its extremes? I've tried periodic noise in a point VOP but that seems very unwieldy. I know Unified noise can loop and is always 0 - 1, but it has a whole lot more to it than I need to deal with. (Plus I just want to know how to do these things in VEX). The only output value reference I've been able to find is that aanoise is -0.5 to 0.5 and unified noise is 0 - 1. If it makes any difference, here's what's tucked in my point wrangle (reference parameters on an outer master null): int offset = prim(0,"id",0); float roughness = ch("../MASTER/roughness",0); float frequency = ch("../MASTER/frequency",0); int period = ch("../MASTER/period",0); float noisemult = ch("../MASTER/outerNoiseMult"); float noiseval = pnoise((@Time*frequency)+offset, @P.z*roughness, frequency*period, 0); @P.x += (noiseval * noisemult)-(noisemult/2); //the noisemult/2 is to get them back to 0-centric Thanks!
  24. Noise type value visualization

    Hopefully this is helpful to others. Small snippet to visualize the different noise's. I have not put them all in, but if you feel inclined please add more and reply-post. You will need to create the menu (as this does not seem possible in VEX and has to be done via the parameter interface? and a 100x100 grid as input. // // Houdini Noise visulization - Curtis // int NoiseMenu = ch("NoiseMenu"); // Create a Ordered Menu "NoiseMenu", In the "Pram Interface", //Token, Lable ... // 0 vnoise // 1 wnoise // 3 flownoise // 4 curlnoise // 5 xnoise // 6 random // 7 alligator float frequency = ch("frequency"); float rough = ch("roughness"); float atten = ch("attenuation"); float jitter = ch("jitter"); int turbulence = ch("turbulence"); int flow = ch("flow"); int seed = ch("seed"); //Noise data vector vp0, vp1; float output1=0; float output2=0; //No Case stament in VEX ... elseif it is.. if ( NoiseMenu == 0 ){ //vnoise VEX function //Generates Voronoi (cellular) noise. vnoise(@P, set(jitter, jitter, jitter), seed, output1, output2, vp0, vp1); } else if ( NoiseMenu == 1){ //wnoise VEX function //Generates Worley (cellular) noise. wnoise(@P, @P.z*frequency, output1, output2); //general noise } else if ( NoiseMenu == 2){ //snoise VEX function //functions are similar to wnoise. output1 = snoise(@P, turbulence, rough, atten); } else if ( NoiseMenu == 3){ //flownoise VEX function (soft) //Generates 1D and 3D Perlin Flow Noise from 3D and 4D data. output1 = flownoise(@P*frequency, flow); } else if ( NoiseMenu == 4){ //curlnoise VEX function //Computes divergence free noise based on Perlin noise. output1 = curlnoise(@P*frequency); } else if ( NoiseMenu == 5){ //xnoise VEX function //Simplex noise is very close to Perlin noise output1 = xnoise(@P*frequency); } else if ( NoiseMenu == 6){ //random VEX function //Generate a random number based on the position in 1-4D space. output1 = random(@P*frequency); } else if ( NoiseMenu == 7){ //anoise VEX function //Generates "alligator" noise. output1 = anoise(@P*frequency,turbulence, rough, atten); } //Output to 100x100 grid as colour @Cd = output1;
  25. patreon.com/posts/38913618 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. The most iconic example is to start with a cube and converge to a spherical surface, but not a sphere. The limit Catmull-Clark surface of a cube can never approach an actual sphere, as it's bicubic interpolation and a sphere would be quadric. Catmull-Clark subdivision rules are based on OpenSubdiv with some improvements. It supports closed surfaces, open surfaces, boundaries by open edges or via sub-geometry, open polygons, open polygonal curves, mixed topology and non-manifold geometry. It can handle edge cases where OpenSubdiv fails, or produces undesirable results, i.e. creating gaps between the sub-geometry and the rest of the geometry. One of the biggest improvement over OpenSubdiv is, it preserves all boundaries of sub-geometry, so it doesn't introduce new holes into the input geometry, whereas OpenSubdiv will just break up the geometry, like blasting the sub-geometry, subdividing it and merging both geometries as is. Houdini Catmull-Clark also produces undesirable results in some cases, i.e. mixed topology, where it will either have some points misplaced or just crash Houdini due to the use of sub-geometry (bug pending). Another major improvement is for open polygonal curves, where it will produce a smoother curve, because the default Subdivide SOP will fix the points of the previous iteration in subsequent iterations which produces different results if you subdivide an open polygonal curve 2 times in a single node vs 1 time in 2 nodes, one after the other. This is not the case for polygonal surfaces. VEX Subdivide SOP will apply the same operation at each iteration regardless of topology. All numerical point attributes are interpolated using Catmull-Clark interpolation. Vertex attributes are interpolated using bilinear interpolation like OpenSubdiv. Houdini Catmull-Clark implicitly fuses vertex attributes to be interpolated just like point attributes. Primitive attributes are copied. All groups are preserved except edge groups for performance reasons. Combined VEX code is ~500 lines of code.