fieldExpr
beta
filter
fieldExpr
RayTK
v0.42
Modifies field values using a custom expression.
The Expression parameter’s menu contains common examples.
Writing expressions:
- To access a value from input 1, use a function call like
inputOp1(p, ctx)
- The
p
part is the spatial coordinate, so you can modify it with something likeinputOp1(p + vec3(1, 0, 0), ctx)
, which would move that field to the left. - The
ctx
part is required as the second argument to the function.
- The
- Other inputs are available as
inputOp2(...)
etc - The two slider parameters are available as
THIS_Param1
andTHIS_Param2
- The two vector parameters are available as
THIS_Vecparam1
andTHIS_Vecparam2
- To get at an individual part of one of the vector params, you can use
THIS_Vecparam1.y
- To get at an individual part of one of the vector params, you can use
Parameters
Name | Description | Regular Handling | Read-Only Handling |
---|---|---|---|
Enable | |||
Expression | |||
| |||
Param 1 | Runtime | Baked | |
Param 2 | Runtime | Baked | |
Vector Param 1 | Runtime | Baked | |
Vector Param 2 | Runtime | Baked | |
Coord Type | |||
| |||
Return Type | |||
| |||
Context Type | |||
|
Inputs
-
Input Field 1
: (optional)- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
Context
MaterialContext
CameraContext
LightContext
RayContext
ParticleContext
VertexContext
PixelContext
- Return Types:
float
vec4
Sdf
Volume
Ray
Light
Particle
- Coordinate Types:
-
Input Field 2
: (optional)- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
Context
MaterialContext
CameraContext
LightContext
RayContext
ParticleContext
VertexContext
PixelContext
- Return Types:
float
vec4
Sdf
Volume
Ray
Light
Particle
- Coordinate Types:
-
Input Field 3
: (optional)- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
Context
MaterialContext
CameraContext
LightContext
RayContext
ParticleContext
VertexContext
PixelContext
- Return Types:
float
vec4
Sdf
Volume
Ray
Light
Particle
- Coordinate Types:
-
Input Field 4
: (optional)- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
Context
MaterialContext
CameraContext
LightContext
RayContext
ParticleContext
VertexContext
PixelContext
- Return Types:
float
vec4
Sdf
Volume
Ray
Light
Particle
- Coordinate Types: