Found 74 posts.
Search results Show results as topic list.
Technical Discussion » H19.5: Copy Stamp and Partition?
- element33
- 74 posts
- Offline
Thanks for the Groups from Name example. Group from Name sounds a bit clunky, in that you have to create string attribs just so that you can create groups from them. Copy Stamp is a bigger deal, it allowed me to create complex models in a very compact, non-loop way. The variant/piece in Copy to Points seems very limited, compared to how "stamp" could pass dozens of variables up the chain. I'll see if I can deal with this... Anyway, thanks.
Edited by element33 - Feb. 8, 2023 22:06:56
Technical Discussion » H19.5: Copy Stamp and Partition?
- element33
- 74 posts
- Offline
In Houdini 19.5 I can't find Copy Stamp and Partition SOPs. I certainly hope they haven't been deprecated? Copy Stamp has been been very useful for procedural creation based on complex rules (Copy to Points is not sufficient for this). Partition (if I recall its name right) is a SOP that quickly generates multiple groups based on some rule.
Technical Discussion » Vex: reverse points in a line
- element33
- 74 posts
- Offline
Found the issue: the line shared points with other prims. I had to "break out" the line by creating copied new points (which can't be fused or they'll snap back to the orig. order).
int primPts[]=primpoints(0,origPrimID); int newPt0=addpoint(0,primPts[1]); int newPt1=addpoint(0,primPts[0]); pr=addprim(0,"polyline",newPt0,newPt1); removeprim(0,origPrimID,0);
Technical Discussion » Vex: reverse points in a line
- element33
- 74 posts
- Offline
In vex, I want to reverse a 2-pt line so its points switch their order (like Sort->Points->Reverse), but I can't get it to work. I tried rewiring the vertices on the existing prim, but the prim still retains its order;
I tried creating a new prim with points in my preferred order and removing the old prim, but I still see the "wrong" point order.
int primPts[]=primpoints(0,origPrimID); setvertexpoint(0,origPrimID,0,primPts[1]); setvertexpoint(0,origPrimID,1,primPts[0]);
I tried creating a new prim with points in my preferred order and removing the old prim, but I still see the "wrong" point order.
int primPts[]=primpoints(0,origPrimID); newPrim=addprim(0,"polyline",primPts[1],primPts[0]); removeprim(0,origPrimID,1);
Edited by element33 - Jan. 18, 2023 03:42:13
Technical Discussion » Bevel corners of a grid in "crease" mode
- element33
- 74 posts
- Offline
To "bevel" means to shape 2 surfaces that meet at an angle (or two lines, in a 2D version). What you're doing with a 2D grid isn't really a bevel, but a form of subdividing. Try PolyExtrude with no "Distance" and some "inset".
Technical Discussion » Quaternion roughly in XY: orient "up" as close to Z as poss.
- element33
- 74 posts
- Offline
Technical Discussion » Access 2nd input in a Python node
- element33
- 74 posts
- Offline
Technical Discussion » Quaternion roughly in XY: orient "up" as close to Z as poss.
- element33
- 74 posts
- Offline
In vex, I have a quaternion (p@orient) where the N and up are close to the XY plane, but not exactly on it. I want to re-orient the quaternion, so that "up" points as closely into Z as possible, but without changing N. I.e. as if I grabbed the quaternion by the up vector and rotated it around the N so that "up" now points as close into Z as possible. How do I do this in vex? If both N and up were on the XY plane, I could just rotate "up" around the N 90 deg.
Technical Discussion » Access 2nd input in a Python node
- element33
- 74 posts
- Offline
I have a Python SOP where I modify the geometry coming in through the first input. I want to use info from another SOP (without modification). I can reference it in Python using hou.node('path'), but I see 4 inputs on the Python SOP. Can I plug a SOP into the 2nd input and access its info in Python? If so, how?
Happy New Year!
Happy New Year!
Edited by element33 - Dec. 31, 2022 23:21:16
Technical Discussion » SOP to orient/align a poly to ortho axes
- element33
- 74 posts
- Offline
Technical Discussion » SOP to orient/align a poly to ortho axes
- element33
- 74 posts
- Offline
Is there a SOP (either native, or Labs or qLib) that will take a rectangular poly, floating in space at some strange angle, and align the sides of the poly to major axes (whichever)? I can compute the poly's normal and use it with "dihedral" in vex, but I wonder if there's a native SOP just for this.
Technical Discussion » Refine a polyline with 3 points
- element33
- 74 posts
- Offline
Screenshot OK? I load a bunch of dependencies by default, I'd have to clean up the hip. It's just one "xyzdist" expression. My case is 2D (no "Z"). Also, I already know the IDs of the closest points on the line. To generalize, you'd need to ID them first.
Edited by element33 - Nov. 23, 2022 12:13:15
Technical Discussion » Refine a polyline with 3 points
- element33
- 74 posts
- Offline
I found a one-SOP method that keeps the attribs. On the 3 point line, it turns out the uv coord reported by "xyzdist" is for the nearest segment of the 3-point line (the shorter part of the 3-pt line in the pic above). Instead of Refine, I can use a PolySplit, with the split location defined as p(a)-(b): (r) where (a) and (b) are point numbers defining the shorter segment, and (r) is the uv reported by "xyzdist".
Edited by element33 - Nov. 23, 2022 08:55:11
Technical Discussion » Refine a polyline with 3 points
- element33
- 74 posts
- Offline
Thanks, it works and I'll use it. The ( resample/transfer attribs ) part seems unnecessarily complex for just inserting one point at a known location. Maybe one day I'll find a simpler way.
Edited by element33 - Nov. 23, 2022 08:12:13
Technical Discussion » Refine a polyline with 3 points
- element33
- 74 posts
- Offline
I want to add a point to a line at a location closest to a point A (just outside the line). If the line has only 2 points (start,end), I can use the "xyzdist" expression to find the uv on the line closest to point A, and use Refine SOP to add a point. It works. But if the line has 3 points (start, end, and a point somewhere in the middle), the uv reported by "xyzdist" and passed on to Refine looks wrong, it's not where it used to be. I suspect it's an issue with parametric uv's with more than 2 points on a line. I tried to re-order the 3 points on the 3-point line, but it doesn't make any difference. I can use the Convert-Line SOP to fix this, i.e. convert the 3-point line to 2 separate lines: the "xyzdist" expression works again. Can this be done without the Convert-Line SOP?
Edited by element33 - Nov. 23, 2022 00:17:29
Technical Discussion » Leave only the first prim in a prim group
- element33
- 74 posts
- Offline
tamteCook, thanks.
Not by Houdini right now, but you should be able to do something like this
Technical Discussion » Leave only the first prim in a prim group
- element33
- 74 posts
- Offline
In a prim group, how do I remove all prims except the first one? I tried a Prim Wrangle, with the desired group in the "Group" field, like so:
But it removes all prims in a group (seems like @primnum starts at 0 for the entire geometry, not for the desired group). I can Split-SOP by group, then remove all prims but the first one, then merge back all geometry, but I'd like to do this without splitting. In a Prim Wrangle, I can also iterate through all prims, check group membership, save the first prim and remove all others, but maybe there's a way without iterating through all prims.
if (@primnum>0) removeprim(0,@primnum,1);
Edited by element33 - Nov. 22, 2022 19:20:01
Technical Discussion » Identifying the active input in a switch with many inputs
- element33
- 74 posts
- Offline
I'm using opinputpath(".", ch("input")), but here are a few findings from my research:
1) Alt-LMB on the Switch SOP lets you select an input wire by index (ready to rewire), but not the input node.
2) RMB on a wire lets you select its input/output SOP.
Sadly, I don't see a way to combine 1) and 2) into one desired operation "Select input on wire number 7"
3) With the first input SOP selected, Shift-PgDn steps through the inputs in sequence (in case I want to count)
As far as making the active wire more distinct: I see many config files that reference the appearance of network wires (list below), but it's tedious to change a value, then restart Houdini to see if I made a desired change.
1) Is there a searchable documentation on all such config files saying exactly these variables refer to?
2) Can Houdini "source" (re-read) all its config files in-session, so I can see the changes without a restart?
$HFS\houdini\default.wirestyles (I don't know how to define the appearance of a wire theme/style)
$HFS\houdini\config\NodeGraphLight.inc
$HFS\houdini\config\NodeGraphCommon.inc
$HFS\houdini\config\UILight.hcs
1) Alt-LMB on the Switch SOP lets you select an input wire by index (ready to rewire), but not the input node.
2) RMB on a wire lets you select its input/output SOP.
Sadly, I don't see a way to combine 1) and 2) into one desired operation "Select input on wire number 7"
3) With the first input SOP selected, Shift-PgDn steps through the inputs in sequence (in case I want to count)
As far as making the active wire more distinct: I see many config files that reference the appearance of network wires (list below), but it's tedious to change a value, then restart Houdini to see if I made a desired change.
1) Is there a searchable documentation on all such config files saying exactly these variables refer to?
2) Can Houdini "source" (re-read) all its config files in-session, so I can see the changes without a restart?
$HFS\houdini\default.wirestyles (I don't know how to define the appearance of a wire theme/style)
$HFS\houdini\config\NodeGraphLight.inc
$HFS\houdini\config\NodeGraphCommon.inc
$HFS\houdini\config\UILight.hcs
Edited by element33 - Nov. 15, 2022 09:33:32
Technical Discussion » Identifying the active input in a switch with many inputs
- element33
- 74 posts
- Offline
tamteThanks. With a whole bunch of inputs going into one Switch SOP, this distinction gets lost. I'll check the config files, maybe there's a way to make the active input wire much thicker and a different color.
active input connection line being solid
Technical Discussion » Identifying the active input in a switch with many inputs
- element33
- 74 posts
- Offline
animatrix_Thanks, I'll try it. What would solve this easily are simple line numbers on the left (like in code editors) in the Switch SOP parameter dialog.
You can use the opinputpath
-
- Quick Links