Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Everything posted by Sean-R

  1. [q] for each node

    You are pointing to the incorrect level, try: `point("../foreach_begin1", @ptnum, "pt_id1", 0)` and centroid("../foreach_begin1", D_X) centroid("../foreach_begin1", D_Y) centroid("../foreach_begin1", D_Z) Also, your foreach_begin Method needs to be set to "Fetch Piece or Point Thanks, Sean
  2. The each line produced from the findshortestpath SOP will be 1 single primitive. If you set the color node to Primitive and then random each line will a separate colour.
  3. Make breakable - Continous Fracture

    Hi Johannes, There doesn't seem to be an exact way (at least not that I can see). But there are a couple of parameters you can change to roughly achieve this: Minimum volume: Anything below this threshold wont fracture and you can calculate the fractured pieces volume in a wrangle. Points by area: By lowering this value you control the amount of fractures. Less fractures, the bigger the pieces. Maximum Fractures: Increase this number to keep fracturing the RBD object until all pieces have fractured to their smallest size. Hope this helps!
  4. enlarge size of pointnumber

    Hi Olly! Hit "D" in the viewport to bring up the Display Options, go to the Guide tab and you will see a parameter called "Guide Font" Thanks, Sean
  5. Particles not emitting along vector attribute ?

    You need to define your velocity. If you add the following line to your wrangle it will work: v@v = @N; You will also need to reset the Inherit attributes parameter back to "*"
  6. Vellum-popnet issue

    Hi Michal, I put an "*" in the Pin Points parameter to include all the points and set Pin Type to Soft. The pigs now follow the animation and interact with each other. issue_fixed.hipnc
  7. Have you tried fit($FF, 1, 600, 1, 100)
  8. Huh, strang. At least it sorted itself out!
  9. Looks like you're missing the constraint_type attribute. Try this in a primitive wrangle: s@constraint_type = "all";
  10. string array compare

    How are you referencing or isolating your primitive number? If you want to isolate the left shoe using the path, you can use @path=="leftShoe" in the group parameter of a blast node. In an if statement you could do something like this: if(s@path != "leftShoe"){ removepoint(0, @ptnum); } If you really want to go the string array route maybe the strmatch() function will help?
  11. Expression on PopDrag Error

    Are you trying to set the third element of windvelocity? If so, give this a try: if(@Time > 2.8){ windvelocity.z = -2; }
  12. subtracting centroid using vex

    Hi Matt, It looks like it's an order of operations thing. If you wrap @P2-@P in brackets it seems to work fine
  13. For Each Attribute Value

    Try a for-each point or for-each primitive depending on the attribute type, then enable "Piece Attribute"
  14. Simulation inside a loop

    You don't need to use a foreach. Look into wedging: http://www.sidefx.com/docs/houdini/nodes/out/wedge.html
  15. list of vertices

    To put the vertices in an array attribute: i[]@prim_vertices = primvertices(0, @primnum); You have to declare @prim _vertices as an array. You don't need the first line of your code, that would declare a variable. Unless that's what you want of course
  16. Read files through a loop

    The file merge SOP should do the job: http://www.sidefx.com/docs/houdini/nodes/sop/filemerge.html
  17. Attributes inside condition

    That should work, @NewVec should be visible in the geometry spreadsheet. To get it to write as a vector attribute you will need to put a v before the @.
  18. PackedObject scaling with time in DOP

    The Entagma guys have a nice solution for this:
  19. Set Point Pivot Rotate Primitive along Point Pivot

    The code in a wrangle is applied to each prim/point/whatever at the same time. In your code your say that only primitives with a primitive number of 0 and 4 can be white which isn't possible as it can only have one @primnum assigned, try replacing "&&" with "||". You will also need to initialise the @Cd attribute before the if statement, this should work: @Cd = 0; if(@primnum == 0 || @primnum == 4){ @Cd = 1; } If that's all that you are doing in the ForLoop, then I don't think you need it
  20. Set Point Pivot Rotate Primitive along Point Pivot

    Hey! So I think I get what you mean. I used the @vrtList that you created to get the first and second vertices of each prim, blended the positions to get the midpoint and then created a point at that halfway position. I've attached an updated version of your scene with the following code: i[]@vrtList = primvertices(0,@primnum); int vp1 = vertexpoint(0, @vrtList[0]); int vp2 = vertexpoint(0, @vrtList[1]); vector midpoint = lerp(point(0, "P", vp1), point(0, "P", vp2), 0.5); addpoint(0, midpoint); If you're using this as a pivot for the primitive you don't need to create a point, just bind the lerp expression to an attribute to reference in the primitive SOP. To see the vertex numbers in the viewport, hit D to bring up the Display settings and select Numbers from the Vertex checkbox list. I'm not sure why you need the Foreach network, especially set to Count. What are you trying to achieve? halbetweenpoint_b_v2.hipnc
  21. Set Point Pivot Rotate Primitive along Point Pivot

    You shouldn't need to create a point, this code will create a pivot attribute in the place that you want it: //Get all points in a primitive and put into an array int foo[] = primpoints(0, @primnum); //Get the average position of the first and second point in the foo array v@pvt = lerp(point(0, "P", foo[0]), point(0, "P", foo[1]), 0.5); In a Primitive Sop you can call the @pvt attribute using the prim expression. The expression in the pivot would look like this: prim(0, @primnum, "pvt", 0) You will need to change the last value to match with each parameter. So x = 0, y = 1 and z = 2. This probably wont rotate the primitives how you want though, check out this section of Matt Estela's website: http://www.tokeru.com/cgwiki/index.php?title=HoudiniVex#Rotate_prims_around_an_edge I can't check your file at the moment as I'm at work but I can look at it tonight
  22. repeat length animation

    You could use the particles age and life attributes and write them into a scale attribute in a wrangle like so: // Normalize the age by dividing it with the life attribute, this will give a value between zero and one float nage = @age/@life; //Because nage is a float variable it will be copied three times in the vector scale attribute v@scale = nage; Then plug this into a copy sop with your line geo at the maximum length you want.
  23. Remove Primitive by Sphere

    Yes! I've fixed the code
  24. Remove Primitive by Sphere

    This should work: // Get distance of primitive to point position of second input, Sphere is plugged in to second input // float dist = distance(@P, point(1, "P", 0)); // Get radius of sphere, I made a relative reference to the spheres scale in the radius parameter that is created // float rad = chf("radius"); // If the primitive is inside the sphere, delete// if(dist<=rad){ removeprim(0, @primnum, 1); }
  25. Slow down particles ?

    Do you mean the playback is too fast? There's a clock icon on the timeline bar which needs to be enabled to play back in realtime. Otherwise, if you need to slow the sim down you can use a timewarp node,