Is it possible to add more VEX Presets to Wrangle nodes?
9881 10 7- Midphase
- Member
- 833 posts
- Joined: Jan. 2018
- Offline
Just wondering if anyone knows how it might be possible to add more pre-coded VEX presets to the various Wrangle nodes in addition to the limited number which are already there?
If this is not possible, then I would urge the developers to consider making this option available since it would come in handy quite frequently as a quick shortcut to commonly used code.
If this is not possible, then I would urge the developers to consider making this option available since it would come in handy quite frequently as a quick shortcut to commonly used code.
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
- vusta
- Member
- 555 posts
- Joined: Feb. 2017
- Offline
don't see why not.
Open file VEXpressions.txt in: (naturally, BACK IT UP FIRST !)
C:\Program Files\Side Effects Software\Houdini 17.0.416\houdini\
scroll down about midway, there they all are…
#
# Attribute Wrangle SOP
#
attribwrangle/snippet
Color from Bounding Box
@Cd = relbbox(0, @P);
attribwrangle/snippet
Random Point Color:
float seed = 0.12345; // seed for rand
@Cd = rand(seed + @ptnum);
attribwrangle/snippet
Color Based on Threshold
int condition = (@P.x > 0) ? 1 : 0; // short form if() test
@Cd = set(condition, 0, 0); // write condition into red color
attribwrangle/snippet
Point Group on Threshold
string group = “mygroup”; // group name to add points to
int condition = (@P.x > 0) ? 1: 0; // short form if() test
setpointgroup(geoself(), group, @ptnum, condition);
@Cd = set( condition, 0, 0); // color if in group
attribwrangle/snippet
Fetch Second Input Cd Attribute
// Second input used as reference geometry
// Use prim and @primnum to get a matching primitive attribute.
@Cd = point(1, “Cd”, @ptnum);
go nuts adding your own I guess…..but BACK IT UP FIRST
Open file VEXpressions.txt in: (naturally, BACK IT UP FIRST !)
C:\Program Files\Side Effects Software\Houdini 17.0.416\houdini\
scroll down about midway, there they all are…
#
# Attribute Wrangle SOP
#
attribwrangle/snippet
Color from Bounding Box
@Cd = relbbox(0, @P);
attribwrangle/snippet
Random Point Color:
float seed = 0.12345; // seed for rand
@Cd = rand(seed + @ptnum);
attribwrangle/snippet
Color Based on Threshold
int condition = (@P.x > 0) ? 1 : 0; // short form if() test
@Cd = set(condition, 0, 0); // write condition into red color
attribwrangle/snippet
Point Group on Threshold
string group = “mygroup”; // group name to add points to
int condition = (@P.x > 0) ? 1: 0; // short form if() test
setpointgroup(geoself(), group, @ptnum, condition);
@Cd = set( condition, 0, 0); // color if in group
attribwrangle/snippet
Fetch Second Input Cd Attribute
// Second input used as reference geometry
// Use prim and @primnum to get a matching primitive attribute.
@Cd = point(1, “Cd”, @ptnum);
go nuts adding your own I guess…..but BACK IT UP FIRST
- goldleaf
- Staff
- 4169 posts
- Joined: Sept. 2007
- Online
Actually, you don't have to edit that file in the install dir. Houdini will look for any VEXpressions.txt files found in $HOUDINI_PATH or your preferences folder, and add those to the drop-down.
You can look at the original to follow its conventions.
Hope that helps!
You can look at the original to follow its conventions.
# Lines starting with # are comments and ignored
#
# Each entry starts with no indentation and gives the key used
# by the menu callback. By convention, this is nodename/parmname.
# Multiple keys can be given for the same entry.
#
# The next line gives the name of the expression. Its indentation
# level is then used for the remainder of the text. All the
# code until the next parameter are appended together to make
# the snippet. All preceeding indentation is removed.
# Note that tabs == 8 is assumed.
attribwrangle/snippet
This is my cool snippet
printf("Hello world");
Hope that helps!
I'm o.d.d.
- Midphase
- Member
- 833 posts
- Joined: Jan. 2018
- Offline
Perfect, exactly what I was hoping for….thank you!
>>Kays
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
For my Houdini tutorials and more visit:
https://www.youtube.com/c/RightBrainedTutorials [www.youtube.com]
- Mohanpugaz
- Member
- 131 posts
- Joined: June 2016
- Offline
That was cool to know!.
I usually do another simple trick for this. I find it cool to get the snippets
in the tab menu so that i can tab and search my snippet easily.
https://www.instagram.com/p/BsGW8kWgKhN/?utm_source=ig_web_copy_link [www.instagram.com]
also I use node presets for the same as well.
Thanks!
I usually do another simple trick for this. I find it cool to get the snippets
in the tab menu so that i can tab and search my snippet easily.
https://www.instagram.com/p/BsGW8kWgKhN/?utm_source=ig_web_copy_link [www.instagram.com]
also I use node presets for the same as well.
Thanks!
Mohan Pugaz
movfx
https://www.instagram.com/movfx/ [www.instagram.com]
https://www.youtube.com/channel/@_movfx
movfx
https://www.instagram.com/movfx/ [www.instagram.com]
https://www.youtube.com/channel/@_movfx
- howiem
- Member
- 146 posts
- Joined: Sept. 2011
- Offline
… and the super thing about saving stuff as node presets is that it also saves any spare parameters your preset node may need.
eg. find yourself constantly needing to add a bit of human wobble to your camera? Houdini gives you approximately 792 different ways to do this, but my favourite has been:
Create a null, put some expressions to create some noise on its rotations, and add some parameters to feed/control that noise. You don't want to have to tit about with the expressions every time you want to control the wobble when you can make a baby UI on the Null itself:
The expressions I've stuck on are like this:
Change that 837 to a different number on each axis. Save it as a preset called “Camera wobble” or “Rotation noise” etc. That's the hard part over.
Now anytime you know you're gonna want a camera with a bit of humanising wobble, link your camera to a null, and animate that null with the main camera moves, instead of the camera object itself. Then you can stick another null in between:
and call up your wobble preset:
Now you have some nice friendly wobble controls, just by adding a null and picking a preset. Yummy.
eg. find yourself constantly needing to add a bit of human wobble to your camera? Houdini gives you approximately 792 different ways to do this, but my favourite has been:
Create a null, put some expressions to create some noise on its rotations, and add some parameters to feed/control that noise. You don't want to have to tit about with the expressions every time you want to control the wobble when you can make a baby UI on the Null itself:
The expressions I've stuck on are like this:
turb($T/ch("freqx")+837,0,0,2)*ch("noise_scalex")*ch("noise_scale_global")
Change that 837 to a different number on each axis. Save it as a preset called “Camera wobble” or “Rotation noise” etc. That's the hard part over.
Now anytime you know you're gonna want a camera with a bit of humanising wobble, link your camera to a null, and animate that null with the main camera moves, instead of the camera object itself. Then you can stick another null in between:
and call up your wobble preset:
Now you have some nice friendly wobble controls, just by adding a null and picking a preset. Yummy.
Edited by howiem - Jan. 7, 2019 04:41:28
- vinyvince
- Member
- 255 posts
- Joined: Sept. 2012
- Offline
I wish Sidefx add a search tab option for preset… But i have already request this many times.
Okay, i have more than 50 or 70 wrangles presets , how could i export it from h18 to h18.5 please?
Okay, i have more than 50 or 70 wrangles presets , how could i export it from h18 to h18.5 please?
Vincent Thomas (VFX and Art since 1998)
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
- Librarian
- Member
- 142 posts
- Joined: Aug. 2009
- Offline
- vinyvince
- Member
- 255 posts
- Joined: Sept. 2012
- Offline
Did i post that? Scusy, though i didn't . Yes, i have to relaunch houdini, first time i think i restarted it too early so that's why i thought it didn't work out!
Thanks you Tesan, have you seen this from David?
https://www.youtube.com/watch?v=stNN79VRAao&list=PLVPTX7KtnqVrBWGyYoGoG_If6U-v4miZ0&index=6 [www.youtube.com]
Thanks you Tesan, have you seen this from David?
https://www.youtube.com/watch?v=stNN79VRAao&list=PLVPTX7KtnqVrBWGyYoGoG_If6U-v4miZ0&index=6 [www.youtube.com]
Vincent Thomas (VFX and Art since 1998)
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
Senior Env and Lighting artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
- Librarian
- Member
- 142 posts
- Joined: Aug. 2009
- Offline
- papsphilip
- Member
- 385 posts
- Joined: July 2018
- Offline
-
- Quick Links