Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


markinglevfx last won the day on January 25 2021

markinglevfx had the most liked content!

1 Follower

Contact Methods

  • Website URL

Personal Information

  • Name
  • Location
    New York

Recent Profile Visitors

2,447 profile views

markinglevfx's Achievements


Newbie (1/14)



  1. Use the SOP solver and a point VOP/wrangle to sample a vel field at each point's position. You can then add that vector to P to get the next frame's position. advect_in_SOPS_v001.hip
  2. You could perhaps do this with chops to get the springy motion you're looking for. Attaching an example chop_srping.hip
  3. Thanks Alex. I needed to look at node.addEventCallback further. I was able to have the node color update after any parameter changes, node name changes, or scene frame number changes. ####OnCreated#### import os import hou def nodeColor(node): filepath = node.evalParm("file") if(os.path.exists(filepath)): node.setColor(hou.Color((0.0, 0.8, 0.0))) node.setComment(filepath) node.setGenericFlag(hou.nodeFlag.DisplayComment,True) else: node.setColor(hou.Color((0.8, 0.0, 0.0))) node.setComment("File not found") node.setGenericFlag(hou.nodeFlag.DisplayComment,True) def parmChanged(node, event_type, parm_tuple): nodeColor(node) def nameChanged(node, event_type): nodeColor(node) def frameChanged(event_type, frame): hda = kwargs['node'] nodeColor(hda) hda = kwargs['node'] nodeColor(hda) hda.addEventCallback( (hou.nodeEventType.ParmTupleChanged, ), parmChanged) hda.addEventCallback( (hou.nodeEventType.NameChanged, ), nameChanged) hou.playbar.addEventCallback(frameChanged)
  4. Hey Guys, Still quite new to Python, hoping someone can help point me in the right direction on this that I've been grappling with for a while now. I have a simple filecache .hda that I'd like to change color if it can/can't find the cache on disk. I've been able to use hou.ui.addEventLoopCallback() to continuously track and check the file parameter to see if the cache exists, and the color changing now works as expected. Where I'm having trouble is removing the event loop when the .hda is deleted from the node graph. An error pops up because Houdini is still trying to access the deleted node. I've been trying to look for a way to use the OnDeleted event handler, or hou.nodeEventType.BeingDeleted, but no luck yet and I feel out of my depth with my limited python experience. The .hda is attached, and there's a preview of the code below. Any help would be appreciated! custom_filecache.hda ####PythonModule#### import os import hou def nodeColor(kwargs): node = kwargs["node"] def colorCallback(): filepath = node.evalParm("file") if(os.path.exists(filepath)): node.setColor(hou.Color((0.0, 0.8, 0.0))) node.setComment(filepath) node.setGenericFlag(hou.nodeFlag.DisplayComment,True) else: node.setColor(hou.Color((0.8, 0.0, 0.0))) node.setComment("File not found") node.setGenericFlag(hou.nodeFlag.DisplayComment,True) startCallback(colorCallback) #adding this code below crashes Houdini when hda is deleted #node.addEventCallback([hou.nodeEventType.BeingDeleted], endCallback(colorCallback)) def startCallback(callback): hou.ui.addEventLoopCallback(callback) def endCallback(callback): hou.ui.removeEventLoopCallback(callback) ####OnCreated#### kwargs["node"].hdaModule().nodeColor(kwargs)
  5. You can set the default operation to set always on the sopscalarfield1 node which sources the goal field from sops. At the moment it’s set to set initial, which doesn’t reevaluate the sop geo on each frame. Having it on set always ensures that the sop geo is sourced on every frame/substep. With the above applied you simply add animation to your goal geo in sops and voila!
  6. Makes sense! Should've realized I needed to use @instance instead of @instancefile. With the \$HIP slash no slash, I was trying to get the $HIP to evaluate at render time. So having @instancefile = $HIP/rs_proxy/teapot.0001.rs and not @instancefile = M:/_Work/_Personal/sandbox/rs_proxy_relative/rs_proxy/teapot.0001.rs. But this is the wrong approach, for anyone wondering. Either using @instance, or the instance geo node with a .rs proxy object as its instance object would be the correct way to do local instancing. I also looked at exporting a packed prim to the .rs proxy, but it didn't seem to affect the render times. File attached. Also renders of instancing teapots on 6m points, using point attributes to drive color, orientation etc. rs_proxy_relative_v003.hip
  7. Hey guys, I need to send a large point cloud which instances geo to the cloud to render. The problem I'm having is the instancefile attribute is absolute, and once the project is uploaded to the cloud render environment the path is no longer relevant/correct. Redshift does not seem to expand strings at render time, so $HIP or $JOB do not get evaluated afaik. I've also tried setting the path to a node within the .hip file. For example, this will work: M:/_Work/_Personal/sandbox/rs_proxy_relative/rs_proxy/teapot.0001.rs But this will not: \$HIP/rs_proxy/teapot.0001.rs Nor will this: /obj/teapot_rs/OUT/ I've attached a super simple setup where I get instancing working using an absolute path (it references the output of the RS Proxy Output SOP). Is there any way to get Redshift to to instance from a path that is relative to the project folder, or a node within the .hip file? Or has anyone had experience getting Redshift instances rendering on Gridmarkets? Thanks all! Note: I've also tried using the instance obj node (see v002 hip attachment). BUT the issue I run into with this is it maxes out my GPU's VRAM at render time, whereas using an absolute path with instancefile renders just fine with the ~6m points I need to instance on. rs_proxy_relative_v001.hip rs_proxy_relative_v002.hip
  8. I did have 'str' set as a variable elsewhere in the code. But even after I got rid of it, the error persisted. But I have managed to get it working now. I solved it by making a new Python SOP and using the same code - initially I was copy/pasting lines and seeing where it broke. Weird how I now have two python nodes side by side with the same inputs, the old one errors and the new one is fine.
  9. In the Python SOP, I've run into a wall trying to get an integer converted to a string. In the larger picture, I'm trying to subtract 1 from a value which is currently part of a string. There are probably neater ways to write these steps, but I'm fairly new to Python so I'm writing it all out to make things easier to follow. I start with a string such as: string = "f27" Then remove the 'f' like so: string = string[1:] Convert it to an integer: integer = int(string) Subtract 1 from the value: integer -= 1 set new string string_new = "f" + str(integer) The last line returns an error on the Python SOP: TypeError: str() object is not callable. This is confusing because these same steps work just fine in the Python shell. Is there an alternative to str(), or am I using it wrong?
  10. Converting your volume to VDB (class: SDF), followed by a VDB smooth and a convert to polys should do the trick pyro_to_poly_v001.hip
  11. I did a little breakdown of the replicating effect in a blog post - check it out if you like! There's a free .hip to download included. https://www.markinglevfx.com/post/replicating-coins-hip-breakdown
  12. A little experiment I like to nickname: 'Life as a VFX Artist'
  13. You can use this code in your switch. Currently you're using the loop iteration in the switch, but the point/loop order changes as new points come in so it's different each frame. By referencing each point's id attribute when selecting the object it instances you can keep them constant throughout. Hope it this makes sense. Adjust the max fit value (currently 1) to account for more instance objects fit01(rand(point("../foreach_begin1/", 0, "id", 0)), 0, 1)
  14. The vm_image_comment is on the mantra node by default so technically it belongs there. You have to render from the mantra node (not just flipbook) to display the comment.
  • Create New...