Jump to content

anim

Members
  • Content count

    2,508
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    136

Everything posted by anim

  1. easiest is to use Vellum Rest Blend DOP then set it to Each Frame just feed in animated geo you want to use as rest but if you really want to mess with restlengths directly you have to operate on ConstraintGeometry, so either Vellum Constraint Property or Geometry VOP or Geometry Wrangle, switch it to Prims and type ContraintGeometry into Data Bindings/Geometry
  2. copy to points - variant issue

    if you want to be safer and also to avoid increasing seed by increments of 1 just offseting the same random number to the next point you can use 2 dimensional rand(float, float) i@variant=int(fit01(rand(@ptnum,chf("seed")),0,3));
  3. Create A Nurbs curve from VEX

    I don't think you can, addprim() has pretty limited set of prim types it can create, maybe it will be extended in the future
  4. string ptattribs[] = detailintrinsic(0, "pointattributes"); foreach (string ptattrib; ptattribs){ int size = pointattribsize(0, ptattrib); int type = pointattribtype(0, ptattrib); if (size == 1 && type < 2){ float value = point(0, ptattrib, @ptnum); if (value > 0){ setpointgroup(0, ptattrib, @ptnum, 1); } } } or if you want to be able to specify which attributes : string attribmask = chs("attribmask"); string ptattribs[] = detailintrinsic(0, "pointattributes"); foreach (string ptattrib; ptattribs){ if (match(attribmask, ptattrib) ){ int size = pointattribsize(0, ptattrib); int type = pointattribtype(0, ptattrib); if (size == 1 && type < 2){ float value = point(0, ptattrib, @ptnum); if (value > 0){ setpointgroup(0, ptattrib, @ptnum, 1); } } } }
  5. Flip Source From Points

    be careful with this though, as POP Source doesn't care about particle separation so it's easy to over/under-saturate the particle amount if you have Reseeding ON, then that should take care of managing point density, however if you want it OFF then it's up to you to make sure that your particle separation in the source is correct also make sure you don't source to areas where there are particles already present
  6. you just have to trust it if you look at my example, you can clearly see that the substep value is being stored as an attribute, however you will never see any value other than 0 in the parameter itself so the same way I'm using the value in there you can use it to do whatever, since you see that it evaluates to the correct values during simulation
  7. ".." would not point to POP Source, but SOP Solver, if it's on the parameter on the wrangle inside of SOP solver, but it shouldn't make a difference if it did though here is a simple file of similar setup that you probably have (SOP Solver inside POP Source) to show evaluated values as attribute I added another SOP Sover in there just to see it isolated, if you are using POP Source's SOP Solver that's fine too subframe_inside_sopsolver.hip
  8. create a parameter on your wrangle or anywhere in your SOP Solver and use this expression to get simulation time stamp("..", "ST", 0) timestep stamp("..", "TIMESTEP", 0) or simulation frame stamp("..", "ST", 0)/stamp("..", "TIMESTEP", 0) they will be only valid during siming, but you can set their defaults to nonzero if you want the to be specific values when observing inside of SOP Solver
  9. find center point

    or use Extract Centroid SOP also you may need to copute orient to get stable reference frame in case you need it find_centerPoint_mod.hipnc
  10. looping over an integer array with itoa()

    don't have to be groups, just directly put it in target points group field of Copy SOPs if you want to create groups first you may find Group By Range handy as you are just creating 2 range groups
  11. looping over an integer array with itoa()

    why not just taking integer number then? if user enters 3, one group will be 0 1 2 and another 3 4 5 ir in another words if you have integer paramerer "n" then one group field will be: 0-`ch("n")-1` and another: `ch("n")`-`ch("n")*2-1`
  12. looping over an integer array with itoa()

    while I don't completely understand what you are going for, but this s@integertostring = itoa(s@mystrArray[i]); should probably be this, as you aferall want to convert int to string s@integertostring = itoa(i@cleanArray[i]); but I doubt it will help your code as you are clearly dealing with strings and want output as a string not string array, what exactly are you trying to do? Why would someone enter only sequential 0 1 2 3, what if user enters 0 3 4 6? what would you expect the rest to be? 1 2 5 7? what if there is not 8 points in the geo? sounds like too many assumptions usually you want to use groups for this, you pick your points as group A and then one copy uses group A and another !A if however you still want to pursue VEX then have a look at functions like split() and join() to avoid unnecesary code, also you may want to use variables instead of attribute bindings unless you want the values to be atually output into an attribute
  13. in this case you can use Polyextrude Inset table_example_fix.hip
  14. Non-standard Spiral Staircase

    that shape sure does resemble pickle
  15. not sure it's doing what you think it's doing but if you just want non-uniform scale (which is what uniform scale in certain axis sounds like) then use Transform SOP and scale just in X and Z for example
  16. RBD to Vellum

    Vellum will simply take geo at the start frame and runs with it, there are no velocities at the first frame so it just falls down you can use Vellum Pin Constraint for example Stopped and Match To Animation, which will try to match the animation of your incoming RBD sim then inside of the Vellum Solver you can unpin any point at any time you want, in the example file I'm unpinning all after frame 10, but you can art direct it per page or even per point, or based on attributes if you for example have attribute that specifies time since the page was moved, etc... book_question_forum_fix.hipnc
  17. Channel from connected node?

    $HIP/layers/`ch(opinputpath("../NODE2",0) + "/mode")`.png
  18. Channel from connected node?

    if it's integer then something like this $HIP/layers/`ch(opinputpath(".",0) + "/mode")`.png if string $HIP/layers/`chs(opinputpath(".",0) + "/mode")`.png
  19. you can convert them to VDB and then use VDB Vector Merge SOP to get a single vector volume, that one should work also according to help for Source Volume parameter: so for scalar volumes that would mean list of all 3, not just one of them: vel.x vel.y vel.z
  20. pyro sim with timescale & retime sop issues

    not sure if clever, but normal way to do it is to correct your v@vel field to pretend it was simmed at timescale 1 so in your case Volume Wrangle before retime should do it: v@vel *= 0.1; EDIT: or actually maybe try just changing Input Timestep on Retime SOP to 0.1/$FPS instead of 1/$FPS, havent tested that one though, but if it works, that would be clever
  21. Forloop in a Forloop

    your loops were not exactly within each other, just one after another and the first loops were single pass only anyway here is reorganized file, purely to make it work, some intersection shapes seem to be "inverted" so you may further need to work on the logic IntersectionsForLoops2_mod.hipnc
  22. technical: How are geometry lights rendered

    maybe look at files like: $HFS/houdini/vex/Light/sampler_geometry.vfl $HFS/houdini/vex/Light/tracer_geometry.vfl $HFS/houdini/vex/include/pbr_direct_lighting.h and others in there, and hopefully you will find some useful info in there
  23. fin case you mean VEX for loop, here is one: float default = 0.0; for (int i=0; i<10; i++){ string name = "attrib" + itoa(i); addpointattrib(0, name, default); } of course you can directly use setpointattrib() which will create one if doesnt exist as well as sets values, but really depends on what you are trying to do
  24. Infect and spread color in DOPS

    you need to use @Frame, also if 0.5 is a chance of infection then you want to use <= @infect = rand(@Frame) <= chf("infection_chance"); but that will be steppy as all the potential infectees will either get infected or not per frame, so you may want to base it on frame and per particle so make sure your particles have valid id attribute (since you are using Flip, check flipsolver1/PArticleMotion/Behavior/AddIDAttribute) and then this should work @infect = rand(@Frame, @id) <= chf("infection_chance");
  25. Infect and spread color in DOPS

    https://www.sidefx.com/docs/houdini/nodes/dop/popwrangle.html#inputs
×