Jump to content

f1480187

Members
  • Content count

    712
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    49

f1480187 last won the day on January 21

f1480187 had the most liked content!

Community Reputation

542 Excellent

About f1480187

  • Rank
    Houdini Master

Personal Information

  • Name
    F1

Recent Profile Visitors

2,860 profile views
  1. 1. dihedral(). Be careful with opposite vectors. There are infinite number of rotations between +x and -x vectors. It will choose one arbitrarily. Which may result in the issues like in the picture posted. 2. Possible fix, without using quaternions and matrices: sweep_sections.hipnc
  2. I would render the underlying mesh as a matte object. The surface will naturally cull geometry behind it. Nice way to render wireframes. If you want to do it in SOPs, I would stick to the Ray node method. Delete-by-normal method doesn't really cull things. It works properly in the file you posted. Here is VEX version of initial idea (identical to just using the Ray, though): // Point wrangle. vector camP = point(1, "P", 0); vector dir = normalize(camP - @P); float bias = 0.01; // Error margin to avoid self-occlusions. // Get all intersections along the ray. vector hit_ps[]; int hits = intersect_all(2, @P, dir * 100, hit_ps, {}, {}); if (hits && distance(@P, hit_ps[-1]) > bias) { // Occluded by some surface. removepoint(0, @ptnum); } vex_cull_curves.hipnc
  3. Get point near the mouse cursor

    If the origin is a proper 3D point with depth already accounted for, this should be relatively easy: origin = (1, 1.2, 0) op = hou.pwd().inputs()[0].path() expr = 'nearpoint("{}", {}, {}, {})'.format(op, *origin) pt = int(hou.hscriptExpression(expr))
  4. How to import obj with python?

    node = hou.pwd() geo = node.geometry() geo1 = hou.Geometry() geo1.loadFromFile('$HIP/geo/geo1.obj') geo2 = hou.Geometry() geo2.loadFromFile('$HIP/geo/geo2.obj') geo.merge(geo1) geo.merge(geo2)
  5. VEX: for i

    You need to do it in different way, like this: float accum = 0; for (int i = 0; i < @numpt; i++) { float val = point(0, "value", i); accum += val; setpointattrib(0, "value", i, accum); } Input doesn't changed during the code execution, we can't change and retrieve changed attribute values within same wrangle using geometry functions. If you set input point #1 @value from 1.0 to 2.0, when you query input point #1 value again using point() function, you still get unchanged value of 1.0. If you operate on points/vertices/primitives, you can use @-bindings, they are ordinary variables internally, and will work. // Point Wrangle. // Works. @foo = 5.0; @foo = @foo * 2.0; // Doesn't work. setpointattrib(0, "bar", @ptnum, 5.0); setpointattrib(0, "bar", @ptnum, float(point(0, "bar", @ptnum)) * 2.0);
  6. VEX attribute not updating?

    It's just not working that way in Houdini 16.5. First argument of all geometry functions is an input geometry, not the current one. By setting attributes you only pending value changes after the VEX code is executed, as far as I know. Common way is to use a pipeline of small wrangles. Other way is to use an array to store intermediate values, then add a small loop at the end of the code where you finally set values for geometry entities.
  7. boolian problem

    To defend Clip, you can still use the old trick with deformed input and rest position: clip_sop_ad.hipnc
  8. Noise never decreasing in VEX

    Something over time = Solver SOP.
  9. Groups problem

    In Group Expression node: length(getbbox_size(0)) > 1.2 This is VEX node. 0 is input number (counting from zero) getbbox_size() returns vector {SIZEX, SIZEY, SIZEZ} length() expects vector instead of three floats. Alternatively, drop older asset node like Voronoi Fracture and copy old Group node from there.
  10. VEX on Copy To Points

    Found lazy hack using two Add nodes. lazy_phyllotaxis.hipnc
  11. Constraints used to hold simulation pieces together. For Bullet sim you can model simplified simulation geometry out of watertight convex shapes and use glue to make it solid concave object again. convex_glue.hipnc
  12. Houdini icons

    Open /icons/ page in the local help (http://127.0.0.1:port/icons/). Wait until everything is generated. Browse icons you need or save the whole page to get 2300+ .svg icons in saved page contents directory.
  13. VEX on Copy To Points

    Boxes got copied on template points based on their attributes. In case of missing attributes, Houdini will guess typical ones. There is more of them described by the link, those three are common.
  14. VEX on Copy To Points

    Both wrangles work in same manner affecting the grid, from which final orientations computed. "Rotate" leads to orientations aligned to the rotated grid, "sine" leads to straightened ones because of low res grid with symmetric slopes. "When I add v@N; v@up; p@orient; in Wrangle, cubes no longer rotates". For example, if you declare @orient without actually setting it to some weird value, it will be defaulted to {0, 0, 0, 1}, which is "no rotation". If you customize normals, then copies will rotate. Really depends on what you actually did.
  15. VEX on Copy To Points

    When you add some transform attributes, it stops guessing them. Therefore no rotation, if the attribute values didn't describe any rotation. Sine wrangle does affect boxes, but the grid resolution is too low, and automatic orientations will be quite straightened, point normals can give you a hint on this. Corner cubes still rotated though. Actually, for those who interested, there is pseudo-code section in the linked help page (again) with some info on how it works internally, guessing defaults and using inputs: Key: X = pivot matrix (translate by -pivot) O = orient matrix S = scale matrix (scale * pscale) L = alignment matrix (*) R = rot matrix T = trans matrix (trans + P) M = transform matrix (*) The alignment matrix (L) is defined by N or v and up. IF N exists AND up exists and isn't {0,0,0}: L = mlookatup(N,0,up) ELSE IF N exists: L = dihedral({0,0,1},N) ELSE IF v exists AND up exists and isn't {0,0,0}: L = mlookatup(v,0,up) ELSE IF v exists: L = dihedral({0,0,1},v) IF transform exists: Transform = X*M*T ELSE IF orient exists: Transform = X*S*(O*R)*T ELSE: Transform = X*S*L*R*T
×