Jump to content

julian johnson

  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


julian johnson last won the day on January 27

julian johnson had the most liked content!

Community Reputation

37 Excellent

1 Follower

About julian johnson

  • Rank

Personal Information

  • Name
  • Location

Recent Profile Visitors

661 profile views
  1. Realised I'd attached the springs to the upper wishbone instead of the main chassis!. Updated gif and hipnc attached@: suspension10.hipnc
  2. @vicvvsh - very nice and elegant! Here's a different approach using a simple double wishbone setup using cone twist constraints (primarily). No idea how accurate or robust it is but it seems to be a starting point for some fun: Inspired by this: https://www.youtube.com/watch?v=GW__Gzkk4G0 (4.53 is where this setup is described) suspension9.hipnc
  3. Random pop bounce direction

    I thought I'd try looking inside the Pop Solver itself to see where it constructs the collision normal. Couldn't find any method to modify it on the fly. In doing that I started messing around with the mass of nodes in there to see if I could bypass the whole collision response built into the Gas Integrator in the Pop Solver and do a simple one myself. Turns out you can do that but it is probably the opposite of a 'cleaner way' to do the original challenge. Matt's is by far the cleanest/most explicit way I could find. Anyway, scene attached is my attempt. It is only a single Pop Wrangle inside the Pop Solver and seems to work OK. Was interesting to see how granular you could go with the built in nodes and how many you could throw away(!). pop_rand_bounce_simple4.hipnc
  4. Point/SOP level parent-constraint

    http://www.sidefx.com/docs/houdini/vex/lang.html If you look under the heading 'Dot Operator' there's an explanation of the matrix dot syntax.
  5. Point/SOP level parent-constraint

    Not sure if this is what you need but it illustrates a simple way of doing a very rudimentary parent/child hierarchy in vex. The parent can have any number of children (including 1). (Done in 16.5.473). parent.hip
  6. Define a function in point wrangle

    // // VEX Code Generated by Houdini 16.5.268 // Date: Sun Jan 28 16:23:25 2018 // File: C:/Users/johnson/untitled // Node: /obj/geo1/attribwrangle2/attribvop1 // #ifndef VOP_OP #define VOP_OP #endif #ifndef VOP_CVEX #define VOP_CVEX #endif #pragma opname attribvop1 #pragma oplabel "Local Vop Code" #pragma opmininputs 1 #pragma opmaxinputs 1 #include <math.h> void _obj_geo1_attribwrangle2_attribvop1_snippet1(int _bound_test[]) { function int[] test() { int result[] = {1,2,3}; return result; }; _bound_test = test(); } cvex obj_geo1_attribwrangle2_attribvop1(export int test[] = {}) { // Code produced by: snippet1 _obj_geo1_attribwrangle2_attribvop1_snippet1(test); } Looks like a nested function when you expand the inner VOP node to VEX...
  7. Define a function in point wrangle

    I found this in the documentation: http://www.sidefx.com/docs/houdini/vex/arrays.html Not sure what a BNR is :-)
  8. Define a function in point wrangle

    function int[] test() { int result[] = {1,2,3}; return result; }; i[]@test = test(); I get syntax errors using the 'normal' array syntax in the documentation i.e. a simple int[] test(){}; but if you disambiguate using the 'function' syntax it seems to work..
  9. get UV on curve by arclen in VEX

    I think using primuvconvert() now that it has been fixed in 16.5.323 you can go one better in that primarclen() only worked on nurbs and bezier curves. Using primuvconvert() you can get an arclength from u for all curve types including polygonal curves AND you can use it to go in the other direction i.e. get a U value for a given arclength: //get arclength from u f@lenC = primuvconvert(@OpInput1, 1, 0, 8)[0]; //get U on curve using arclength f@u = primuvconvert(@OpInput1, @lenC, 0, 10)[0];
  10. Help with the Cube Man

    Again, I think this is probably too different to the setup you're working on but it's one way to scale and rotate the underlying polygons (which you can polyextrude into cubes later). For rotations you'd need to decide on the basis about which all transforms should take place. It was quicker to implement by using pack/unpack but I'm not sure that's the most efficient way.. cube man.hipnc
  11. Parenting at geometry level

    This is not particularly parametric, a template or procedural so probably useless! But here's a vex driven cube wrap using hierarchical matrices. Might be a little help... parenting_cube_example.hipnc
  12. Orient Along Organic Surface?

    vector bbox = relbbox(0, @P); int prim = point(0, "copynum", @ptnum); float height = sqrt(primintrinsic(1, "measuredarea", prim)); float range = ch("range"); float range_div2 = range * 0.5; float x = fit01(bbox.x, range, 1-range); float y = fit01(bbox.y, 0, 1); float z = fit01(bbox.z, range, 1-range); @P = primuv(1, "P", prim, set(x,z, 0) ); @P += prim_normal(1, prim, set(range_div2, range_div2, 0)) * y * (height * ch("mult_height")); @Atom if you fit between range and 1-range it scales from the centre.. @galagast didn't realise you'd already solved it!
  13. Orient Along Organic Surface?

    Really great, educational stuff on here - thanks to everyone for sharing. I've been trying to look at the flow problem on its own i.e. the fact that primuv is dependent on the winding order of the underlying poly and hence the direction of the fitted object is hard to control (without changing that winding order). Here's a scene that uses anim's (amazing) setup from the linked thread and some additional flowlines to try and conform the fitted geometry to a flow that snaps to the polygon directions. Some very, very coarse coding going on but with some more love (and optimisations) it might make for a nice hybrid. It's very slow at the moment probably because of the copy stamping! flow fit.hipnc
  14. Python beginner - selecting all nodes of specific type

    node_type = hou.objNodeTypeCategory().nodeTypes()['bone'] for x in node_type.instances(): print x Using instances() should give you the bone nodes in the scene..
  15. Dynamics on growing curves

    I think it's better to make the loops post sim and just offset and slide everything there. Here's a scene that shows how to do that. dynamic_tree_grow_help_03d.hipnc