Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Everything posted by jamesr

  1. MPlay Batch

    Hey everyone, if you're using MPlay to view and write out multiple flipbooked image sequences, you should check out MPlay Batch. It's a package that adds on an extra menu to MPlay that has options for quickly writing all the in-memory sequences to disk either as an image sequence, a video, or both! If you wind up giving it a try (or have any questions) please let me know what you think. Thanks!
  2. hscript imgsave how to use ?

    In case anyone else runs across this in the future, you need to escape the $F like so: imgsave -a "/tmp/test/test1.\$F.jpg" And if running from Python hou.hscript("imgsave -a "/tmp/test/test1.\$\F.jpg")
  3. PDG - Remove work item

    Not sure what you mean by attribute weirdness, but if you're finding that sometimes the python nodes aren't cooking how you want, try setting their evaluation to "generate" and see if it works better. This works fine if your graph doesn't need to be dynamic. Also, double check your attribute names. You're calling it "strAttrib" in the python script top, and "strAttr" in the attribute create. (Not sure if this is on purpose)
  4. PDG - Remove work item

    I've been playing with PDG for a little bit, and am by no means a wizard, but if you want to remove work items, you can try using the "Filter By Expression" TOP. Set the operation to "Remove Work Item". Not sure what exactly the filter node does behind the scenes, but it might actually be similar. In a Python Script TOP, you can use the handy shorthand syntax `@myattribute` or for strings "`@mystringattribute`" There is an equivalent in python expressions, but it's not as elegant (I could be missing something similar, but this has been working for me). It's basically just the long way you'd typically use in a Python Script TOP: pdg.workItem().stringAttribValue("myattribute") In the netbox I'm just faking the result of a file pattern top. I have 2 generic generators making work items that get assigned a file name. The left branch makes "file#.txt" and the right "file#_proxy.txt". They get merged together to emulate something like the result of a file pattern. The Filter by Expression top has the following for its Filter Expression: "proxy" in pdg.workItem().stringAttribValue("myfile") filter_by_expression.hip
  5. Give 2 names to a primitive

    If I am understanding your question correctly, you just need to use 2 different Primitive Groups.
  6. Hi link, please see the attached hip file. Hope it helps! Let me know if anything is unclear. speed_calc_jamesr.hipnc
  7. HOM from shell in macOS

    Hi there, Has anyone had any success with importing the hou module from python in a shell on macOS? I am currently running Mojave 10.14.1 with stock python 2.7.10 (fresh OS install) on my laptop, and have not been able to get it up and running. I found a couple of threads related to it from a few years ago suggesting it's not possible, but I sort of figured it would be mentioned in the docs that it's incompatible on macOS. So maybe I'm missing something? Python 2.7.10 (default, Aug 17 2018, 17:41:52) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import hou dyld: warning, LC_RPATH $ORIGIN/. in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libopenvdb_sesi.dylib being ignored in restricted program because it is a relative path dyld: warning, LC_RPATH $ORIGIN/. in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libopenvdb_sesi.dylib being ignored in restricted program because it is a relative path dyld: warning, LC_RPATH $ORIGIN/. in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libopenvdb_sesi.dylib being ignored in restricted program because it is a relative path dyld: warning, LC_RPATH $ORIGIN/. in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libopenvdb_sesi.dylib being ignored in restricted program because it is a relative path dyld: warning, LC_RPATH $ORIGIN/. in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libopenvdb_sesi.dylib being ignored in restricted program because it is a relative path dyld: warning, LC_RPATH $ORIGIN in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/./libblosc.1.dylib being ignored in restricted program because it is a relative path dyld: warning, LC_RPATH $ORIGIN in /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libblosc.dylib being ignored in restricted program because it is a relative path Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Applications/Houdini/Current/Frameworks/Houdini.framework/Versions/Current/Resources/houdini/python2.7libs/hou.py", line 19, in <module> import _hou ImportError: dlopen(/Applications/Houdini/Current/Frameworks/Houdini.framework/Versions/Current/Resources/houdini/python2.7libs/_hou.so, 2): Library not loaded: /Users/prisms/builder-new/WeeklyDevToolsHEAD/dev_tools/local/lib/libz.1.dylib Referenced from: /Applications/Houdini/Houdini17.0.352/Frameworks/Houdini.framework/Versions/Current/Libraries/libAlembic_sidefx.1.7.9.dylib Reason: image not found According to the docs, you need to import DLFCN sys.setdlopenflags(old_dlopen_flags | DLFCN.RTLD_GLOBAL) But there is no DLFCN module for macOS. Python docs suggest generating DLFCN if it's not available, though /usr/include does not exist. I'm not really familiar with these dl related commands. I found this link and tried to just manually replace DLFCN.RTLD_GLOBAL to -1, which got rid of a lot of errors except Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Applications/Houdini/Current/Frameworks/Houdini.framework/Versions/Current/Resources/houdini/python2.7libs/hou.py", line 19, in <module> import _hou ImportError: image not already loaded I also tried the otool steps here which did not seem to change anything. Not really sure where to go from here. Thanks!!
  8. Thank you, this is very useful!
  9. Using instances() with hou.nodeType() to grab node instances is really nice. Does anyone know a way to grab all the instances for an operator type with a version string in the operator type name? ie. jamesr::myasset::2.00 Since the version is in the type name itself, it seems like you have to specify the version as well in order for it to work, ie hou.nodeType("jamesr::Object/myasset::2.00") instead of just hou.nodeType("jamesr::Object/myasset") I was hoping there must be, since you can create nodes without specifying the version like hou.node("/obj").createNode("jamesr::myasset") I've tried using hou.preferredNodeType(), but it still seems to required the version string as well. When testing it on a builtin node who has multiple definitions including a version string like "rainbow" with hou.preferredNodeType("Vop/rainbow") it works fine. I could always use a [x for x in hou.node("/obj").children() if "jamesr::myasset" in x.type().name()] type of thing, or get the node type from an existing node, but I was just wondering if it is possible this way. If anyone has any relevant posts I might have missed that I could check out, that would be great too. Thanks!
  10. Here's an example to go along, if it helps. prim_l_x_w.hip
  11. Does anyone know of a hotkey/option to mirror a component selection on a symmetrical mesh? I've found myself selecting stuff in the viewport quite a bit the last few days, but can't seem to find anything. Edit: I had forgotten about Attribute Mirror SOP, which is pretty useful for what I'm after, however if someone knows an answer to the above question that'd be cool too.
  12. Grains and constraints not visible ?

    Because vellum configure grains hda does not create constraints between particles
  13. Opacity from Attribute Transfer

    There's a few ways to do this. Here is a simple one using a SOP Solver in the AutoDopNetwork. This way allows a nice fade in/out over time by accumulating a value into an attribute called "illume". The disadvantage of doing the fading like this in a SOP solver is that you need to sim each time you want to adjust the fading. Alternatively, you could also store the frame where the sphere first contacts or has enough influence on a particle, and then post-sim use that to control fading on/off. Changed/added nodes in gold. ParticlesTest_v032_jamesr1.hip ParticlesTest_v032_jamesr2.hip
  14. popdrag - slower particle in selected radius

    Sure. In your note you say "by bouncing from the surface" you mean act like a normal collider, just inside right? Like have the particles bounce around the inside? That's how I read it. Added/changed nodes are in gold. pop_inside_issue_jamesr.hip
  15. Can't Get Rid of Particle Stepping

    Whenever you're running into issues like this, it helps to throw down a Timeshift SOP, uncheck "integer frames", and break the connection in the "Frame" parameter. Use the ladder to scrub forward/back in like 0.1 increments. If the source moves smoothly no matter how granular the unit which which you're scrubbing is, you should be good. When you're simulating and you're caching to RAM, houdini has everything it needs to access subframe data (which is why you're seeing correct results when you don't cache your source). When you cache to disk, by default it saves on whole frames. When the cache is read back in, you only have access to what was written to disk, so when you're running a particle sim with say 5 substeps, and houdini looks up frame 1001.2 of the incoming source, there won't be anything there. The Time Blend SOP will interpolate between frames for you. In most cases, it is necessary to have an i@id attribute on your points, since especially for particle simulations the point count may not be stable, and the Time Blend SOP won't work correctly. Unless there is significant motion in between whole frames, it's not necessarily required to write substeps to disk.
  16. pop replicate 1st vs 2nd input

    The second input is "Reference Stream". You will notice a difference if you are merging the replicated points back in. In the left input, there will be double what you expect With it in the right input, the points will be replicated based on the input, but when you merge them back in there will be the correct amount. Check this example, I think it will help. popreplicate_second_input.hip
  17. popdrag - slower particle in selected radius

    Hi, your issue is in the pop drag node. You have "@falloff" in the activation slider, which is deactivating the whole node, because that expression isn't valid for that parameter. Think of activation as like a "global" parameter for the node. It can't be changed per particle, it's either on or off. Instead, you should leave Activation to 1 and use "VEXpressions" to multiply the drag (airresist) by your custom attribute. Also, you have "0.798" as the point number for your distance lookup in the VOP where you set the f@falloff attribute. You should be careful that it is set to the correct point number. Nodes changed are in red. particles_issue_jamesr.hip
  18. Exporting Material Diffuse Animation

    You can use COPs for this
  19. SDF from density in Dops

    It'd be cool to hear from the source, but here's what I figured out fog_to_sdf_dops.hip
  20. And the demo file doesn't work?
  21. Are you using layer mixing in your material? Or are you just trying to write custom aovs?
  22. Split geometry to parts by proximity

    Could you just ray the target points that are on each target onto your source starting geometry and call those the starting points? Then you have the target attribute/group already on the points, and already once they are minpos'd onto the source geo, they will always be as close as they can be to that target.
  23. Split geometry to parts by proximity

    Hmmm if all you care about is distance to the target geometry, you should be able to just assign an integer attribute called like "target" or something, and use nearpoint() and point() to get the closest one. int pt_near = nearpoint(1, v@P); i@target = point(1, "target", pt_near); and do stuff to your particles from there. You could even make them into groups if you wanted string groupname = sprintf("target_%d", i@target); setpointgroup(0, groupname, i@ptnum, 1, "set"); Maybe I'm missing something? close_point_targets.hip
  24. Here's your same setup, only one line different. See inside the SOP solver. Also to see color better you should unpack. SOP Solver Problem_james2.hip
  25. Does this help? SOP Solver Problem_james.hip