Jump to content

eimk

Members
  • Content count

    24
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

8 Neutral

Personal Information

  • Name
    Ethan
  • Location
    Scotland
  1. Mushroom growing system

    The VEXpression I used on the pop wind node was: amp *= 1 - clamp(@age/3, 0, 1); Dividing by 3 because they all seem to stop before their age reaches 3 seconds. I didn't notice them spinning before, sorry. If you wire the align node right into the matrix to quaternion the rotation will stop, although I'm not familiar enough with matrix maths to know why. Here's the scene file: mushroom_system_OD.hipnc
  2. Mushroom growing system

    1. The orient attribute is driven by velocity, which becomes very shaky towards the end. This is because of the wind force. Here's a visualisation of velocity (sorry for the bad quality gif): If you reduce the effect of the wind force as the particles slow down then velocity will be more stable: I used a VEXpression on the wind node to reduce the amplitude over time but you could achieve the same effect in multiple ways. 2. You could try POP Steer Avoid or other crowd dynamics nodes. And/or scatter points on the source geometry before the DOP network, set their @pscale and use a point relax. Then the points will be spaced enough before the sim starts.
  3. for loop - inheriting v attribute

    A wrangle set to run over points will execute the VEX code once for each point in the input geometry. When using the @attribute syntax, you are setting an attribute on the point that is currently being run over. If you want to set an attribute on a different point, you have to use setpointattrib, which I see you already have commented out. The one you have will do exactly the same as setting @v since the point to set the attribute on is @ptnum. If you want to set the @v attribute on the point you just created, you'll have to store the created point in a variable, and then use that variable in place of @ptnum. for(int i=0; i<10; i++){ if(@rand>0.8){ v@pos = point(1, "P", 0); v@v= v@P-v@pos; i@point = 1; } if(i@point !=1){ v@v=set(0,1,0); v@Cd=set(1,0,0); } if(i@point==1){ v@Cd=set(0,1,0); v@v= v@P-v@pos; v@P+=v@v*-0.01; int new_point = addpoint(0, @P); v@v= v@P-v@pos; setpointattrib(0, "v", new_point, v@v); } } There are also some inefficient methods in your code, which aren't necessarily a huge issue for what you're doing here but it's good to always optimise things anyway. You're creating variables by setting attributes, which is slower and leaves you with a bunch of attributes you don't need after that wrangle. The first if statement executes once for every loop even though it will have the same outcome each time. Also, certain attributes like P, Cd, and v are recognised by Houdini and don't need to be specified as vectors. Here's an example of how you could remove these inefficiencies: if(@rand > 0.8){ vector pos = point(1, "P", 0); @v = @P - pos; @Cd = {0, 1, 0}; for(int i=0; i<10; i++){ vector P = @P + @v * -0.01 * i; int new_point = addpoint(0, P); setpointattrib(0, "v", new_point, @v); } } else{ @v = {0, 1, 0}; @Cd = {1, 0, 0}; } Hope this helps!
  4. "Banding" effect on pop sim

    Here's a solution that keeps the effect looking very similar but removes your problem. It basically does the same thing as minpos but without actually using the source geometry so there aren't any polygons to worry about. It wouldn't work for any source geometry that wasn't a sphere + noise but it does work here. orbsOdForceVOP.hipnc
  5. Universal gravitation simulation

    Sebastian Lague's stuff is really cool - you have great taste. His code can be translated pretty much directly into VEX; sqrMagnitude becomes length2(), normalized becomes normalize(), and the equivalent of timeStep is the @TimeInc attribute. The key part is putting it inside a solver so the positions are updated each frame, based on their positions from the previous frame. Here's my attempt: (I'll post the file if you're still having trouble but it's a bit messy)
  6. Constraints broken in Houdini 18.0.532

    Promote the 'name' attribute from primitive to point after packing and the constraint will work.
  7. Even shorter version: @P = lerp(@P, @opinput1_P, ch("mix"));
  8. uvtexture camera preojection

    Seems like your geometry just needs more divisions. Here's the UVs from your original scene file: They look really distorted here. If the divisions on the larger box and the tube are increased, that distortion goes away:
  9. This seems to be a problem with the normals. If you add normals to the points with a normal or polyframe node before the copy to points they won't jump.
  10. If you don't need any of the other functionality of the attribute transfer node, it would be faster to use a wrangle: @P = @opinput1_P; (line into input 0, edit into input 1)
  11. Can I use the CHOP nodes to deform a line?

    This is a good introduction to CHOPs, maybe it can help: https://www.tokeru.com/cgwiki/index.php?title=HoudiniChops
  12. Add AOVs to ROP

    Use the insertMultiParmInstance() function on the AOVs parameter
  13. Procedurally split faces

    There's probably loads of ways to do this, but here's one: split_polys.hipnc
  14. In the volume wrangle you need to specify that 'h' is a vector by using 'v@h' rather than just '@h'. VEX assumes everything is a float unless told otherwise, or if it is one of a few specific attributes like Cd. This page has some helpful info on attributes in VEX https://www.sidefx.com/docs/houdini/vex/snippets#attributes
  15. Vellum Solver is deleting Cd point values?

    There isn't an attribute randomize in this scene file. Are you sure you attached the right version? Anyway it seems to work fine if I add one, directly after the scatter node.
×