Jump to content

Search the Community

Showing results for tags 'random'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Lounge/General chat
    • Education
    • Jobs
  • 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 18 results

  1. Hello, I am having trouble randomizing parameters from instanced geometry from within an "instance" subnet. Say for example I wanted to randomize the speed of an instance's animation (on the sop "timeWarp" node), or the start frame of the instance's animation (on the sop "timeShift" node), or perhaps randomize it's material. Please check attached file. Thanks in advanced. instance_randomize.hiplc
  2. hi all i'm trying to add a way to rotate each of my pieces of my burger randomly - but i cannot suss it for love nor money can anyone help please? @mestela - i found a simple wrangle from you to shift all the pieces upwards (burger exported from maya!) ... now i just want to add a little rotation but i cant figure this out tried primitive wrangles and pasting expressions into transform nodes - no idea
  3. Random pop bounce direction

    Hi, I'm trying to achieve a simple effect, but am struggling to get my head around it. I'm sure I'm overthinking it but if anyone could help me that would be great! I'm trying to get a random bounce direction on particles when the collide with the ground plane. As if the particles were small stones bouncing randomly due to a bumpy road surface. I've attached a hip file with the basic setup. I was thinking maybe you could inherit a random vector as the collision happens, but couldn't seem to figure a way to do it. I know various sources have mentioned the old "gain normal" parameter, but this no longer exists. Any help would be much appreciated. odforce_randompopdirection.hip
  4. Hi All! So we've all used a voronoi fracture, and seen it used. That's the problem! Is anyone able to suggest methods to stop the voronoi fracture fracturing with the classic voronoi look with more ‘randomness’? Obviously it depends on the material we’re fracturing but just in general Thanks all.
  5. Hi people, I got some problem with color loss in my balls array attached to point box. Everything is working as intended until I transform my array to RBD Object. In my scene I would like to have balls bounce around and collide with everything but I would like to have some materials and distribute them randomly on them as well. Everything is working but color is lost inside Assemble node at the end in Attribute Wrangle node called : add_name_attribute. I have no idea what happens but this node is making additional groups from my balls and in the end there are many groups which I don't need. All balls are turning grey in viewport as well. If you could have a look I would be grateful. ajz3d_randomize_materials2.hipnc
  6. I was looking at the ripple sop and wanted to add some extra noise, I found that you can't just dive inside but it is compiled vex code so I figured it can't be too hard to recreate. Well I got pretty close but for some reason I am missing the high frequency displacement the original ripple has. Attached is an example of the ripple Sop vs my pointvop I guess I'll post the whole code first and then point out where my struggle lies: #include <math.h> #pragma oplabel "Ripple" #pragma opname "ripple" #pragma opicon SOP_ripple #pragma opmininputs 1 #pragma opmaxinputs 1 #define random0(xxx) (random(xxx)*2.0 - 1.0) #pragma label usecenter "Use Center" #pragma label t "Center" #pragma label freq "Frequency" #pragma label height "Height" #pragma label decay "Wave Decay" #pragma label scale "Scale" #pragma label speed "Wave Speed" #pragma label nripples "Num. Ripples" #pragma label seed "Random Seed" #pragma label up "Up Direction" #pragma export freq all #pragma export height all #pragma export nripples all #pragma export decay dialog #pragma export scale dialog #pragma export speed dialog #pragma hint usecenter toggle #pragma hint t vector #pragma hint up vector // Direction vector #pragma disablewhen t { usecenter off } #pragma range nripples 1 10 #pragma range decay 0.01 10 #pragma bindhandle tx xform "Center" tx #pragma bindhandle ty xform "Center" ty #pragma bindhandle tz xform "Center" tz #pragma bindhandle usecenter xform "Center" onoff #pragma bindhandle height ladder "Height" parm0 #pragma bindhandle scale xform "Scale" sx #pragma bindhandle up1 vector "Up" vx invisible(1) #pragma bindhandle up2 vector "Up" vy invisible(1) #pragma bindhandle up3 vector "Up" vz invisible(1) #pragma bindselectorreserved vex_group points "Ripple Points" \ "Select the points for Ripple and press Enter to complete" \ all 0 "" 0 0 1 sop ripple(int usecenter = 0; vector t = {0, 0, 0}; float freq = 1; float height = 0.15; float decay = 0.75; float scale = 1; float speed = 3; int nripples = 3; int seed=0; vector up = {0, 1, 0}; ) { float xc, yc, phase; float dist, len; vector pos; vector origin; vector offset; int i; if (usecenter) { origin = set(scale*random0(seed), scale*random0(seed+1000), 0); offset = t - origin; } else { offset = { 0, 0, 0 }; } for (i = 0; i < nripples; i++) { xc = scale * random0(i+seed); yc = scale * random0(i+(seed+1000)); phase = M_PI * random(i - (seed+1000)); pos = set(xc, yc, 0); pos -= P; pos += offset; len = length(pos); dist = height * exp(-decay*len) * sin(len*(freq*M_PI*2) - Time*speed + phase); P += up * dist; } } I am thinking the high freq noise is coming from the phase and there seems to be a distinction between random0 and random xc and yc are being generated with random0 and phase with random. Also if you look at the code in houdini the random is colored blue (whatever that means.. I always wonder what all the colors mean but I guess that's for another post) This part of the code: xc = scale * random0(i+seed); yc = scale * random0(i+(seed+1000)); phase = M_PI * random(i - (seed+1000)); How do I translate this into VOPs is the big question for me. Thanks in advance!
  7. For example, if I was creating debris emission for a destruction scene and I wanted the debris to vary in size, how would I go about creating a ramp that would affect my original points and allow control over the scale of my debris geometry and the ratio of larger vs smaller geometry to be used? Any suggestions would be much appreciated. Thank.
  8. Hello everybody! I've got one agent for a crowd simulation. He's holding a sword on his R_hand. When using Agentedit node, Im able to adjust transformations of that controller, which is great, but it affects all agents in the same way. =( What would be the approach to randomize the wrist rotation to get some variation over to the crowd sim ? Thanks!
  9. I am trying my hand at random values. My expression here fit(rand($PT), 0, 1, 0.7, 1) is meant to input a random number into saturation between 0.7 and 1.0. But as the render shows, it seems to just input 0 into saturation. What am I doing wrong here?
  10. I'm trying to control the normal of a single point. I want to use normals to visualize vectors that i will convert to velocity later. I've reduced my experiment to a single point to hopefully simplify things. I'm trying to make the normal point in a truly random direction for each frame. I tried this: float x = fit01(rand(ch("seed1")),-1,1); float y = fit01(rand(ch("seed2")),-1,1); float z = fit01(rand(ch("seed3")),-1,1); @N = set(x,y,z); which gave me a random direction with in a disk. If i substitute @N for @v and feed this into a popnet that uses inherited vel i get particles in a plane. see attached image. If I control each component of the vector leaving two at 0 and setting the third between -1 and 1 i can point the normal in any direction. I can't figure out how to get houdini to randomly set the normals direction in all directions. Help appreciated.
  11. Trying to learn VEX. Using the following simple formula in a wrangle to create random green color values on geometry @Cd = 0; @Cd.g = rand(@ptnum); Lets say I want different random values at frame 120 and I want the values to smoothly interpolate between frame 1 and 120. How would I do this?
  12. Hi I want to randomly select two points from a geo input in a VEX wrangle, so far I have this: int _selectedPts[]; _selectedPts[0] = rand(@numpt); _selectedPts[1] = rand(@numpt); setattrib(geoself(),"point", "Cd", _selectedPts[0], 0, {1,0,0}, "set"); setattrib(geoself(),"point", "Cd", _selectedPts[1], 0, {1,0,0}, "set"); I searched on the VEX docs but every random function I found could only return float numbers, but I need integer numbers. How can I solve this?
  13. Hello, I'm trying to create a looping animation of water spiling on the ground, so that it repeats itself every 60 frames , but im stuck at the part that where I need to blendshape the last frame and the first frame since I can't find anyway for the points to be blend shaped to their nearest relative point. waterfallloop.hip
  14. Hi, any help with this would be awesome. I can randomly emit particles over time with an expression. I can adjust the frequency and offset the values, but is there a way to control or limit how long each random emission lasts? Imagine a sputtering hose, but each stream that shoots out - can only shoot out for 5-10 frames. Much longer than that and it all joins together to form a solid looking stream. I need random blasts, that are limited to 5-10 frames each. Thanks! Andy
  15. Anyone know how to do this? I have tried plugging a pop torque into the flipsolver but don't seem to be able to get it to work.
  16. Hello there, can anyone tell me how to set up random rotation of particles in houdini 13? First I would like to have the particles have a random rotation on creation. I haven't been able achieve this in the file attached to this message, so I tried to do this in sops using the copy sop and transform. However, doing this seems to create some weird kind of snapping behaviour. Isn't there a good way of doing this in the particle sim? Second, i would like the particles to have a random rotation over time as well. I've used the torque node for this, but there are some problems. For example, the torque accumulate over time (I think), so it tends to start from a low angular velocity and then goes higher. Attaching a drag fixed the issue of too high speed, but not the issue of too low in the beginning. How can I control this better? And then I tried to use vexpressions, which I know next to nothing about. I seem to only be able to control one of the axis with my expression. Controlling axisx, axisy and axisz failed... What am I doing wrong? I would appreciate any help! Thanks, Doug particle_rot_problem.hipnc
  17. delete group random

    Hi, everyone! I get some polygon group such as S1 S2 S3 S4…… How can i delete the group random such as S1 S5 S8…… and S1-S10 in delete node by expression. I can random seletion group by foreach node then delete it. But i can not figure out a simple expression in delete node. I have search for tips form forums, it may somebody already post a same problem, but i failed. Any help. Thanks so much! random_delete_group.hip
  18. seeing the last particle tutorial on sidefx using H13 plus the halloween instancing tutorial instancing seems to work a bit different on particles i think. Im trying to randomize the color of the green channel of all instance particle models. On the (auto created) location_particle Object node - I added a instance node and after that - a material node. -overrides material use local variables ON -baseColor and as a color: rand($PT) does anyone know how to randomize the color? thnx