Hi,
You can use the Copy and Transform SOP:
Houdini has many languages: VEX, Python, Hscript, OpenCL, even C++:
For most tasks VEX is all you need:
https://www.sidefx.com/learn/vex [www.sidefx.com]
Found 1557 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » Houdini Syntax to move an object 10 times with 1 transform
- animatrix_
- 4523 posts
- Offline
Houdini Learning Materials » Houdini Shorts
- animatrix_
- 4523 posts
- Offline
Technical Discussion » Expanding or Shrinking a Helix Using Peak
- animatrix_
- 4523 posts
- Offline
Here is one way using a Primitive Wrangle:
chi parameters are toggles, chs parameters are attribute names.
vector computePerpendicularVector ( vector v ) { vector v0 = normalize ( v ); vector y = { 0, 1, 0 }; vector pv0 = y - ( v0 * dot ( v0, y ) ); vector z = { 0, 0, 1 }; vector pv1 = z - ( v0 * dot ( v0, z ) ); if ( length2 ( pv0 ) > length2 ( pv1 ) ) return normalize ( pv0 ); return normalize ( pv1 ); } int vtxcount = primvertexcount ( 0, @primnum ); if ( vtxcount > 1 ) { int pts [ ] = primpoints ( 0, @primnum ); int count = len ( pts ); int isclosed = primintrinsic ( 0, "closed", @primnum ); if ( pts [ 0 ] != pts [ -1 ] ) { if ( isclosed ) append ( pts, pts [ 0 ] ); else append ( pts, pts [ -2 ] ); } else { removeindex ( pts, -1 ); isclosed = 1; count -= 1; } vector tangents [ ] = { }; vector normals [ ] = { }; vector bitangents [ ] = { }; resize ( tangents, count ); resize ( normals, count ); resize ( bitangents, count ); for ( int i = 0; i < count; ++i ) { vector p0 = point ( 0, "P", pts [ i ] ); vector p1 = point ( 0, "P", pts [ i + 1 ] ); vector tangent = normalize ( p1 - p0 ); if ( isclosed == 0 && i == count - 1 ) tangent *= -1; tangents [ i ] = tangent; } vector n = normalize ( cross ( computePerpendicularVector ( tangents [ 0 ] ), tangents [ 0 ] ) ); normals [ 0 ] = normalize ( cross ( tangents [ 0 ], n ) ); for ( int i = 0; i < count - 1; ++i ) { vector bitangent = cross ( tangents [ i ], tangents [ i + 1 ] ); if ( length2 ( bitangent ) < 0.0000001 ) normals [ i + 1 ] = normals [ i ]; else { bitangent = normalize ( bitangent ); float angle = atan2 ( length ( cross ( tangents [ i ], tangents [ i + 1 ] ) ), dot ( tangents [ i ], tangents [ i + 1 ] ) ); matrix3 rMatrix = ident ( ); rotate ( rMatrix, angle, bitangent ); normals [ i + 1 ] = rMatrix * normals [ i ]; } bitangents [ i ] = bitangent; } for ( int i = 0; i < count; ++i ) { if ( chi("normal") ) setpointattrib ( geoself ( ), chs("n"), pts [ i ], normals [ i ] ); if ( chi("tangent") ) setpointattrib ( geoself ( ), chs("t"), pts [ i ], tangents [ i ] ); if ( chi("bitangent") || ( chi("orient") || chi("rmatrix") ) ) { bitangents [ i ] = normalize ( cross ( normals [ i ], tangents [ i ] ) ); if ( chi("bitangent") ) setpointattrib ( geoself ( ), chs("b"), pts [ i ], bitangents [ i ] ); } matrix3 m = 0; if ( chi("orient") || chi("rmatrix") ) { m = set ( bitangents [ i ], normals [ i ], tangents [ i ] ); if ( chi("orient") ) setpointattrib ( geoself ( ), chs("o"), pts [ i ], quaternion ( m ) ); if ( chi("rmatrix") ) setpointattrib ( geoself ( ), chs("rm"), pts [ i ], m ); } } }
chi parameters are toggles, chs parameters are attribute names.
Houdini Lounge » UI/UX: Share your screenshots & tips & tricks & ideas
- animatrix_
- 4523 posts
- Offline
Technical Discussion » Vex: How to use Snell's Law for Refraction Vector?
- animatrix_
- 4523 posts
- Offline
You shouldn't have to invert the normals. I use the regular surface normal of a grid here to refract rays on to the floor:
Technical Discussion » Zero Out Object Rotations and Translations
- animatrix_
- 4523 posts
- Offline
Houdini Lounge » Can I Bypass the limitation on hotkey shortcuts?
- animatrix_
- 4523 posts
- Offline
Hi,
You can implement these in Python and drag over to a shelf to create a shelf tool which you can assign a hotkey too. For example to toggle between hidden line and wireframe modes:
You can implement these in Python and drag over to a shelf to create a shelf tool which you can assign a hotkey too. For example to toggle between hidden line and wireframe modes:
def toggleHiddenLineWireframe(): with hou.undos.disabler(): editor = hou.ui.paneTabUnderCursor() if not editor: editor = hou.ui.paneTabOfType(hou.paneTabType.SceneViewer) if editor: editortype = editor.type() if editortype == hou.paneTabType.SceneViewer: settings = editor.curViewport().settings() displayset = settings.displaySet(hou.displaySetType.DisplayModel) shading = hou.glShadingType.WireGhost if displayset.shadedMode() == hou.glShadingType.HiddenLineInvisible else hou.glShadingType.HiddenLineInvisible displayset.setShadedMode(shading)
Technical Discussion » I'm looking for a way to "Id" duplicate arrays(SOLVED)
- animatrix_
- 4523 posts
- Offline
Hi,
You can use the findattribval function:
https://www.sidefx.com/docs/houdini/vex/functions/findattribval.html [www.sidefx.com]
I wouldn't recommend joining integers like that as 121 could be 1, 21 and 12, 1 which are not the same arrays.
You have to use space separated (or another character) strings.
You can use the findattribval function:
https://www.sidefx.com/docs/houdini/vex/functions/findattribval.html [www.sidefx.com]
I wouldn't recommend joining integers like that as 121 could be 1, 21 and 12, 1 which are not the same arrays.
You have to use space separated (or another character) strings.
Technical Discussion » How to desaturate image in Houdini (COP2 Network)?
- animatrix_
- 4523 posts
- Offline
litote
How do I stop the COP2 Network image showing in the Scene View? Presumably I have to put it inside a Geometry node and deactivate its display flag?
You can display another node like a null node.
Technical Discussion » How to desaturate image in Houdini (COP2 Network)?
- animatrix_
- 4523 posts
- Offline
litote
Thanks, how do you show the image in the viewport? Composite View presumably?
OK Got it to work. Thanks.
It shows a desaturated image in the Composite View OK.
If you cook the COP network node, it should show the result in the viewport.
Technical Discussion » How to desaturate image in Houdini (COP2 Network)?
- animatrix_
- 4523 posts
- Offline
Hi,
You can use the HSV COP:
mestela beat me to it dammit!
You can use the HSV COP:
mestela beat me to it dammit!
Edited by animatrix_ - Jan. 25, 2024 01:43:51
Technical Discussion » Transforming a lissajous curve along a given input curve
- animatrix_
- 4523 posts
- Offline
createdbybenm
I would love to see this in vanilla Houdini but I'm sorry I dond't know what you mean with rfe and sesi?
I meant submitting a feature request here:
https://www.sidefx.com/bugs/#/create/ [www.sidefx.com]
That's how SideFX (SESI) collects bugs and requests for enhancements (RFEs).
Technical Discussion » Transforming a lissajous curve along a given input curve
- animatrix_
- 4523 posts
- Offline
createdbybenm
Oh wow that was an easy fix.
Thank you so much!
Small question how did you overlay your viewport over your nodes seems very efficient in terms of space usage?
It's a custom Python Qt extension:
You can see it in more detail here (around 30 min mark):
If you like to see this added to Houdini, please submit an RFE to SESI and reference RFE ID #101685.
Technical Discussion » Transforming a lissajous curve along a given input curve
- animatrix_
- 4523 posts
- Offline
Your curveu is not computed correctly by the Resample SOP. Add another Resample node after the first one without resampling but to compute curveu only:
Technical Discussion » Network Editor>Sidebar QTreeView (GUI CUSTOMIZATION/PYTHON QT )
- animatrix_
- 4523 posts
- Offline
AFAIK this is not implemented in Qt. The only way to do what you want is to create your own from scratch as a Python panel.
Houdini Lounge » How to get screenshot of network editor?
- animatrix_
- 4523 posts
- Offline
seveleeanimatrix_
Hi,
You can maximize your network editor using Ctrl+B, and if your display is not 8K you can pan around taking multiple screenshots, then stitching them together in an image editor.
Hi animatrix_,
I am wondering how to make network view overlay on viewport as your screenshot. Is it a plugin or build-in function?
Hi,
It's a custom Python Qt extension:
You can see it in more detail here (around 30 min mark):
If you like to see this added to Houdini, please submit an RFE to SESI and reference RFE ID #101685.
Houdini Learning Materials » Houdini Shorts
- animatrix_
- 4523 posts
- Offline
Technical Discussion » How to deform an object along the curve drawn by a particle
- animatrix_
- 4523 posts
- Offline
Technical Discussion » VEX: How to access a single element from a matrix?
- animatrix_
- 4523 posts
- Offline
There is an RFE on both of these: #130331. Bump it up if you want to see it in a future version of Houdini hopefully.
Technical Discussion » How can I procedurally delete this point?
- animatrix_
- 4523 posts
- Offline
Hi,
You can do this using the neighbourcount VEX function:
You can do this using the neighbourcount VEX function:
int count = neighbourcount ( 0, @ptnum ); if ( count < chi("point_count") ) removepoint ( 0, @ptnum );
-
- Quick Links