Found 222 posts.
Search results Show results as topic list.
Technical Discussion » Get all plugin data for every Houdini version?
- Jonathan de Blok
- 253 posts
- Offline
Not sure of it helps in this case but you can use if-statements in the package json and check again houdini mayor version number to only load/set certain things depending on houdini versions.
Technical Discussion » is there a way to smooth just the Y axis?
- Jonathan de Blok
- 253 posts
- Offline
put it in a for-loop with a little smoothing, reset x/z.. loop that an x number of times.
Or copy the Y to a separate attrib, use attribute blur on that and copy the smoothed attrib back to y.
Or copy the Y to a separate attrib, use attribute blur on that and copy the smoothed attrib back to y.
Technical Discussion » Need help with code
- Jonathan de Blok
- 253 posts
- Offline
For a nice shot based workflow I can highly recommend Prosequencer, by yours truly
https://jdbgraphics.nl/script/prosequencer-2-0-houdini/ [jdbgraphics.nl]
(lots af stuff added since I made the documentation but the principals are the same)
If you want to use takes you can assign takes to the shot tracks that become active when the shot becomes the active track. Although I find working with takes a bit convoluted.
You can also create groups that hide/show when a track is active, make mp4 previews or submit to deadline in a single click.
Each track also exposes alot of parms you can hook into.
https://jdbgraphics.nl/script/prosequencer-2-0-houdini/ [jdbgraphics.nl]
(lots af stuff added since I made the documentation but the principals are the same)
If you want to use takes you can assign takes to the shot tracks that become active when the shot becomes the active track. Although I find working with takes a bit convoluted.
You can also create groups that hide/show when a track is active, make mp4 previews or submit to deadline in a single click.
Each track also exposes alot of parms you can hook into.
Technical Discussion » Bake camera projection for 3D screen/Billboard
- Jonathan de Blok
- 253 posts
- Offline
Simply transfer the @P from the pre-bend original flat rectangle back into the bend one after projecting. That should give you a flat flat with the distorted UVs on it.
Technical Discussion » ViewerHandleInstall error message : know of any fixes?
- Jonathan de Blok
- 253 posts
- Offline
Went down the same rabbit hole.. fix is simple
If you go to you're HDA's type properties -> Interactive -> State Script tab you need to press the 'clear' button in the bottom right part uit the dialog. Else you'll have a state without code. I fell in this trap when I simply ctrl-a deleted some stateviewer code I was experimenting with instead of using the that clear button.
Before you do that, right click on your HDA node and check on 'edit extra section source code', you'll see some state related files that cause the error, after using the clear button those files should be gone.
And you'll first need to add/remove a new state and handle script. Just press the 'new' button and create something, save the HDA and then press the 'clear' button in both tabs. That should clean it up properly.
If you go to you're HDA's type properties -> Interactive -> State Script tab you need to press the 'clear' button in the bottom right part uit the dialog. Else you'll have a state without code. I fell in this trap when I simply ctrl-a deleted some stateviewer code I was experimenting with instead of using the that clear button.
Before you do that, right click on your HDA node and check on 'edit extra section source code', you'll see some state related files that cause the error, after using the clear button those files should be gone.
And you'll first need to add/remove a new state and handle script. Just press the 'new' button and create something, save the HDA and then press the 'clear' button in both tabs. That should clean it up properly.
Edited by Jonathan de Blok - 2023年11月15日 06:50:37
Houdini Lounge » Houdini 20 will be unveiled (not released) on October 26
- Jonathan de Blok
- 253 posts
- Offline
Anyone who complains about Houdini UI/UX should spend 5 minutes in 3dsMax and Unreal
One thing more users take for granted, as they should, is that the UI is technically quite sound. It's all based on Qt and from a developers point of view it's a very nice and easy way of creating UIs. A lot of the UIs are auto generated based on the parms and a few hints on basic layout. That sort of gives you consistency by default. The foundation is sound, that's important. And sure, what's actually in the users face can use a bit of glitter.
Compared to 3dsMax for example, where it's a mix of Qt, WPF, dotnet and what not is just a mess and it shows, it can take take 10..20 seconds to open the render dialog!
In Unreal on the other hand is technically quite good as well, but consistency wise it's all quite organically grown and all over the place.
So for me Houdini's UI 'problems' are mostly UX based and I can imagine it's a bit of a hurdle if you're starting out.
One thing more users take for granted, as they should, is that the UI is technically quite sound. It's all based on Qt and from a developers point of view it's a very nice and easy way of creating UIs. A lot of the UIs are auto generated based on the parms and a few hints on basic layout. That sort of gives you consistency by default. The foundation is sound, that's important. And sure, what's actually in the users face can use a bit of glitter.
Compared to 3dsMax for example, where it's a mix of Qt, WPF, dotnet and what not is just a mess and it shows, it can take take 10..20 seconds to open the render dialog!
In Unreal on the other hand is technically quite good as well, but consistency wise it's all quite organically grown and all over the place.
So for me Houdini's UI 'problems' are mostly UX based and I can imagine it's a bit of a hurdle if you're starting out.
Technical Discussion » How to get point position string?
- Jonathan de Blok
- 253 posts
- Offline
You can use also use a merge node inside the for-loop. If you set the loop up in feedback mode the merge will add a font output in each iteration.
Houdini Lounge » 3D Connextion space mouse with Houdini
- Jonathan de Blok
- 253 posts
- Offline
Siavash Tehrani
Thank you. I added spacenavigator.py. It then complained about missing pywinusb, so I installed it via pip, following Paul Ambrosiussen's handy tutorial here: https://youtu.be/cIEN50WuPoc?si=t-aXG4CZSOElqaBV [youtu.be]
The panel now loads without errors, however while the buttons on the spacemouse still work fine, no inputs from the puck seem to be detected.
My system had a modified version of spacenavigator.py to support the compact model, which is not in the original repo so that's why it didn't work. I've added support for all current 3dconnexion devices and added a package handler that, after asking permission, install missing python packages like spacenavigator and pywinusb on the fly.
( The buttons are being handled by the 3dconnexion driver but there are hooks in the panel's code to make your own handlers for this. For that you do need to disable the driver's button handlers by messing around with some of the relevant XML files in C:\Program Files\3Dconnexion\3DxWare\3DxWinCore\Cfg )
All in the SpaceMouse.pypanel from https://bitbucket.org/jcdeblok/jdb_houdinitoolkit/src/master/python_panels/ [bitbucket.org]
Edited by Jonathan de Blok - 2023年10月24日 07:58:52
Technical Discussion » hou.setAttribute from Shelf Toolbar
- Jonathan de Blok
- 253 posts
- Offline
someNode.geometry() is only writable from within a python sop, so that's why you're getting the permission errors.
So if you want to set an attribute from the shelf you'll need the shelf tool to insert a node into the network that does that.
So if you want to set an attribute from the shelf you'll need the shelf tool to insert a node into the network that does that.
Houdini Lounge » 3D Connextion space mouse with Houdini
- Jonathan de Blok
- 253 posts
- Offline
Siavash Tehrani
Thanks so much for sharing this Jonathan! I get the following error when trying to access the panel:There is an error in the SpaceMouse script.
Traceback (most recent call last):
File "C:/Users/hibbi/Documents/houdini19.5/python_panels/SpaceMouse.pypanel", line 18, in <module>
#
File "C:\Program Files\Side Effects Software\Houdini 19.5.773\python39\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'spacenavigator'
Ohh yeah, I forgot to include this 3th party python bit: https://github.com/johnhw/pyspacenavigator/blob/master/spacenavigator.py [github.com]
I guess you could place it in here:
C:\Program Files\Side Effects Software\Houdini 19.5.752\python39\lib\site-packages
But what I prefer to do it make separate folder for nondefault site-packages and add it to the PATH env variable so the imports will find it. That way things will stay intact when updating/changing Houdini versions. In my case it looks like this:
I see the 3th party code is MIT licensed so that gives me the option to just include it in the code and make it a single package, I'll look into that later, until then the above method should work.
Edited by Jonathan de Blok - 2023年10月22日 13:58:17
Houdini Lounge » 3D Connextion space mouse with Houdini
- Jonathan de Blok
- 253 posts
- Offline
ttiimmaaccJonathan de Blok
Working on this at the moment. Should give (technical) users full customization control since the raw data is simply exposed to python..
https://vimeo.com/manage/videos/777706928 [vimeo.com]
Did you end up finishing the script?
I polished it a bit so it's ready for basic use, had more plans for this to control objects etc but for now it's just viewport navigation. It does work for recording camera movement if you lock a camera to the view and enable autokey.
Anyways, You can grab the SpaceMouse panel from here:
https://bitbucket.org/jcdeblok/jdb_houdinitoolkit/src/master/python_panels/ [bitbucket.org]
Place the file in your '/Documents/houdini19.5/python_panels' or equivalent folder and you should be able to add it to the UI.
PS: You do need to set the "HOUDINI_ENABLE_3DMOUSE" environment var to "0" to avoid interference with native support. The panel will display a message about this if this has not been done.
Edited by Jonathan de Blok - 2023年10月22日 05:30:12
Technical Discussion » How to accurately position joints at the center of a mesh
- Jonathan de Blok
- 253 posts
- Offline
https://www.sidefx.com/docs/houdini/nodes/sop/labs--straight_skeleton_3d.html [www.sidefx.com]
Another methods is to use the above node to extract a sort of center-line skeleton and snap the joints onto that.
Another methods is to use the above node to extract a sort of center-line skeleton and snap the joints onto that.
Technical Discussion » Remove all Unassigned Materials ?
- Jonathan de Blok
- 253 posts
- Offline
Alexey_VanzhulaJonathan de BlokAlexey_VanzhulaJonathan de BlokThis will not be an automatic search across entire scene.
So loop over your main material nodes
If you get all instances of the relevant material types is should be scene wide.
So once you've gathered a list of relevant material nodes using the node.dependents(..) is an easy way to check if they are used somewhere.
(it's the same method as the OP uses manually using the UI)
I forgot about the dependents method and used hou.Node.parmsReferencingThisinstead. Thank you for the tip. But why consider the type of relevant materials? We could just go through all the free vop nodes that are located at the root of the vop network. Such nodes are most likely materials. That’s if we are talking about a completely automatic search for materials for users who don’t know Python. Although, of course, this won’t work if materials are assigned in VEX.nodes_to_remove = [] for vop_type in hou.vopNodeTypeCategory().nodeTypes().values(): for node in vop_type.instances(): if node.parent().isMaterialManager() and not node.dependents(): nodes_to_remove.append(node) if nodes_to_remove: ids = hou.ui.selectFromList([ node.name() for node in nodes_to_remove ], default_choices=range(len(nodes_to_remove)), title="Remove Unused Materials", column_header="Unused Nodes", clear_on_cancel=True, height = hou.ui.scaledSize(500)) [ nodes_to_remove[id].destroy() for id in ids ]
Yeah you're right, that would work. I quickly skimmed though the categories and couldn't find a suitable material type category to target, but checking all nodes if they are in a material manager node sounds like a good approach, could even be a blunt oneliner:
unused_nodes = list(filter(lambda node: node.parent().isMaterialManager() and not node.dependents() ,
hou.node("/").allSubChildren()))
Technical Discussion » Remove all Unassigned Materials ?
- Jonathan de Blok
- 253 posts
- Offline
Alexey_VanzhulaJonathan de BlokThis will not be an automatic search across entire scene.
So loop over your main material nodes
If you get all instances of the relevant material types is should be scene wide.
So once you've gathered a list of relevant material nodes using the node.dependents(..) is an easy way to check if they are used somewhere.
(it's the same method as the OP uses manually using the UI)
Technical Discussion » pip cannot work normally on Windows
- Jonathan de Blok
- 253 posts
- Offline
hython.exe -m ensurepip --upgrade
hython.exe -m pip install somePackage
I usually do it like that.
And with -t you can specify a target folder outside of Houdini to keep things more manageable.
hython.exe -m ensurepip --upgrade
hython.exe -m pip install somePackage -t "somePipelineFolder\python3.9\site-packages
Then in houdini use something like
import sys
sys.path.append("somePipelineFolder\python3.9\site-packages")
After which you can simply import your packages. Nice thing about this ways is that it survives Houdini uninstalls/updates etc as long as the python version stays the same.
Edited by Jonathan de Blok - 2023年10月16日 15:23:42
Technical Discussion » Remove all Unassigned Materials ?
- Jonathan de Blok
- 253 posts
- Offline
node.dependents(include_children = True) → tuple of hou.Node
Return a tuple of nodes that are reference this node, either through parameter expressions, referring to the node by name, or using expressions which rely on the data generated by this node
So loop over your main material nodes, if nothing depends on them it's an unused material. (assuming material stylesheets are not used)
Return a tuple of nodes that are reference this node, either through parameter expressions, referring to the node by name, or using expressions which rely on the data generated by this node
So loop over your main material nodes, if nothing depends on them it's an unused material. (assuming material stylesheets are not used)
Technical Discussion » Node shifting makes me mad!
- Jonathan de Blok
- 253 posts
- Offline
Instead of completely replacing it by an empty dummy function, you can also have the dummy function call the original one but with the move_unconnected / move_inputs arguments set to False. That way it should never move unconnected / upstream items.
Technical Discussion » Houdini Focus Distance causing camera jitter (32 bit limit?)
- Jonathan de Blok
- 253 posts
- Offline
As far as I know everything is 64 bit floating points all over the place and the focus distance is also not connected to the transform so I suspect something else is happening. Do you actually see the camera jitter in viewport or only in renders?
Technical Discussion » Copy / Paste "overwrite" nodes?
- Jonathan de Blok
- 253 posts
- Offline
not directly but if you first delete them and then paste the new collection it should rewire them automatically to whatever the original collection was linked to. (if all the names are identical)
Houdini Lounge » Integrating Pycharm with houdini tutorial?
- Jonathan de Blok
- 253 posts
- Offline
-
- Quick Links