Hi,
You can't break up the execution of nodes per element like that. That's why SideFX added new parameters to do exactly that, called First/Second U Attrib.
Found 1531 posts.
Search results Show results as topic list.
Technical Discussion » Hscript get prim attribute for each prim
- animatrix_
- 4458 posts
- Offline
Technical Discussion » how to orient normal in a line closed geometr
- animatrix_
- 4458 posts
- Offline
Hi,
Here is one way:
Create tangent vectors using PolyFrame SOP (Style = First Edge), then rotate the vectors around an arbitrary up vector:
Here is one way:
Create tangent vectors using PolyFrame SOP (Style = First Edge), then rotate the vectors around an arbitrary up vector:
matrix3 M = ident ( ); rotate ( M, radians ( -90 ), { 0, 1, 0 } ); @N *= M;
Technical Discussion » Need an attribute wrangle vex
- animatrix_
- 4458 posts
- Offline
rain.man2294animatrix_
Hi,
You can write something like this:float s = fit ( @Frame, 10, 20, 1, 0 ); @pscale = s;
Hi Man Thanks a lot
It kinda works
you see the points will scale down by that frame range alright, but after that all the points scale down to zero.
I guess I need to store the points, when they are selected and when a point in frame 39 for example gets select, then from that frame that point should start to scale down to zero
how to achive that?
It depends on your selection logic. If you can determine it ahead of time, you can check for that in code. Otherwise the easiest way is to use the Solver SOP as Tanto said.
Technical Discussion » Need an attribute wrangle vex
- animatrix_
- 4458 posts
- Offline
Hi,
You can write something like this:
You can write something like this:
float s = fit ( @Frame, 10, 20, 1, 0 ); @pscale = s;
Technical Discussion » Find Closest Primitives to a point
- animatrix_
- 4458 posts
- Offline
TheDude123animatrix_TheDude123
Thanks everyone for the help! I'm running into another issue though: I've found an attribute on the points (of the primitives found) and I'd like to store those values into an array of values (they are float values, btw). I can't seem to find a function that will do this. Basically, create an array from an attribute that exists on multiple points (and has different float values).
Example:
point0 f@attribute = 2.3
point1 f@attribute = 73.3
point2 f@attribute = 54.34
point3 f@attribute = 22.6
point4 f@attribute = 5.3
point5 f@attribute = 67.3
create array {2.3, 73.3, 54.43, 22.6, 5.3, 67.3}
Any suggestions?
What you are looking for is a pointmany VEX function. It doesn't exist. There is an RFE for this: SESI #19043. Submit an RFE and reference this number so they can bump it up.
For now you have to do it manually:float vals [ ] = array ( ); int pts [ ] = array ( 1, 2, 3 ); foreach ( int pt; pts ) { float val = point ( 0, "attrib", pt ); append ( vals, val ); }
ooooooooh, thats interesting.
It looks like the 'manual' part, besides the writing of the code, is I have to input the amount of points into:
int pts = array(manually input here) correct???
Something likes this seems to work as well:
f@vals = array();
int pts = expandpointgroup(0, "");
foreach(int pt; pts){
float val = point(0, 'angle_diff_C', pt);
append(@vals, val);
}
If you want all points, you can use either:
expandpointgroup ( 0, "" ); expandpointgroup ( 0, "*" );
Technical Discussion » Find Closest Primitives to a point
- animatrix_
- 4458 posts
- Offline
TheDude123
Thanks everyone for the help! I'm running into another issue though: I've found an attribute on the points (of the primitives found) and I'd like to store those values into an array of values (they are float values, btw). I can't seem to find a function that will do this. Basically, create an array from an attribute that exists on multiple points (and has different float values).
Example:
point0 f@attribute = 2.3
point1 f@attribute = 73.3
point2 f@attribute = 54.34
point3 f@attribute = 22.6
point4 f@attribute = 5.3
point5 f@attribute = 67.3
create array {2.3, 73.3, 54.43, 22.6, 5.3, 67.3}
Any suggestions?
What you are looking for is a pointmany VEX function. It doesn't exist. There is an RFE for this: SESI #19043. Submit an RFE and reference this number so they can bump it up.
For now you have to do it manually:
float vals [ ] = array ( ); int pts [ ] = array ( 1, 2, 3 ); foreach ( int pt; pts ) { float val = point ( 0, "attrib", pt ); append ( vals, val ); }
Technical Discussion » Time equivalent of mountain sop in new attribute noise
- animatrix_
- 4458 posts
- Offline
fred_98
Still not able to do what is being discussed here. May I please ask for a simple hip file?
I made a simple example showing how to do it. Hope that helps.
Houdini Lounge » H20 OpenCL GPU Accelerated FLIP Sims?
- animatrix_
- 4458 posts
- Offline
Apart from the PBD fluids of Vellum Fluids, there is no full scale GPU fluids in Houdini. With the significant OpenCL additions to H20, you can do this yourself but it will still be a lot of work, and performance will not necessarily be faster.
Technical Discussion » Find Closest Primitives to a point
- animatrix_
- 4458 posts
- Offline
TheDude123
Here is an example of what I'm trying to do:
This will be looped over ~50,000 points
In this case you can also store the primitive number on the points and do a regular point cloud lookup using pcfind and then loop over these points to gather unique primitive numbers found. This should be much faster for the vast majority of cases where you don't have an overwhelming number of points to filter through.
Technical Discussion » Find Closest Primitives to a point
- animatrix_
- 4458 posts
- Offline
TheDude123
Hi, is there a vex function (or node) that finds the closest PRIMITIVES to a specified point position? Something that looks within a certain distance? I need to find multiple primitives...not just one.
Thanks,
There is no single function that can return multiple nearest primitives but you can use xyzdist iteratively and use adhoc group to continuously exclude the previously found prims as you go, but it will be slow depending on how many primitives you want to gather as each call with a changing adhoc group will rebuild the acceleration data structures.
Technical Discussion » Time equivalent of mountain sop in new attribute noise
- animatrix_
- 4458 posts
- Offline
tamteanimatrix_you don't need to break the reference for this to work
After breaking the parameter references as shown in my first screenshot, you can override the time parameter with an attribute on the target points to copy to like this:
f@time attribute (if present) will fully override the parameter value whether the parameter is controlled by expression or not
Yes but without breaking the reference, the time parameter requires the animation toggle to be turned on which will change the pattern every frame. I guess you can put a timeshift after to freeze the time.
IMO SESI should expose time by itself, not just a single animation toggle.
Technical Discussion » Time equivalent of mountain sop in new attribute noise
- animatrix_
- 4458 posts
- Offline
After breaking the parameter references as shown in my first screenshot, you can override the time parameter with an attribute on the target points to copy to like this:
Technical Discussion » Time equivalent of mountain sop in new attribute noise
- animatrix_
- 4458 posts
- Offline
Hi,
If you dive inside the HDA, there are time parameters but they are not exposed for granular control. So you can break the links and change the Time parameter if you just want to alter the 4th dimension:
If you dive inside the HDA, there are time parameters but they are not exposed for granular control. So you can break the links and change the Time parameter if you just want to alter the 4th dimension:
Houdini Learning Materials » Houdini Shorts
- animatrix_
- 4458 posts
- Offline
Technical Discussion » A question for vector4 in vex
- animatrix_
- 4458 posts
- Offline
Hi,
It depends on the implementation of the noise but with a 4th component, you are basically utilizing a 4D noise where the last component is time.
It depends on the implementation of the noise but with a 4th component, you are basically utilizing a 4D noise where the last component is time.
3rd Party » Supercharged H20 extension (TouchDesigner Style)
- animatrix_
- 4458 posts
- Offline
arniswanimatrix_a2jixrxau
I have a problem using Houdini 20.0
When I right-click, it looks like this
Traceback (most recent call last):
File "C:\PROGRA~1/SIDEEF~1/HOUDIN~1.506/houdini/python3.10libs\nodegraph.py", line 170, in handleEventCoroutine
event_handler = event_handler.handleEvent(uievent,
File "C:\Users/User/Documents/houdini20.0/animatrix/hotkey system/python3.10libs\nodegraphhooks.py", line 229, in handleEvent
uievent.editor.openTabMenu(key = utils.getDefaultTabMenuKey())
TypeError: getDefaultTabMenuKey() missing 1 required positional argument: 'editor'
Hi, that's strange. I am unable to reproduce it. Which context and how are you right clicking i.e. is it on a node, etc? Recording a video would help.
I have the same issue. It happens when I RMB in any node network window( OBJ, SOP, OUT, etc. ). Pressing RMB in 3D viewport or parameters works just fine.
If I RMB on a node in a network everything works, but if the cursor is above empty network, then the error prints.
Hope this helps. Have been using the add-on for two days and it's super impressive. I love the feature of maximising 3D viewport then overlaying your node network and clicking Ctrl+B again for the parameter pane.
It seems like the built-in function utils.getDefaultTabMenuKey() has been changed. Normally these functions are not documented or provided as API so I updated mine to match the latest code for that function call.
It should work now if you get the latest update.
Locally I never come across this bug hence why I had to fix it from the traceback posted here.
Enjoy
Technical Discussion » Polyextrude does not preserve point groups
- animatrix_
- 4458 posts
- Offline
Hikari_
>animatrix_
Thanks for the reply.
I will try to learn VEX as I go along.
If you don't mind, can you give me, a VEX beginner, some tips on how to take over group attributes?
For example, useful functions, etc.
Here is an example that shows how to recreate a specific edge group after subdivision. It supports all subdivision algorithms except Houdini Catmull-Clark as that doesn't interpolate integer attributes (OpenSubdiv and Mantra-Compatible Catmull-Clark does).
int ptnew = findattribval ( 0, "point", "origpt", i@origpt ); if ( @ptnum == ptnew ) { int pts [ ] = neighbours ( 1, i@origpt ); foreach ( int pt; pts ) { int index = findattribval ( 0, "point", "origpt", pt ); if ( inedgegroup ( 1, "edges", i@origpt, pt ) ) { int newpts0 [ ] = neighbours ( 0, @ptnum ); int newpts1 [ ] = neighbours ( 0, index ); int sharedpt = -1; foreach ( int newpt; newpts0 ) if ( find ( newpts1, newpt ) >= 0 ) { sharedpt = newpt; break; } if ( sharedpt != -1 ) setedgegroup ( 0, "newedges", @ptnum, sharedpt, 1 ); } } }
If you want to handle all edges groups procedurally, you can either use a For Loop network or do everything inside a single Attribute Wrangle by looping over all edge groups within the same code.
Technical Discussion » Polyextrude does not preserve point groups
- animatrix_
- 4458 posts
- Offline
Hikari_
>animatrix_
Thanks for the reply.
I will try to learn VEX as I go along.
If you don't mind, can you give me, a VEX beginner, some tips on how to take over group attributes?
For example, useful functions, etc.
These functions are useful:
https://www.sidefx.com/docs/houdini/vex/functions/inpointgroup.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/vex/functions/inedgegroup.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/vex/functions/inprimgroup.html [www.sidefx.com]
Technical Discussion » Polyextrude does not preserve point groups
- animatrix_
- 4458 posts
- Offline
Hikari_
>Jsmack
Is the Edge Group Attribute lost in "Poly Bevel" also a intended one?
Unfortunately many nodes do not preserve edge groups either due to being overlooked or for performance reasons.
For example Subdivide SOP doesn't preserve the edge groups. If you want the original edge groups updated with the new topology, you have to write some VEX code.
3rd Party » Supercharged H20 extension (TouchDesigner Style)
- animatrix_
- 4458 posts
- Offline
raumafuanimatrix_raumafuanimatrix_
Supercharged extension is updated to be fully compatible with Houdini 20. It also implements the latest changes to be more in line with the latest API, such as the new hotkey standard to use unmodified keys:
https://www.sidefx.com/docs/houdini/news/20/hotkeys.html [www.sidefx.com]
The new version is freely available to existing users. Enjoy
Is it also updated on the patreon?
I didn't update that one yet. But should be soon that includes a few new changes.
Is there any updates on this?
I updated the files shared on Patreon. Just have to make a post about it to inform everyone.
-
- Quick Links