Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Everything posted by MrScienceOfficer

  1. Dot Vector in Python ?

    Why would it match (and why would you need it to?), your rounding to the .001th decimal place and testing for a tolerance to .00001th place.
  2. Dot Vector in Python ?

    def theLooper(curNode): for thePrim in curNode.geometry().prims(): primColor = thePrim.floatListAttribValue("Cd") rounded = tuple((round(total,3)) for total in primColor) print(thePrim.number()) print(primColor) print("Theese are the rounded numbers\n"+str(rounded)) #print(round(primColor,3)) dot = hou.Vector3(primColor).dot(hou.Vector3((rounded))) # closing parentheses was missing tolerance = 0.000001 if dot >= 1.0-tolerance and dot <=1.0+tolerance: print("match") else: print("no match") if curNode.geometry().findPrimAttrib("Cd"): print("yes") else: print("no") Python tends to throw a syntax error on the following line when a line doesn't complete it's statement i.e. parentheses block not closed.
  3. int primCount = detailintrinsic(concat("op:", opfullpath("../myInputedGeo")), "primitivecount"); // or just int primCount = detailintrinsic("op:../myInputedGeo", "primitivecount"); opfullpath is a VEX function (as well as an hscript function), your attempting to call the hscript version(by putting it in backticks), int primCount = detailintrinsic("op:`opfullpath("../myInputedGeo")`", "primitivecount"); either version should work though I recommend the VEX version as it's much easier to debug. Looking at your post again point #2 is correct and should work, unless I'm not seeing how it's different from my version (which works for me).
  4. defining normal direction with wrangles

    PolyFrame works well in this situation, just change the tangent to 'N'. A vex solution would look like if (@ptnum != npoints(0)-1) @N = @P - point(0, "P", @ptnum+1); else @N = point(0, "P", @ptnum-1) - @P; @N = normalize(@N); . This handles the case of the last point by inverting the vector towards the previous point.
  5. How to reset HOUDINI_DSO_PATH

    I looked at what your saying about exporting paths, I've never heard of that before. I don't believe what you did actually changed the paths in Houdini. Your path needs to be '/Users/gfx03/HDK/custom;&' you need add ';&' to tell houdini to keep searching for more paths. It's probably best to just edit the houdini.env file though.
  6. über slow

    Pinging forums.odforce.net [] with 32 bytes of data: Reply from bytes=32 time=49ms TTL=58 Reply from bytes=32 time=43ms TTL=58 Reply from bytes=32 time=41ms TTL=58 Reply from bytes=32 time=45ms TTL=58 Ping statistics for Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 41ms, Maximum = 49ms, Average = 44ms It taking about ten seconds to load a page.
  7. Dot Vector in Python ?

    I recommend posting an example file showing the issue like Bonsak suggested.
  8. Dot Vector in Python ?

    https://www.programiz.com/python-programming The section entitled "Few Important Things to Remember" at the end, briefly goes that. I recommend going through other tutorials I found here, https://wiki.python.org/moin/BeginnersGuide/Programmers
  9. Dot Vector in Python ?

    Outside of the formatting issue, it looks fine. Your error isn't related to that code(unless its related to the formatting issue)
  10. VEX Based Replace File Extension

    s@file = "thing/another/geom.001.rs"; s@file = concat(join(split(s@file, '.')[:-1],'.'), ".bgeo.sc"); note the added dot joining the split.
  11. Switching Views using python/hscript

    I think you can do it with the hou.ui module using the pane classes, last time I tried though(month or so ago) most of the pane functions crashed Houdini so I never really did much with it.
  12. über slow

    Pinging forums.odforce.net [] with 32 bytes of data: Reply from bytes=32 time=41ms TTL=58 Reply from bytes=32 time=41ms TTL=58 Reply from bytes=32 time=40ms TTL=58 Reply from bytes=32 time=43ms TTL=58 Ping statistics for Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 40ms, Maximum = 43ms, Average = 41ms The last few days it's been intermittently slow, sometimes taking 3-5 whole seconds to load a page, normally it's instantaneous, quite a jarring experience . Seems to be better today, still a tad slow though.
  13. VEX Based Replace File Extension

    Why not s@file = "thing/another/geom.rs"; s@file = concat(join(split(s@file, '.')[:-1],''), ".bgeo.sc"); ?
  14. Wire capture, controlling width per point?

    I think you would need to go through all the curves in a for loop and drive the widths by pushing the attributes through CHOPs, it sounds a bit convoluted, and I imagine there must be a simpler way. Using point deforms is another choice, but you can't, as far as I know, control the capture radius per point. A third option would be to generate bones from the curves and use the biharmonic capture SOP to bind it. This would likely result in the highest quality(and most expensive) results since it will use proper transforms to drive the tree, while the other methods work a bit differently and can have less stable results (under more extreme deformation). I think your best bet though, would be to post this on the SideFX forum as well there's a good chance some one out there has already solved this problem.
  15. Dot Vector in Python ?

    That code works for me, you need to post the error message.
  16. Python vs C

    Yes, VEX is a 'C like language' implemented in C, Python is also implemented in C. C is great to learn because most languages used in practice can be described and understood in terms of C where it sounds silly to describe C concepts in Python terms. Every function you call in Python or VEX ends up being a call(or many calls) to a C function. The differences between VEX and Python and C is pure semantics and implementation details(written in C). If one wishes to truly learn to program, the fastest route to true enlightenment is undoubtedly C/C++. The majority of concepts that you need to understand to use C, will allow you to become an efficient and skilled VEX/Python programmer. Languages like Python and VEX obscure concepts like memory management where C forces you to understand. All that said it's very unlikely you'll ever need to use C/C++ in Houdini. Now that we have compiled SOPs(which are extremely efficient due to how memory is managed), there are very very few valid use cases for using the HDK. The take away here should be, learn C, use Python and VEX.
  17. Wire capture, controlling width per point?

    Wirecapture uses a keyframes on the radius and lookup parm to drive the values by essentially hacking the animation editor instead of using a ramp parm, I think it's an outdated workflow. I wouldn't recommend using it. wire_capture.hiplc
  18. Another option would be to mirror your HDAs interface on a python node so when any parameter changes the node will be cooked.
  19. geometry node in python

    createNode takes the name of the node type, so for a geometry node it takes 'geo'. The name of node (compared to it's label) can be found by middle mouse clicking on a node instance, it's the name after the label,, in parenthesis.
  20. You can add a callback on the node. node.addEventCallback(hou.nodeEventType.ParmTupleChanged, call_func) I think that covers all parms, not just parmTuples but I'm not sure.
  21. What's up with the different editions of a GPU?

    https://www.amazon.com/dp/B01M5BQRIO/ref=psdc_284822_t1_B013WAL3AU?th=1 In my opinion it's a relatively simple issue, I'd go with the 1050Ti if I'm not interested in GPU simulations, it's way more then enough for rendering rather large scenes. Otherwise (if one did want the massive acceleration of GPU simulations) then the Titan Xp with 12 GB of memory is well worth it.
  22. You can find the compiler version on the daily builds download page, it's included in the name of the file used to install Houdini.
  23. Python read primitive attribute

    color = geo.addAttrib(hou.attribType.Prim, 'Color', hou.Vector3(0,0,0)) for prim in geo.prims() : v = hou.Vector3(prim.attribValue('Cd')) v *= 6 prim.setAttribValue('Color', v) This worked for me.
  24. Making Joints Follow Points

    As long as the number of bones is static, you can write a python script to set up parameter expressions to drive translation and rotation from the points. geo = sop_node.geometry() net = hou.node('/obj') # this needs to be sorted into lists of lists based on hiearachy bone_heirachy = hierachy_sort(geo.points()) def build_chain(bone_list, parent) : for bone in bone_list : if type(bone) == list : build_chain(bone, parent) ptnum = bone.point_number() bone = net.createNode('bone') bone.parm('tx').setExpression("point({0}, {1}, 'parent_t', 0)".format(sop_node.path(), ptnum)) bone.parm('ty').setExpression("point({0}, {1}, 'parent_t', 1)".format(sop_node.path(), ptnum)) bone.parm('tz').setExpression("point({0}, {1}, 'parent_t', 2)".format(sop_node.path(), ptnum)) bone.parm('rx').setExpression("point({0}, {1}, 'parent_euler_orient', 0)".format(sop_node.path(), ptnum)) bone.parm('ry').setExpression("point({0}, {1}, 'parent_euler_orient', 1)".format(sop_node.path(), ptnum)) bone.parm('rz').setExpression("point({0}, {1}, 'parent_euler_orient', 2)".format(sop_node.path(), ptnum)) if parent : bone.setNextInput(parent) parent = bone for bone_list in bone_heirachy : build_chain(bone_list) This is just psuedo-code going over how to set up something like that up. You can use a list of lists of point objects and other lists to describe the hierarchy(if need be). Then you need to create attributes that can be plugged into the parameters for the bones. The best practice in my opinion, is to use VEX to transform the P and orient attributes into relative position and euler angle form, so they can just be plugged directly into the parms.
  25. Hmm I'm wrong... I don't have a Mac available at the moment so I can't test it. If hcustom supplies -fobj-gc' then its most likely correct Are you using the same version of clang that Houdini was compiled with? I'm not sure how XCode versions relates to clang.