You can write something like this:
float s = fit ( @Frame, 10, 20, 1, 0 ); @pscale = s;
float s = fit ( @Frame, 10, 20, 1, 0 ); @pscale = s;
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);
}
expandpointgroup ( 0, "" ); expandpointgroup ( 0, "*" );
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?
float vals [ ] = array ( ); int pts [ ] = array ( 1, 2, 3 ); foreach ( int pt; pts ) { float val = point ( 0, "attrib", pt ); append ( vals, val ); }
fred_98
Still not able to do what is being discussed here. May I please ask for a simple hip file?
TheDude123
Here is an example of what I'm trying to do:
This will be looped over ~50,000 points
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,
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
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.
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.
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 ); } } }
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.
Hikari_
>Jsmack
Is the Edge Group Attribute lost in "Poly Bevel" also a intended one?
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?
rickapex
call me a boomer, but how on earth is this tiktock format relevant for anyone using houdini?
Andranimatrix_
I'm not quite clear on this. Are you recommending splitting complex code into multiple wrangles for performance or readability?
Regarding performance: Splitting a block of code into multiple wrangles forces you to save data to attributes, which are then read by the following wrangle. Doesn't this approach cause overhead compared to keeping all data in memory in a single wrangle?
= Attribute Gradient = #type: node #context: sop #internal: attribGradient #icon: opdef:.?icon64.svg """Computes the gradient of a scalar attribute using connectivity or proximity.""" @parameters Group: #id: group Subset of geometry to use. Group Type: #id: grouptype The type of entities in the group. Attribute: #id: attribute Name of the input attribute. New Attribute: #id: new Name of the new attribute that will store the gradient. Method: #id: method The method used to compute the gradient. Connectivity: Uses edge connectivity to compute the gradient. Point Cloud: Uses point proximity to compute the gradient. Neighbouring: #id: neighbouring The type of neighbouring to use. By Edges: Uses the edge neighbours of each point when gathering their point neighbours. By Primitives: Uses the primitive neighbours of each point when gathering their point neighbours. Depth: #id: depth Number of edges/primitives away from the points. Radius: #id: r The radius of the search. Max Points: #id: maxpts The maximum number of points queried within the search radius. Use Radius Attribute: #id: useradius Uses a per-point radius attribute. Radius Attribute: #id: radius Per-point radius attribute that expands the search radius. Radius Scale: #id: rscale Multiplier for the radius attribute. Invert: #id: invert Negates the direction of the gradient vector. Show Guide: #id: guide Shows the gradient vectors in the viewport. Guide Scale: #id: guidescale The scale of the guide geometry.