interface version 1
Creation/manipulation of geometry attributes using a series of basic operations.
Description
This operator can be used to build new geometry attributes, or modify existing ones.
A series of operations can be specified that will be applied to the attribute.
The operations are mostly for scalar types (but work for other data types wherever
it makes sense.)
Each operation translates to a single line of VEX code. The code can be inspected
(or even edited), so this operator a good alternative to a Wrangler node.
It can also be useful for beginners to learn about the VEX language.
Parameters
Show Code Snippet
| This operator works by converting the list of operations into VEX code. The generated
code is displayed if this toggle is enabled.
|
Update Code (button)
| Pressing this button (re-)builds the VEX code snippet from the Operations list.
(Any manual edits to the code snippet will be lost.)
|
Auto Update
| If enabled, all changes in the Operations list will be immediately built into the
VEX Snippet code.
Note
Resetting a parameter (ctrl+MMB) doesn’t trigger the update, so the Update Code button has to be
pressed manually.
|
(changed)
| This toggle gets enabled if the VEX Snippet (see below) is edited by hand.
|
VEX Snippet
|
(Displayed only if Show Code Snippet is enabled.)
This text field contains the VEX code generated from the series of operations.
Each line corresponds to an entry in the Operations list (try disabling/enabling individual
operations while watching the code).
The code snippet can also be edited directly, however this will eventually result in all
auto-updates to be disabled (as edited code might no longer correspond to the operations built
using the UI). Still, it can be useful for quickly test ideas, etc.
A better overall solution for editing is to use Custom lines (see below).
|
Use Channel References (Animatable)
| Make sure this is enabled if any of the operation parameters (below) is animated.
By default, the VEX code built contains all operation parameters as constants –
this gives more human-readable results.
However, since the VEX code is not rebuilt when the current time changes, animation
on the parameters will not work.
By enabling this toggle, the VEX code will contain ch() channel references
instead of constants. This makes the operator much faster and animatable.
However, the VEX code will not be stand-alone any more
(e.g. can’t be copied into a plain Point Wrangle SOP).
|
Group
| A subset of geometry components to work on.
(Leave it blank to process all geometry components.)
|
Attribute Name, Local Variable, Type, Class
| Specifications of the attribute to be created or updated.
(It is valid to apply operations to an already existing attribute –
use the Unspecified data type.)
Warning
Not all operations can handle all data types properly
(especially matrices; float and vector types are supported by all operations).
|
Operations
| The following operations are available.
No-op (“-”)
| No operation. Supports an optional Note that is inserted into the code snippet.
| Get
| Get the values of another attribute. It also supports getting vector (color) components,
length, luminance and alpha.
If the Delete toggle is enabled, the specified attribute will be deleted after the
operator chain is applied (the attribute will be added to the Delete Attribs field, see below).
| Set
| Set attribute values. (Only the non-trivial modes are explained below.)
Constant Value
| Sets all attributes to the same initial value.
| Random Range [0..1]
| Sets attributes to random values. For multi-component attributes (vectors, etc.) all
components are randomized individually.
| Point Number, Point Number [0..1]
| Point number (either [0 ..points-1 ] or normalized).
| Point Id
| Point particle id.
| Vertex Number
| Vertex index of the current component.
| Prim Number, Prim Number [0..1]
| Primitive number (either [0 ..prims-1 ] or normalized).
| Vertex Index [0..1]
| The index of a vertex, related to its parent primitive (normalized).
Useful for referring to curve points.
| Relative Age [0..1)
| Normalized age of a particle (@age /@life ).
| | Tune
| Modify attribute values with various operations.
A constant Value is provided for operations that require it.
Add, Subtract, Multiply, Divide
| The four basic operations between attribute values and Value .
| Power (Gamma)
| Gamma correction (attribute values on the power of Value ).
| Complement (Invert)
| 1 - (attribute value) .
| Negate
| Negate all attribute values.
| Modulo
| Modulo (or division remainder) between attribute values / Value .
| Fraction
| Keeps the fractional part ([0..1) ) of attribute values.
| Absolute
| Takes the absolute of attribute values.
| Add, then Floor
| Adds Value to attribute values, then rounds down to the nearest integer.
(To apply proper rounding, set Value = 0.5 )
| Triangle [0..v..0]
| For attribute values in the [0..1] range, a triangle-shaped envelope is applied,
which has value 0 at positions 0.0 and 1.0 , and the specified Value at
position 0.5 .
| Randomize ('Value' Seed)
| Generates random values by using the attribute values as seed with the set Value added.
(So, original attribute values with the same value will have the same random result value.)
| Sine ('Value' Freq)
| A sine (sinus) function, using value as a frequency multiplier. (The function is
not radian-based: it has a period length of 4 .)
| Ease ('Value' blend)
| Turns the [0..1] value range from linear to ease-in/out curved. The value is
used to blend between the two (0 is linear, 1 is ease-in/out).
| | Fit
| Fits attribute values in the specified source value range into the destination value range.
Values outside the range are clamped by default (enable Unclamped for the non-clamped mode).
| Custom
| This allows an arbitrary code snippet line to be entered.
(The symbol @@ is substituted with the attribute name. The trailing semicolon (; ) is automatically
added if missing.)
It’s recommended to watch the generated Code Snippet results (see above) when using custom lines.
| |
Delete Attribs
| A list of attribute names to be deleted after all operations are finished.
Enabling Delete for an attribute in a Get tab will have the attribute listed here.
Additional attribute names can be entered manually (such entries will be maintained at parameter
updates and will not get lost).
|
Limitations
Builder component parameters –
To Do
(DONE) Make sure set/vertex number (abs/rel) work as supposed
(DONE) functionality: color space conversion
functionality: “tune” should be able to provide a vector as Value (tune parameter)
“set/vertex number 0..1” seems not to be working (or needed – could be removed?)
Release Notes
interface version 1 —
2014-11-22
| Added “custom” snippet line presets:
|
2014-10-07
| Various small but important fixes:
Fixed “Vertex Index [0..1]” issue (hopefully, for the last time)
Added get/rgb luminance
Fixed set/particle age/lifespan labels
|
2014-10-04
| |
2014-09-15
| |
2014-07-15
| |
2014-07-02
| Input connectors c.c. (names, reference states)
Added Animated Operations toggle – much better performance!
|
2014-05-08
| |
2014-03-15
| |
2014-02-04
| |
2014-01-07
| |
2013-09-28
| |
2013-09-21
| |
2013-04-19
| |
2013-04-18
| |
2013-04-16
| Various minor usability tweaks and enhancements
Added data type support (most importantly, it can work with vector attributes now)
Help card
|
2013-04-15
| Initial prototype.
|