Jump to content
[[Template core/front/profile/profileHeader is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

berniebernie last won the day on February 4

berniebernie had the most liked content!

Community Reputation

7 Neutral

About berniebernie

  • Rank

Contact Methods

  • Website URL

Personal Information

  • Name
  • Location

Recent Profile Visitors

1,825 profile views
  1. Is it possible per-pieces scaling?

    if it's packed you can use the (nasty?) node 'primitive' which I guess is a blackbox node that does a foreach on each prim
  2. process on unpacking point primitives after a RBD sim ?

    Turns out I was running a for loop on points and not primitives, and had a name problem where the Dopnet got rid of my name attribute. After a bit of object path wrangling now it works. I haven't tried the compiled blocks but it doesn't seem to be a bottleneck. Keeping this here if I ever run into the problem again. In the wrangle @P = point(1,"P",@ptnum); matrix3 t = primintrinsic(1,"transform",@primnum); setprimintrinsic(0,"transform",@primnum,t,"set"); vector pivot = primintrinsic(1,"pivot",@primnum); setprimintrinsic(0,"pivot",@primnum,pivot,"set");
  3. process on unpacking point primitives after a RBD sim ?

    I only have 3 hirez objects (that were never scattered, only their low rez representation was), so when I feed it to the transform pieces, I only get these 3 pieces with the wrong pivots: I understand that I need a foreach to grab the geo (and it's probably compilable so fast) but I don't understand why the pivots/rotation go to shit. I'll experiment today and get back if I find a solution. Thanks
  4. Hello I'm doing a RBD (bullet) sim with custom concave geo (proxies) that I pack my self using assemble. I use a scatter and copy to points to set up my inital state, run the sim. I use a dopimport, and I would like to fetch the hi rez geo. Tutorials show that if I had the high rez geo scattered the same way I could plug it and it would work straight away. However I would like, with only my points, to retrieve the high rez geo. I thought I would use a foreach and apply primintrinsics or transformpieces or even a copytopoints as seen in some tutorials like here but nothign works, my scales and pivots don't seem to work. To give you an idea of what my network looks like before the dopnet: I cross posted on Sidefx forums but it wasn't published sorry for the crosspost. If you have any info on this I'm very interested.
  5. NetworkImage

    For anyone who googles out there I made a tool that I think matches what Julien wanted to do: https://berniebernie.fr/wiki/Houdini_Python#screenshot_to_background_image Code as of 22/07/2019 if my website goes down: import hou import os import subprocess import nodegraphutils as utils from time import gmtime, strftime widthRatio = 4 # change to make screenshot bigger or smaller, this is ~x4 node width def takeScreenShot(savePath): '''change to your preferred capture app /!\ no error checking for now ''' subprocess.check_call([r"C:\Users\me\MiniCap.exe","-captureregselect","-save",savePath,"-exit"]) def removeBackgroundImage(**kwargs): ''' erases bg image from tuples of backgroundImages() if it can find it, updates bg ''' deletingNode = [x[1] for x in kwargs.items()][0] image = deletingNode.parm('houdinipath').eval() editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) backgroundImagesDic = editor.backgroundImages() backgroundImagesDic = tuple(x for x in backgroundImagesDic if x.path() != image) editor.setBackgroundImages(backgroundImagesDic) utils.saveBackgroundImages(editor.pwd(), backgroundImagesDic) def changeBackgroundImageBrightness(event_type,**kwargs): ''' changes brightness/visibility if template or bypass flags are checked -- its poorly written/thought but i was tired''' nullNode = [x[1] for x in kwargs.items()][0] image = nullNode.parm('houdinipath').eval() brightness = 1.0 if nullNode.isBypassed(): brightness = 0.0 elif nullNode.isTemplateFlagSet(): brightness = 0.5 editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) backgroundImagesDic = editor.backgroundImages() i = 0 for item in backgroundImagesDic: if item.path() == image: backgroundImagesDic[i].setBrightness(brightness) break i = i + 1 editor.setBackgroundImages(backgroundImagesDic) utils.saveBackgroundImages(editor.pwd(), backgroundImagesDic) #generate unique(ish) path for screenshot timestamp = strftime('%Y%m%d_%H%M%S', gmtime()) hipname = str(hou.getenv('HIPNAME')) hippath = str(hou.getenv('HIP')) + '/screenshots' screenshotName = hipname + '.' + timestamp + '.png' systempath = hippath + '\\' + screenshotName houdinipath = '$HIP/screenshots/'+screenshotName #take screenshot with capture region takeScreenShot(systempath) #set up background image plane editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) image = hou.NetworkImage() image.setPath(houdinipath) sel = hou.selectedNodes() nullNode = '' if sel: lastSel = sel[-1] nullNode = lastSel.parent().createNode('null','screenshot') if lastSel.outputConnections(): nullNode.setInput(0,lastSel) else: nullNode = editor.pwd().createNode('null','screenshot') nullNode.moveToGoodPosition() lastSel = nullNode #configure image plane placement nullNode.setUserData('nodeshape','task') nullNode.setPosition(lastSel.position()) nullNode.setColor(hou.Color(.3,.3,.3)) nullNode.move([lastSel.size()[0]*2,-lastSel.size()[1]*2]) rez = hou.imageResolution(systempath) ratio = 1.0*rez[1]/rez[0] rect = hou.BoundingRect(0,-lastSel.size()[1]*1.1,widthRatio,-widthRatio*ratio-lastSel.size()[1]*1.1) image.setRelativeToPath(nullNode.path()) image.setRect(rect) #following is adding a spare parm with image path to be able to know which node corresponds to which background image #could have used a user attribute or relativeToPath() and smarter logic but it works and it helps me visualize filepath hou_parm_template_group = hou.ParmTemplateGroup() hou_parm_template = hou.LabelParmTemplate("houdinipath", "Label", column_labels=(['\\'+houdinipath])) hou_parm_template.hideLabel(True) hou_parm_template_group.append(hou_parm_template) nullNode.setParmTemplateGroup(hou_parm_template_group) #attach a function that deletes the background image plane if the corresponding node is deleted (faster than doing it by hand) nullNode.addEventCallback((hou.nodeEventType.BeingDeleted,), removeBackgroundImage) #attach a function to change visibility or opacity if corresponding node flags are changed nullNode.addEventCallback((hou.nodeEventType.FlagChanged,), changeBackgroundImageBrightness) #add image to network background backgroundImagesDic = editor.backgroundImages() backgroundImagesDic = backgroundImagesDic + (image,) editor.setBackgroundImages(backgroundImagesDic) utils.saveBackgroundImages(editor.pwd(), backgroundImagesDic)
  6. Drag&Drop Contents

    hello could you give a hand into making this pipeable ? as in keeping it on a server and having it served via houdini.env ? Not sure about the folder structure/ PYTHONPATH etc I'm trying to keep things clean but not super familiar with the whole pipe'
  7. NetworkImage

    Sent a RFE and it's normal behaviour, if anyone googles the problem: (i hope it's ok to post this. they are super responsive!)
  8. NetworkImage

    Afaik when you add a background image via their snippet, the .userDataDict() of the node is not being registered/saved (you can try adding a network bg image by hand and calling hou.node('/obj/mynode/').userDataDict() You'll get something like: {'___Version___': '16.0.736', 'backgroundimages': '[{"relativetopath": "volumevisualization24", "path": "/path/to/image.png", "rect": [-202.1, -265.1, 60.2, -85.3], "brightness": 0.54}]'} Pretty sure this is a bug not a feature. Adding these values to the userDict works but if you screw up the formatting you can corrupt a node and houdini doesn't like it.
  9. So if anyone is reading this wanting to bump from H15 to H16 and your tools don't work, it might be because like me, even though your shelf has a name, it's being stored in another shelf (namely default) if you copy default as well as your shelf it works
  10. Is AMD potentially risky? (Threadripper)

    can you expand on the topic ?
  11. Invisible RBD collider

    Display and simulation are two different things. Using shelf tools to build your scene and bullet for physics all you need to do is check 'convex hull' to make sure it bounces inside the sphere collide inside sphere.hip
  12. Hello, we built an asset to cache and version our sims/caches I extended it to be able to use the renderfarm to sim things out. To do this I added a ROP in the asset, with the HQueue simulation node. I then use the topmost interface/parameters to 'click' on the 'Submit Job' button on that HQueue Simulation node down below. However, unless I do a 'allow editing of contents' on my HDA, it fails on the farm with the following code: ......................... ImportError: No module named sgtk Traceback (most recent call last): File "/our-hou-path/scripts/hqueue/hq_run_sim_without_slices.py", line 4, in <module> hqlib.callFunctionWithHQParms(hqlib.runSimulationWithoutSlices) File "/our-hou-path/linux/houdini/scripts/hqueue/hqlib.py", line 1862, in callFunctionWithHQParms return function(**kwargs) File "/our-hou-path/linux/houdini/scripts/hqueue/hqlib.py", line 1575, in runSimulationWithoutSlices alf_prog_parm.set(1) File "/hou-shared-path/shared/houdini_distros/hfs.linux-x86_64/houdini/python2.7libs/hou.py", line 34294, in set return _hou.Parm_set(*args) hou.PermissionError: Failed to modify node or parameter because of a permission error. Possible causes include locked assets, takes, product permissions or user specified permissions It seems that unless I don't unlock the asset, the submit job can't be clicked. Here's how i linked the interface button to the submit button Thanks for your input.
  13. Hello I need to deactivate a passive collider at some point in my sim, and I can't figure out a simple way to deactivate it. I've tried groups, affectors, 'active value'. It's probably a simple fix, but the only 'hack' that I've found is to use a merge under my static object (merge with a null) and keyframe its activation between 1 and 0 Thanks in advance Bernie
  14. synchronizing two mplay (flipbook) sessions

    Thanks ! It seems to be the right way, but despite changing the session names or trying other flags, I am unable to load dynamically load (ie flipbook from my camera) my first take in viewport 1, second in viewport 2 (to compare animation) etc... I've read the docs on http://archive.sidefx.com/docs/houdini15.0/mplay/mplay_multiple_viewports but I'm still struggling
  15. Hello Odforce Is it possible to link two mplay sessions so I can have a side by side comparison of my animations ? If I have the same frame count and get lucky pressing play it works, but it doesn't really work everytime. Thanks!