diff --git a/devel/build/buildAsyncExt.py b/devel/build/buildAsyncExt.py
index f33ab8861..2afcd5f61 100644
--- a/devel/build/buildAsyncExt.py
+++ b/devel/build/buildAsyncExt.py
@@ -324,6 +324,7 @@ async def _processOperator(self, comp: COMP):
self.context.resetCustomPars(comp)
self.context.lockROPPars(comp)
await self._processOperatorSubCompChildren(comp)
+ self.context.consolidateOperatorPythonModules(comp)
if not comp.isPanel:
comp.showCustomOnly = True
self.log('Updating OP image for ' + comp.path)
@@ -408,7 +409,7 @@ async def _consolidateSharedPythonMods(self):
async def _removeAllBuildExcludeOps(self, scope: COMP):
self.log(f'Removing buildExclude ops in {scope}')
toRemove = scope.findChildren(tags=[RaytkTags.buildExclude.name], includeUtility=True)
- chunks = [list(chunk) for chunk in chunked_iterable(toRemove, 30)]
+ chunks = [list(chunk) for chunk in chunked_iterable(toRemove, 100)]
self.log(f'Found {len(toRemove)} ops to remove in {len(chunks)} chunks')
total = len(chunks)
for i in range(total):
diff --git a/devel/components/misc/misc.tox b/devel/components/misc/misc.tox
index 1eb6f164d..b525be03e 100644
Binary files a/devel/components/misc/misc.tox and b/devel/components/misc/misc.tox differ
diff --git a/devel/devel.tox b/devel/devel.tox
index 21b541a76..9be66e847 100644
Binary files a/devel/devel.tox and b/devel/devel.tox differ
diff --git a/devel/profiler/profiler.py b/devel/profiler/profiler.py
new file mode 100644
index 000000000..91c101b49
--- /dev/null
+++ b/devel/profiler/profiler.py
@@ -0,0 +1,9 @@
+# noinspection PyUnreachableCode
+if False:
+ # noinspection PyUnresolvedReferences
+ from _stubs import *
+ from _typeAliases import *
+
+class Profiler:
+ def __init__(self, ownerComp: COMP):
+ self.ownerComp = ownerComp
diff --git a/devel/profiler/profiler.tox b/devel/profiler/profiler.tox
new file mode 100644
index 000000000..1b7c9cd71
Binary files /dev/null and b/devel/profiler/profiler.tox differ
diff --git a/devel/streamer/streamer.tox b/devel/streamer/streamer.tox
deleted file mode 100644
index c9dd347ff..000000000
Binary files a/devel/streamer/streamer.tox and /dev/null differ
diff --git a/devel/toolkitEditor/mainMenu/mainMenu.py b/devel/toolkitEditor/mainMenu/mainMenu.py
index 32cbdac08..6e7dea77c 100644
--- a/devel/toolkitEditor/mainMenu/mainMenu.py
+++ b/devel/toolkitEditor/mainMenu/mainMenu.py
@@ -95,6 +95,12 @@ def __init__(self, ownerComp: COMP):
menuName='Tools',
action=lambda: ext.toolkitEditor.saveAllROPs(incrementVersion=True),
),
+ _MenuItem(
+ 'updateAllShaderLibraries',
+ 'Update All Shader Libraries',
+ menuName='Tools',
+ action=lambda: ext.toolkitEditor.updateAllShaderLibraries(),
+ ),
],
}
diff --git a/devel/toolkitEditor/toolkitEditor.py b/devel/toolkitEditor/toolkitEditor.py
index 0061f606a..156f18c9e 100644
--- a/devel/toolkitEditor/toolkitEditor.py
+++ b/devel/toolkitEditor/toolkitEditor.py
@@ -26,3 +26,13 @@ def saveAllROPSpecs():
def saveAllROPs(self, incrementVersion):
RaytkTools().saveAllROPs(incrementVersion)
+
+ def updateAllShaderLibraries(self):
+ for area in ops('/raytk', '/devel', '/toolkitEditor'):
+ if not area:
+ continue
+ for comp in area.findChildren(name='shaderLibraries'):
+ for dat in comp.findChildren(type=DAT, depth=1):
+ if dat.par['syncfile'] or dat.par['loadonstartpulse'] is None:
+ continue
+ dat.par.loadonstartpulse.pulse()
diff --git a/devel/workArea/workArea.tox b/devel/workArea/workArea.tox
index 08011e4bf..29863272b 100644
Binary files a/devel/workArea/workArea.tox and b/devel/workArea/workArea.tox differ
diff --git a/docs/_data/toolkit.yaml b/docs/_data/toolkit.yaml
index 077d4693e..6b36845e8 100644
--- a/docs/_data/toolkit.yaml
+++ b/docs/_data/toolkit.yaml
@@ -1 +1 @@
-toolkitVersion: '0.40'
+toolkitVersion: '0.41'
diff --git a/docs/_layouts/operatorCategory.html b/docs/_layouts/operatorCategory.html
index 6865bd50d..d8daf15f6 100644
--- a/docs/_layouts/operatorCategory.html
+++ b/docs/_layouts/operatorCategory.html
@@ -17,19 +17,27 @@
Operators
-
+
{% for op in page.cat.operators %}
- -
- {% if op.thumb %}
-
- {% endif %}
-
- {{ op.name }}
-
:
- {% if op.status %}
- {{ op.status }}
- {% endif %}
- {{ op.summary }}
-
+
+
+ {% if op.thumb %}
+
+ {% else %}
+
+ {% endif %}
+ |
+
+
+ {{ op.name }}
+
+ {% if op.status %}
+ {{ op.status }}
+ {% endif %}
+ |
+
+ {{ op.summary }}
+ |
+
{% endfor %}
-
+
diff --git a/docs/_reference/operators/camera/index.md b/docs/_reference/operators/camera/index.md
index 0f8b20878..bc524baf6 100644
--- a/docs/_reference/operators/camera/index.md
+++ b/docs/_reference/operators/camera/index.md
@@ -33,6 +33,7 @@ cat:
name: fisheyeCamera
summary: A 360 fisheye camera, that shows all directions from a specific point
in space.
+ thumb: assets/images/reference/operators/camera/fisheyeCamera_thumb.png
- name: linkedCamera
summary: A camera that is linked to an existing TD Camera COMP.
- name: lookAtCamera
@@ -46,6 +47,7 @@ cat:
- name: splitCamera
summary: A camera that splits the viewport into several zones, each using a separate
camera.
+ thumb: assets/images/reference/operators/camera/splitCamera_thumb.png
summary: 'Operators that are used in raymarching to determine which
direction rays should travel, effectively behaving as cameras.'
diff --git a/docs/_reference/operators/combine/index.md b/docs/_reference/operators/combine/index.md
index bab2cf375..9875f926b 100644
--- a/docs/_reference/operators/combine/index.md
+++ b/docs/_reference/operators/combine/index.md
@@ -16,6 +16,7 @@ cat:
summary: Adds the values of multiple fields.
- name: arrange
summary: Combines multiple SDFs, with a different position for each.
+ thumb: assets/images/reference/operators/combine/arrange_thumb.png
- name: boundLimit
status: beta
- keywords:
@@ -27,6 +28,7 @@ cat:
shortcuts:
- cmb
summary: Combines SDFs in various ways.
+ thumb: assets/images/reference/operators/combine/combine_thumb.png
- name: combineFields
summary: Combines float or vector fields using one of several mathematical operations.
- name: composeSdf
@@ -35,31 +37,43 @@ cat:
SDF.
- name: compositeFields
summary: Combines two vector fields using color compositing.
+ thumb: assets/images/reference/operators/combine/compositeFields_thumb.png
- name: edgeCombine
summary: Combines two SDFs in ways that use the intersection areas.
+ thumb: assets/images/reference/operators/combine/edgeCombine_thumb.png
- name: iterationSwitch
summary: Switches between inputs based on the iteration value provided by a downstream
operator.
+ thumb: assets/images/reference/operators/combine/iterationSwitch_thumb.png
- name: layoutGrid
summary: Slices space into a grid, and places each input in a separate cell.
+ thumb: assets/images/reference/operators/combine/layoutGrid_thumb.png
- name: mergeFields
summary: Merges multiple vector fields, using different fields for each vector
part.
+ - name: mixFields
+ status: beta
- name: shapedCombine
summary: Combine two SDFs, using a 2D SDF to shape the blending region.
- name: simpleDiff
+ status: deprecated
summary: Combines two SDFs using the difference operator.
+ thumb: assets/images/reference/operators/combine/simpleDiff_thumb.png
- name: simpleIntersect
+ status: deprecated
summary: Combines SDFs using the intersect operator.
+ thumb: assets/images/reference/operators/combine/simpleIntersect_thumb.png
- name: simpleUnion
shortcuts:
- su
+ status: deprecated
summary: Combines several SDFs using the union operator.
+ thumb: assets/images/reference/operators/combine/simpleUnion_thumb.png
- keywords:
- blend
name: switch
- summary: Switches between several inputs, without the need to rebuild the shader,
- allowing for fast switching.
+ summary: Switches or blends between several inputs, without the need to rebuild
+ the shader, allowing for fast switching.
- name: triPlanarCombine
status: beta
summary: Combines three 2D fields based on vectors like surface normals.
diff --git a/docs/_reference/operators/combine/mixFields.md b/docs/_reference/operators/combine/mixFields.md
new file mode 100644
index 000000000..e539ead8a
--- /dev/null
+++ b/docs/_reference/operators/combine/mixFields.md
@@ -0,0 +1,263 @@
+---
+layout: operator
+title: mixFields
+parent: Combine Operators
+grand_parent: Operators
+permalink: /reference/operators/combine/mixFields
+redirect_from:
+ - /reference/opType/raytk.operators.combine.mixFields/
+op:
+ category: combine
+ inputs:
+ - contextTypes:
+ - Context
+ - MaterialContext
+ - CameraContext
+ - LightContext
+ - RayContext
+ - ParticleContext
+ - VertexContext
+ - PixelContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ - vec4
+ label: Field 1
+ name: definition_in_1
+ returnTypes:
+ - float
+ - contextTypes:
+ - Context
+ - MaterialContext
+ - CameraContext
+ - LightContext
+ - RayContext
+ - ParticleContext
+ - VertexContext
+ - PixelContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ - vec4
+ label: Field 2
+ name: definition_in_2
+ returnTypes:
+ - float
+ supportedVariableInputs:
+ - inputOp1
+ - contextTypes:
+ - Context
+ - MaterialContext
+ - CameraContext
+ - LightContext
+ - RayContext
+ - ParticleContext
+ - VertexContext
+ - PixelContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ - vec4
+ label: Field 3
+ name: definition_in_3
+ returnTypes:
+ - float
+ supportedVariableInputs:
+ - inputOp[1-2]
+ - contextTypes:
+ - Context
+ - MaterialContext
+ - CameraContext
+ - LightContext
+ - RayContext
+ - ParticleContext
+ - VertexContext
+ - PixelContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ - vec4
+ label: Field 4
+ name: definition_in_4
+ returnTypes:
+ - float
+ supportedVariableInputs:
+ - inputOp[1-3]
+ - contextTypes:
+ - Context
+ - MaterialContext
+ - CameraContext
+ - LightContext
+ - RayContext
+ - ParticleContext
+ - VertexContext
+ - PixelContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ - vec4
+ label: Field 5
+ name: definition_in_5
+ returnTypes:
+ - float
+ supportedVariableInputs:
+ - inputOp[1-4]
+ - contextTypes:
+ - Context
+ - MaterialContext
+ - CameraContext
+ - LightContext
+ - RayContext
+ - ParticleContext
+ - VertexContext
+ - PixelContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ - vec4
+ label: Field 6
+ name: definition_in_6
+ returnTypes:
+ - float
+ supportedVariableInputs:
+ - inputOp[1-5]
+ - contextTypes:
+ - Context
+ - MaterialContext
+ - CameraContext
+ - LightContext
+ - RayContext
+ - ParticleContext
+ - VertexContext
+ - PixelContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ - vec4
+ label: Field 7
+ name: definition_in_7
+ returnTypes:
+ - float
+ supportedVariableInputs:
+ - inputOp[1-6]
+ - contextTypes:
+ - Context
+ - MaterialContext
+ - CameraContext
+ - LightContext
+ - RayContext
+ - ParticleContext
+ - VertexContext
+ - PixelContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ - vec4
+ label: Field 8
+ name: definition_in_8
+ returnTypes:
+ - float
+ supportedVariableInputs:
+ - inputOp[1-7]
+ name: mixFields
+ opType: raytk.operators.combine.mixFields
+ parameters:
+ - label: Combine Mode
+ menuOptions:
+ - label: Additive
+ name: add
+ - label: Weighted Average
+ name: weighted
+ name: Combinemode
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Return Type
+ menuOptions:
+ - label: Float
+ name: float
+ - label: Vector
+ name: vec4
+ name: Returntype
+ - label: Default Value
+ name: Defaultvalue
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Default Level
+ name: Defaultlevel
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Enable 1
+ name: Enable1
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Level 1
+ name: Level1
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Enable 2
+ name: Enable2
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Level 2
+ name: Level2
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Enable 3
+ name: Enable3
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Level 3
+ name: Level3
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Enable 4
+ name: Enable4
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Level 4
+ name: Level4
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Enable 5
+ name: Enable5
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Level 5
+ name: Level5
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Enable 6
+ name: Enable6
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Level 6
+ name: Level6
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Enable 7
+ name: Enable7
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Level 7
+ name: Level7
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Enable 8
+ name: Enable8
+ readOnlyHandling: baked
+ regularHandling: runtime
+ - label: Level 8
+ name: Level8
+ readOnlyHandling: baked
+ regularHandling: runtime
+ status: beta
+
+---
diff --git a/docs/_reference/operators/combine/simpleDiff.md b/docs/_reference/operators/combine/simpleDiff.md
index b5f967fa3..34497163e 100644
--- a/docs/_reference/operators/combine/simpleDiff.md
+++ b/docs/_reference/operators/combine/simpleDiff.md
@@ -67,6 +67,7 @@ op:
readOnlyHandling: baked
regularHandling: runtime
summary: Swaps the two inputs, subtracting the first from the second.
+ status: deprecated
summary: Combines two SDFs using the difference operator.
thumb: assets/images/reference/operators/combine/simpleDiff_thumb.png
diff --git a/docs/_reference/operators/combine/simpleIntersect.md b/docs/_reference/operators/combine/simpleIntersect.md
index d9f81c02e..e59a17db8 100644
--- a/docs/_reference/operators/combine/simpleIntersect.md
+++ b/docs/_reference/operators/combine/simpleIntersect.md
@@ -181,6 +181,7 @@ op:
parameters:
- label: Enable
name: Enable
+ status: deprecated
summary: Combines SDFs using the intersect operator.
thumb: assets/images/reference/operators/combine/simpleIntersect_thumb.png
diff --git a/docs/_reference/operators/combine/simpleUnion.md b/docs/_reference/operators/combine/simpleUnion.md
index 9abef80c1..2b47eac66 100644
--- a/docs/_reference/operators/combine/simpleUnion.md
+++ b/docs/_reference/operators/combine/simpleUnion.md
@@ -183,6 +183,7 @@ op:
name: Enable
shortcuts:
- su
+ status: deprecated
summary: Combines several SDFs using the union operator.
thumb: assets/images/reference/operators/combine/simpleUnion_thumb.png
diff --git a/docs/_reference/operators/combine/switch.md b/docs/_reference/operators/combine/switch.md
index 899bcf06c..f7be18e35 100644
--- a/docs/_reference/operators/combine/switch.md
+++ b/docs/_reference/operators/combine/switch.md
@@ -233,19 +233,25 @@ op:
name: Blend
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Whether to blend between inputs.
- label: Index Field
name: Indexfield
+ summary: Field that can provide index values instead of using the parameter.
- label: Index Mode
menuOptions:
- - label: Index (0 .. N-1)
+ - description: First is 0, second is 1, and so on.
+ label: Index (0 .. N-1)
name: zeroindex
- - label: Index (1 .. N)
+ - description: First is 1, second is 2, and so on.
+ label: Index (1 .. N)
name: oneindex
- - label: Normalized (0 .. 1)
+ - description: Scaled to a 0..1 range, so 0 is the first and 1 is the last.
+ label: Normalized (0 .. 1)
name: norm
name: Indexmode
readOnlyHandling: baked
regularHandling: runtime
+ summary: How to map index values to inputs.
- label: Extend
menuOptions:
- label: Clamp
@@ -257,12 +263,14 @@ op:
name: Extend
readOnlyHandling: baked
regularHandling: runtime
- summary: Switches between several inputs, without the need to rebuild the shader,
- allowing for fast switching.
+ summary: How to handle indices that are outside the expected range based on the
+ selected Index Mode.
+ summary: Switches or blends between several inputs, without the need to rebuild
+ the shader, allowing for fast switching.
---
-Switches between several inputs, without the need to rebuild the shader, allowing for fast switching.
+Switches or blends between several inputs, without the need to rebuild the shader, allowing for fast switching.
Note that inputs that are not connected are skipped over when assigning numbers to them, so if inputs 1, 2, and 4 are connected, they will use indices 0, 1, 2.
\ No newline at end of file
diff --git a/docs/_reference/operators/convert/index.md b/docs/_reference/operators/convert/index.md
index d3c1c9992..09f102cb3 100644
--- a/docs/_reference/operators/convert/index.md
+++ b/docs/_reference/operators/convert/index.md
@@ -19,6 +19,7 @@ cat:
shortcuts:
- ext
summary: Creates a 3D SDF by extruding a 2D SDF along along an axis.
+ thumb: assets/images/reference/operators/convert/extrude_thumb.png
- name: extrudeLine
status: beta
summary: Extrudes a 2D SDF cross-section into a 3D volume, like the extrude operator,
@@ -35,15 +36,17 @@ cat:
summary: Projects coordinates into various types of polar spaces.
- name: revolve
summary: Creates a 3D SDF by revolving a 2D cross-section SDF around an axis.
+ thumb: assets/images/reference/operators/convert/revolve_thumb.png
- name: sampleAlongLine
status: beta
summary: Samples a 2D/3D input along a single line, producing a 1D function.
- name: sweep
summary: Creates a 3D SDF by sweeping a 2D SDF along the surface of another 2D
SDF.
+ thumb: assets/images/reference/operators/convert/sweep_thumb.png
- name: vectorToFloat
- summary: Converts a vector value field to a float field using one part of the
- vector.
+ summary: Converts a vector value field to a float field, e.g. using one part of
+ the vector.
summary: 'Operators that convert between different types of coordinates and
return types (SDF, float/vector field, etc).'
diff --git a/docs/_reference/operators/convert/vectorToFloat.md b/docs/_reference/operators/convert/vectorToFloat.md
index 145d9d255..da28f9c28 100644
--- a/docs/_reference/operators/convert/vectorToFloat.md
+++ b/docs/_reference/operators/convert/vectorToFloat.md
@@ -43,53 +43,71 @@ op:
name: z
- label: W / Alpha
name: w
- - label: Length(XY)
+ - description: Use the length of the XY parts of the vector.
+ label: Length(XY)
name: lengthxy
- - description: Use the length of the XYZ part of the vector.
+ - description: Use the length of the XYZ parts of the vector.
label: Length(XYZ)
name: lengthxyz
- description: Use the length of all 4 parts of the vector.
label: Length(XYZW)
name: lengthxyzw
- - label: Minimum(XY)
+ - description: Minimum of the X and Y.
+ label: Minimum(XY)
name: minxy
- - label: Minimum(XYZ)
+ - description: Minimum of the X, Y, and Z.
+ label: Minimum(XYZ)
name: minxyz
- - label: Minimum(XYZW)
+ - description: Minimum of all 4 parts.
+ label: Minimum(XYZW)
name: minxyzw
- - label: Maximum(XY)
+ - description: Maximum of the X and Y.
+ label: Maximum(XY)
name: maxxy
- - label: Maximum(XYZ)
+ - description: Maximum of the X, Y, and Z.
+ label: Maximum(XYZ)
name: maxxyz
- - label: Maximum(XYZW)
+ - description: Maximum of all 4 parts.
+ label: Maximum(XYZW)
name: maxxyzw
- - label: Average(XY)
+ - description: Average of X and Y.
+ label: Average(XY)
name: avgxy
- - label: Average(XYZ)
+ - description: Average of X, Y, and Z.
+ label: Average(XYZ)
name: avgxyz
- - label: Average(XYZW)
+ - description: Average of all 4 parts.
+ label: Average(XYZW)
name: avgxyzw
- - label: Hue
+ - description: Treat the vector as an RGB color and get the hue.
+ label: Hue
name: hue
- - label: Saturation
+ - description: Treat the vector as an RGB color and get the saturation.
+ label: Saturation
name: sat
- - label: Value
+ - description: Treat the vector as an RGB color and get the value (as in HSV).
+ label: Value
name: val
- - label: Luminance
+ - description: Treat the vector as an RGB color and get the luminance.
+ label: Luminance
name: luma
- - label: Sum(XY)
+ - description: Add the X and Y parts.
+ label: Sum(XY)
name: sumxy
- - label: Sum(XYZ)
+ - description: Add the X, Y, and Z parts.
+ label: Sum(XYZ)
name: sumxyz
- - label: Sum(XYZW)
+ - description: Add all 4 parts.
+ label: Sum(XYZW)
name: sumxyzw
name: Usepart
readOnlyHandling: semibaked
regularHandling: semibaked
summary: Which part of the vector to use for the float field.
- summary: Converts a vector value field to a float field using one part of the vector.
+ summary: Converts a vector value field to a float field, e.g. using one part of
+ the vector.
---
-Converts a vector value field to a float field using one part of the vector.
\ No newline at end of file
+Converts a vector value field to a float field, e.g. using one part of the vector.
\ No newline at end of file
diff --git a/docs/_reference/operators/field/blackbodyColorField.md b/docs/_reference/operators/field/blackbodyColorField.md
index 7807ad3a8..b8f200f90 100644
--- a/docs/_reference/operators/field/blackbodyColorField.md
+++ b/docs/_reference/operators/field/blackbodyColorField.md
@@ -8,6 +8,14 @@ redirect_from:
- /reference/opType/raytk.operators.field.blackbodyColorField/
op:
category: field
+ detail: 'The operator uses a temperature value, either from a parameter of an input
+ field, and determines the glow color that temperature would produce.
+
+
+ Based on [Tunnel Beauty](https://www.shadertoy.com/view/Mt3GW2) by aiekick.
+
+
+ Details on [wikipedia](https://en.wikipedia.org/wiki/Black_body).'
inputs:
- contextTypes:
- Context
@@ -35,19 +43,35 @@ op:
name: Temp
readOnlyHandling: baked
regularHandling: runtime
+ summary: Constant value to use for the temperature, everywhere in space. This
+ is only used if there is no input temperature field.
- label: Temperature Unit
menuOptions:
- - label: Normalized (0..1)
+ - description: Normalized to a 0..1 range.
+ label: Normalized (0..1)
name: norm
- - label: Degrees Kelvin
+ - description: Degrees kelvin.
+ label: Degrees Kelvin
name: deg
name: Tempunit
readOnlyHandling: baked
regularHandling: runtime
+ summary: How to interpret temperature values.
- label: Exponent
name: Exp
readOnlyHandling: baked
regularHandling: runtime
+ summary: Tighness of the transition curve from dark to light.
+ summary: Field that produces colors using a model of blackbody radiation from physics.
thumb: assets/images/reference/operators/field/blackbodyColorField_thumb.png
---
+
+
+Field that produces colors using a model of blackbody radiation from physics.
+
+The operator uses a temperature value, either from a parameter of an input field, and determines the glow color that temperature would produce.
+
+Based on [Tunnel Beauty](https://www.shadertoy.com/view/Mt3GW2) by aiekick.
+
+Details on [wikipedia](https://en.wikipedia.org/wiki/Black_body).
\ No newline at end of file
diff --git a/docs/_reference/operators/field/cellTileField.md b/docs/_reference/operators/field/cellTileField.md
index 58e085c8d..e2f3f58b1 100644
--- a/docs/_reference/operators/field/cellTileField.md
+++ b/docs/_reference/operators/field/cellTileField.md
@@ -8,7 +8,7 @@ redirect_from:
- /reference/opType/raytk.operators.field.cellTileField/
op:
category: field
- detail: 'Based on Biomine by Shane (https://www.shadertoy.com/view/4lyGzR).
+ detail: 'Based on [Biomine](https://www.shadertoy.com/view/4lyGzR) by Shane.
Uses a minimum blend at various 3D locations on a cubic tile. Make the tile wrappable
by ensuring the objects wrap around the edges.
@@ -78,6 +78,6 @@ op:
A value field that provides an approximation of repeating cellular (voronoi) noise.
-Based on Biomine by Shane (https://www.shadertoy.com/view/4lyGzR).
+Based on [Biomine](https://www.shadertoy.com/view/4lyGzR) by Shane.
Uses a minimum blend at various 3D locations on a cubic tile. Make the tile wrappable by ensuring the objects wrap around the edges.
It isn't perfect but it is low cost.
\ No newline at end of file
diff --git a/docs/_reference/operators/field/hashField.md b/docs/_reference/operators/field/hashField.md
index c3e33ecca..5dc8270c3 100644
--- a/docs/_reference/operators/field/hashField.md
+++ b/docs/_reference/operators/field/hashField.md
@@ -8,6 +8,28 @@ redirect_from:
- /reference/opType/raytk.operators.field.hashField/
op:
category: field
+ detail: "This should typically be used with an input that provides numbers that\
+ \ the randomization should be based on, but it can be used without an input in\
+ \ which case it uses spatial position as the basis.\n\nA typical use case for\
+ \ this operator would be something like randomizing a property within each cell\
+ \ of a `modulo2D`. The cell coordinates, accessed using a `variableReference`,\
+ \ would be passed into the `hashField`, which would produce random numbers that\
+ \ could be mapped to control the radius of a cylinder for example.\n\nThe available\
+ \ hash functions have different types of inputs and outputs. Some take a single\
+ \ number input and produce a single number. Others take a single number and produce\
+ \ vectors. And still others take in a vector with multiple parts to produce single\
+ \ numbers, etc.\n\nEach hash function has a different range of values that it\
+ \ will produce. Their labels in the parameter menu contain information about how\
+ \ they behave.\n\nThe label suffixes are in the format `( -> )`,\
+ \ where the first part is the type of coordinates or input value that it uses\
+ \ and the second is the type of value that it produces.\n\nTypes labeled `X` mean\
+ \ it only uses/produces a single number, the X part of vectors.\n\nTypes labeled\
+ \ `XYZ` mean it uses/produces 3 parts of vectors.\n\nTypes marked with `[U]` mean\
+ \ unsigned integers, which treat all negative numbers as zero, and produce whole\
+ \ numbers ranging from 0 to 4294967295. \n\nTypes without `[U]` mean floats, which\
+ \ can be any number. For outputs, that typically means a 0..1 or -1..1 range.\n\
+ \nBased on [Hash Functions for GPU Rendering](https://www.shadertoy.com/view/XlGcRh)\
+ \ by markjarzynski.\n\nMore details avaiable [here](http://jcgt.org/published/0009/03/02/)."
inputs:
- contextTypes:
- Context
@@ -148,5 +170,31 @@ op:
name: vec4
name: Coordtype
status: beta
+ summary: Advanced field that produces randomized values.
---
+
+
+Advanced field that produces randomized values.
+
+This should typically be used with an input that provides numbers that the randomization should be based on, but it can be used without an input in which case it uses spatial position as the basis.
+
+A typical use case for this operator would be something like randomizing a property within each cell of a `modulo2D`. The cell coordinates, accessed using a `variableReference`, would be passed into the `hashField`, which would produce random numbers that could be mapped to control the radius of a cylinder for example.
+
+The available hash functions have different types of inputs and outputs. Some take a single number input and produce a single number. Others take a single number and produce vectors. And still others take in a vector with multiple parts to produce single numbers, etc.
+
+Each hash function has a different range of values that it will produce. Their labels in the parameter menu contain information about how they behave.
+
+The label suffixes are in the format `( -> )`, where the first part is the type of coordinates or input value that it uses and the second is the type of value that it produces.
+
+Types labeled `X` mean it only uses/produces a single number, the X part of vectors.
+
+Types labeled `XYZ` mean it uses/produces 3 parts of vectors.
+
+Types marked with `[U]` mean unsigned integers, which treat all negative numbers as zero, and produce whole numbers ranging from 0 to 4294967295.
+
+Types without `[U]` mean floats, which can be any number. For outputs, that typically means a 0..1 or -1..1 range.
+
+Based on [Hash Functions for GPU Rendering](https://www.shadertoy.com/view/XlGcRh) by markjarzynski.
+
+More details avaiable [here](http://jcgt.org/published/0009/03/02/).
\ No newline at end of file
diff --git a/docs/_reference/operators/field/index.md b/docs/_reference/operators/field/index.md
index 170e4a1ee..a90d5b56a 100644
--- a/docs/_reference/operators/field/index.md
+++ b/docs/_reference/operators/field/index.md
@@ -16,18 +16,25 @@ cat:
operators:
- name: atmosphereField
summary: Field that simulates a sun and sky.
+ thumb: assets/images/reference/operators/field/atmosphereField_thumb.png
- name: axisDistanceField
summary: A float field that provides the distance from a specific point along
a single axis.
+ thumb: assets/images/reference/operators/field/axisDistanceField_thumb.png
- name: bandField
summary: Field that applies values based on a band/slice of an axis.
+ thumb: assets/images/reference/operators/field/bandField_thumb.png
- name: blackbodyColorField
+ summary: Field that produces colors using a model of blackbody radiation from
+ physics.
+ thumb: assets/images/reference/operators/field/blackbodyColorField_thumb.png
- keywords:
- cellular
- voronoi
name: cellTileField
summary: A value field that provides an approximation of repeating cellular (voronoi)
noise.
+ thumb: assets/images/reference/operators/field/cellTileField_thumb.png
- name: chopField
summary: Field that provides values from a CHOP.
- keywords:
@@ -36,82 +43,119 @@ cat:
- ramp
name: colorRampField
summary: A vector field that maps an input field to values from a range of colors.
+ thumb: assets/images/reference/operators/field/colorRampField_thumb.png
- name: colorSwitchField
summary: Switches or fades between a list of colors based on an index field.
- name: constantColorField
summary: A vector field that evaluates to a constant color value.
+ thumb: assets/images/reference/operators/field/constantColorField_thumb.png
- name: constantField
summary: A float or vector field that evaluates to a constant value.
+ thumb: assets/images/reference/operators/field/constantField_thumb.png
- name: constantSwitchField
summary: Switches or blends between constant values based on an index field.
- name: curlNoiseField
summary: Curl noise field.
+ thumb: assets/images/reference/operators/field/curlNoiseField_thumb.png
- name: dataTextureField
summary: Accesses data from a texture with the same layout as the renderer.
- name: domainColorField
status: beta
+ thumb: assets/images/reference/operators/field/domainColorField_thumb.png
- name: hashField
status: beta
+ summary: Advanced field that produces randomized values.
- name: hsvColorField
summary: A field that uses HSV-based parameters to produce colors.
+ thumb: assets/images/reference/operators/field/hsvColorField_thumb.png
- name: iterationField
summary: Field that returns the current iteration, from a downstream OP.
- name: magnetField
status: beta
+ thumb: assets/images/reference/operators/field/magnetField_thumb.png
- name: metaballField
summary: Metaball value field.
+ thumb: assets/images/reference/operators/field/metaballField_thumb.png
- name: multiPointDistanceField
summary: A vector field that provides the distance from 4 specific points in space
(one for each part of the vector).
+ thumb: assets/images/reference/operators/field/multiPointDistanceField_thumb.png
- name: nearestRingPointField
+ thumb: assets/images/reference/operators/field/nearestRingPointField_thumb.png
- name: noiseField
summary: A float or vector field that uses one of several noise functions.
+ thumb: assets/images/reference/operators/field/noiseField_thumb.png
- name: normalField
status: deprecated
summary: Vector field that produces the surface normal where it is evaluated.
+ thumb: assets/images/reference/operators/field/normalField_thumb.png
- name: pointDistanceField
summary: A float field that provides the distance from a specific point in space
from either the current position or from another point.
+ thumb: assets/images/reference/operators/field/pointDistanceField_thumb.png
- name: polarCoordField
summary: A field that produces various types of polar coordinates.
+ thumb: assets/images/reference/operators/field/polarCoordField_thumb.png
- name: polarVectorField
+ thumb: assets/images/reference/operators/field/polarVectorField_thumb.png
- name: positionField
shortcuts:
- pos
summary: A vector field that produces the coordinates in space where it is checked.
+ thumb: assets/images/reference/operators/field/positionField_thumb.png
- name: rampField
status: beta
+ summary: Field that produces values that fade from one value to another along
+ an axis or line.
+ thumb: assets/images/reference/operators/field/rampField_thumb.png
- name: rayField
summary: Field that provides the ray direction or origin.
+ thumb: assets/images/reference/operators/field/rayField_thumb.png
- name: reorderField
- name: sdfField
summary: Value field based on an SDF shape.
+ thumb: assets/images/reference/operators/field/sdfField_thumb.png
- name: sdfNormalField
status: beta
+ thumb: assets/images/reference/operators/field/sdfNormalField_thumb.png
- name: spectralColorField
+ summary: Produces colors using rainbow spectrum patterns.
+ thumb: assets/images/reference/operators/field/spectralColorField_thumb.png
- name: stepField
summary: A field that switches between two values at a threshold point.
+ thumb: assets/images/reference/operators/field/stepField_thumb.png
- keywords:
- fbm
- landscape
name: terrainNoiseField
status: beta
+ summary: Noise that uses fBm (fractal brownian motion), which can work well for
+ surface offsetting for terrain.
+ thumb: assets/images/reference/operators/field/terrainNoiseField_thumb.png
- name: texture1dField
status: beta
- name: texture3dField
+ thumb: assets/images/reference/operators/field/texture3dField_thumb.png
- name: textureField
summary: A float or vector field that looks up values from a texture.
+ thumb: assets/images/reference/operators/field/textureField_thumb.png
- name: triPlanarTextureField
summary: Texture field that uses surface normals (or other blending techniques)
to apply a texture facing each axis.
+ thumb: assets/images/reference/operators/field/triPlanarTextureField_thumb.png
- name: uvField
summary: Field that produces surface UV coordinates, if available.
+ thumb: assets/images/reference/operators/field/uvField_thumb.png
- name: waveField
summary: A field that uses a periodic wave.
+ thumb: assets/images/reference/operators/field/waveField_thumb.png
- name: waveVectorField
status: beta
+ thumb: assets/images/reference/operators/field/waveVectorField_thumb.png
- name: waveletNoiseField
+ thumb: assets/images/reference/operators/field/waveletNoiseField_thumb.png
- name: worleyNoiseField
+ thumb: assets/images/reference/operators/field/worleyNoiseField_thumb.png
summary: Float or vector fields, which provide values for the requested coordinates.
---
diff --git a/docs/_reference/operators/field/rampField.md b/docs/_reference/operators/field/rampField.md
index 2947610fa..2f7a4cb95 100644
--- a/docs/_reference/operators/field/rampField.md
+++ b/docs/_reference/operators/field/rampField.md
@@ -94,6 +94,7 @@ op:
- label: Endpoints
name: points
name: Coordmode
+ summary: Whether to specify the ends of the ramp using an axis or arbitrary points.
- label: Axis
menuOptions:
- label: X
@@ -107,18 +108,22 @@ op:
name: Axis
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Which axis of the position (or coord input) the ramp should use.
- label: Coordinate Range
name: Range
readOnlyHandling: baked
regularHandling: runtime
+ summary: The start and end of the ramp along the chosen axis.
- label: Point 1
name: Point1
readOnlyHandling: baked
regularHandling: runtime
+ summary: The start point when using arbitrary points.
- label: Point 2
name: Point2
readOnlyHandling: baked
regularHandling: runtime
+ summary: The ened point when using arbitrary points.
- label: Extend Mode
menuOptions:
- label: Hold
@@ -132,6 +137,7 @@ op:
name: Extendmode
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: How to handle points outside the specified range.
- label: Return Type
menuOptions:
- label: Float
@@ -139,14 +145,19 @@ op:
- label: Vector
name: vec4
name: Returntype
+ summary: What type of values to produce (single number floats or vectors).
- label: Value 1
name: Value1
readOnlyHandling: baked
regularHandling: runtime
+ summary: The value at the start of the ramp. If in float mode only the first part
+ is used.
- label: Value 2
name: Value2
readOnlyHandling: baked
regularHandling: runtime
+ summary: The value at the end of the ramp. If in float mode only the first part
+ is used.
- label: Coord Type
menuOptions:
- label: Auto
@@ -159,6 +170,11 @@ op:
name: vec3
name: Coordtype
status: beta
+ summary: Field that produces values that fade from one value to another along an
+ axis or line.
thumb: assets/images/reference/operators/field/rampField_thumb.png
---
+
+
+Field that produces values that fade from one value to another along an axis or line.
\ No newline at end of file
diff --git a/docs/_reference/operators/field/spectralColorField.md b/docs/_reference/operators/field/spectralColorField.md
index 7291cc9ec..fb30452a2 100644
--- a/docs/_reference/operators/field/spectralColorField.md
+++ b/docs/_reference/operators/field/spectralColorField.md
@@ -8,6 +8,12 @@ redirect_from:
- /reference/opType/raytk.operators.field.spectralColorField/
op:
category: field
+ detail: 'There are several spectrum types to choose from which balance the colors
+ in different ways.
+
+
+ The field will produce a color based on either the Wavelength parameter, or values
+ from the wavelength input field.'
inputs:
- contextTypes:
- Context
@@ -27,6 +33,7 @@ op:
name: wavelengthField
returnTypes:
- float
+ summary: Field that provides the wavelengths that the colors are based on.
name: spectralColorField
opType: raytk.operators.field.spectralColorField
parameters:
@@ -34,15 +41,20 @@ op:
name: Wavelength
readOnlyHandling: baked
regularHandling: runtime
+ summary: Constant value to use as the wavelength to map to a color. This is only
+ used when there is no wavelength input field.
- label: Wavelength Unit
menuOptions:
- - label: Normalized (0..1)
+ - description: Normalized to a 0..1 range.
+ label: Normalized (0..1)
name: norm
- - label: Nanometer (400..700)
+ - description: Nanometers.
+ label: Nanometer (400..700)
name: nm
name: Wavelengthunit
readOnlyHandling: baked
regularHandling: runtime
+ summary: How wavelength values should be interpreted.
- label: Spectrum Type
menuOptions:
- label: Zucconi
@@ -60,6 +72,14 @@ op:
name: Spectrumtype
readOnlyHandling: baked
regularHandling: runtime
+ summary: Produces colors using rainbow spectrum patterns.
thumb: assets/images/reference/operators/field/spectralColorField_thumb.png
---
+
+
+Produces colors using rainbow spectrum patterns.
+
+There are several spectrum types to choose from which balance the colors in different ways.
+
+The field will produce a color based on either the Wavelength parameter, or values from the wavelength input field.
\ No newline at end of file
diff --git a/docs/_reference/operators/field/terrainNoiseField.md b/docs/_reference/operators/field/terrainNoiseField.md
index ba538f6d5..42fcb38e7 100644
--- a/docs/_reference/operators/field/terrainNoiseField.md
+++ b/docs/_reference/operators/field/terrainNoiseField.md
@@ -8,6 +8,11 @@ redirect_from:
- /reference/opType/raytk.operators.field.terrainNoiseField/
op:
category: field
+ detail: 'Based on [Musgrave''s Noises Collection](https://www.shadertoy.com/view/4sXXW2)
+ by xbe.
+
+
+ See also http://www.classes.cs.uchicago.edu/archive/2014/winter/23700-1/project_4_and_5/MusgraveTerrain00.pdf.'
inputs:
- contextTypes:
- Context
@@ -190,10 +195,14 @@ op:
name: Increment
- label: Lacunarity
name: Lacunarity
+ summary: Gap between successive frequencies.
- label: Frequency
name: Frequency
+ summary: Density of the pattern (basically another Scale).
- label: Octaves
name: Octaves
+ summary: Number of layers of detail (frequencies used in the fBm). Larger values
+ produce more detail. Avoid values below 1.
- label: Step Offset
name: Stepoffset
- label: Gain
@@ -209,6 +218,15 @@ op:
regularHandling: runtime
summary: Offsets (adds to) the amount produced by the noise.
status: beta
+ summary: Noise that uses fBm (fractal brownian motion), which can work well for
+ surface offsetting for terrain.
thumb: assets/images/reference/operators/field/terrainNoiseField_thumb.png
---
+
+
+Noise that uses fBm (fractal brownian motion), which can work well for surface offsetting for terrain.
+
+Based on [Musgrave's Noises Collection](https://www.shadertoy.com/view/4sXXW2) by xbe.
+
+See also http://www.classes.cs.uchicago.edu/archive/2014/winter/23700-1/project_4_and_5/MusgraveTerrain00.pdf.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/adjustColor.md b/docs/_reference/operators/filter/adjustColor.md
index dc3526493..3ddf6671f 100644
--- a/docs/_reference/operators/filter/adjustColor.md
+++ b/docs/_reference/operators/filter/adjustColor.md
@@ -30,6 +30,7 @@ op:
returnTypes:
- vec4
- Sdf
+ - Light
- contextTypes:
- Context
- MaterialContext
diff --git a/docs/_reference/operators/filter/assignUV.md b/docs/_reference/operators/filter/assignUV.md
index e4b718187..3cc00b806 100644
--- a/docs/_reference/operators/filter/assignUV.md
+++ b/docs/_reference/operators/filter/assignUV.md
@@ -45,10 +45,11 @@ op:
- vec2
- vec3
- vec4
- label: UV Field
+ label: UV Field or SDF with UVs
name: uvField
returnTypes:
- vec4
+ - Sdf
summary: Optional field used to calculate the UV coordinates.
supportedVariableInputs:
- inputOp1
diff --git a/docs/_reference/operators/filter/cameraTransform.md b/docs/_reference/operators/filter/cameraTransform.md
index 089488742..6e4bda9c1 100644
--- a/docs/_reference/operators/filter/cameraTransform.md
+++ b/docs/_reference/operators/filter/cameraTransform.md
@@ -8,6 +8,8 @@ redirect_from:
- /reference/opType/raytk.operators.filter.cameraTransform/
op:
category: filter
+ detail: Similar to `lightTransform`, this operator is designed to work specifically
+ with cameras, including changes to direction and look at position.
inputs:
- contextTypes:
- CameraContext
@@ -46,14 +48,43 @@ op:
parameters:
- label: Enable
name: Enable
- - label: Translate
+ - label: Position Translate
name: Translate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Offset applied to the camera's origin position.
- label: Direction Rotate
name: Dirrotate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Rotation applied to the direction that the camera is facing. Note that
+ this does not impact the position of the camera.
+ - label: Look At Mode
+ menuOptions:
+ - description: The look at position should be moved by the same amount that the
+ main position is moved.
+ label: Include Position Translate
+ name: includepos
+ - description: The look at position should remain in place regardless of how the
+ main position moves.
+ label: Separate Translate Only
+ name: separate
+ name: Lookatmode
+ readOnlyHandling: semibaked
+ regularHandling: runtime
+ summary: Whether the look at position (if used) should be adjusted with the position
+ or remain stationary.
+ - label: Look At Translate
+ name: Lookattranslate
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Translation offset applied to only the look at position.
status: beta
+ summary: Specialized transform that can be applied to cameras.
---
+
+
+Specialized transform that can be applied to cameras.
+
+Similar to `lightTransform`, this operator is designed to work specifically with cameras, including changes to direction and look at position.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/circularRepeat.md b/docs/_reference/operators/filter/circularRepeat.md
index e6783f13e..b4ebdedc1 100644
--- a/docs/_reference/operators/filter/circularRepeat.md
+++ b/docs/_reference/operators/filter/circularRepeat.md
@@ -56,7 +56,7 @@ op:
regularHandling: runtime
summary: Spacing between copies.
status: beta
- summary: Repeat an SDF to fill a 2D circular area.
+ summary: Repeat an space to fill a 2D circular area.
variables:
- label: cellcoord
name: cellcoord
@@ -66,4 +66,4 @@ op:
---
-Repeat an SDF to fill a 2D circular area.
\ No newline at end of file
+Repeat an space to fill a 2D circular area.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/elongate.md b/docs/_reference/operators/filter/elongate.md
index 2d8ea90f6..103abf7ee 100644
--- a/docs/_reference/operators/filter/elongate.md
+++ b/docs/_reference/operators/filter/elongate.md
@@ -113,6 +113,7 @@ op:
name: Axes
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Which axes should be stretched.
summary: Stretches a shape by splitting it into pieces, moves them apart, and connects
them.
thumb: assets/images/reference/operators/filter/elongate_thumb.png
diff --git a/docs/_reference/operators/filter/extend.md b/docs/_reference/operators/filter/extend.md
index 4dba25272..4aa1dec89 100644
--- a/docs/_reference/operators/filter/extend.md
+++ b/docs/_reference/operators/filter/extend.md
@@ -108,11 +108,12 @@ op:
name: Axes
readOnlyHandling: baked
regularHandling: runtime
- summary: Clamps coordinates around an SDF result, which causes their edges to be
- extended infinitely along each axis.
+ summary: Which axes should be extended.
+ summary: Clamps coordinates around an area, which causes its edges to be extended
+ infinitely along each axis.
thumb: assets/images/reference/operators/filter/extend_thumb.png
---
-Clamps coordinates around an SDF result, which causes their edges to be extended infinitely along each axis.
\ No newline at end of file
+Clamps coordinates around an area, which causes its edges to be extended infinitely along each axis.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/fieldExpr.md b/docs/_reference/operators/filter/fieldExpr.md
index 3cc7c5de0..547e7da21 100644
--- a/docs/_reference/operators/filter/fieldExpr.md
+++ b/docs/_reference/operators/filter/fieldExpr.md
@@ -8,6 +8,15 @@ redirect_from:
- /reference/opType/raytk.operators.filter.fieldExpr/
op:
category: filter
+ detail: "The Expression parameter's menu contains common examples.\n\nWriting expressions:\n\
+ \n* To access a value from input 1, use a function call like `inputOp1(p, ctx)`\n\
+ \ * The `p` part is the spatial coordinate, so you can modify it with something\
+ \ like `inputOp1(p + vec3(1, 0, 0), ctx)`, which would move that field to the\
+ \ left.\n * The `ctx` part is required as the second argument to the function.\n\
+ * Other inputs are available as `inputOp2(...)` etc\n* The two slider parameters\
+ \ are available as `THIS_Param1` and `THIS_Param2`\n* The two vector parameters\
+ \ are available as `THIS_Vecparam1` and `THIS_Vecparam2`\n * To get at an individual\
+ \ part of one of the vector params, you can use `THIS_Vecparam1.y`"
inputs:
- contextTypes:
- Context
@@ -207,5 +216,21 @@ op:
name: RayContext
name: Contexttype
status: beta
+ summary: Modifies field values using a custom expression.
---
+
+
+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 like `inputOp1(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.
+* Other inputs are available as `inputOp2(...)` etc
+* The two slider parameters are available as `THIS_Param1` and `THIS_Param2`
+* The two vector parameters are available as `THIS_Vecparam1` and `THIS_Vecparam2`
+ * To get at an individual part of one of the vector params, you can use `THIS_Vecparam1.y`
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/fieldFunction.md b/docs/_reference/operators/filter/fieldFunction.md
index 8071b75fa..b6af066ff 100644
--- a/docs/_reference/operators/filter/fieldFunction.md
+++ b/docs/_reference/operators/filter/fieldFunction.md
@@ -122,5 +122,10 @@ op:
readOnlyHandling: baked
regularHandling: runtime
status: beta
+ summary: Modifies the values of a field using various types of math functions, similar
+ to a `Function CHOP`.
---
+
+
+Modifies the values of a field using various types of math functions, similar to a `Function CHOP`.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/gridClone.md b/docs/_reference/operators/filter/gridClone.md
index 1cff8a99b..657a441bf 100644
--- a/docs/_reference/operators/filter/gridClone.md
+++ b/docs/_reference/operators/filter/gridClone.md
@@ -8,6 +8,13 @@ redirect_from:
- /reference/opType/raytk.operators.filter.gridClone/
op:
category: filter
+ detail: 'It''s important to remember that this operator performs the work of its
+ input once *for each clone*. That means that a 3x3 grid does 27 times the work
+ of the input.
+
+
+ The `modulo3D` (or `modulo1D`/`modulo2D`) can be a cheaper alternative to `gridClone`
+ with some limitations.'
inputs:
- contextTypes:
- Context
@@ -64,10 +71,12 @@ op:
name: Center
readOnlyHandling: baked
regularHandling: runtime
+ summary: Center position of the grid.
- label: Size
name: Size
readOnlyHandling: baked
regularHandling: runtime
+ summary: Size of the grid on each axis.
- label: Merge Type
menuOptions:
- label: Simple Union
@@ -119,11 +128,21 @@ op:
name: Mergenumber
- label: Merge Offset
name: Mergeoffset
+ summary: Repeats an SDF in a grid arrangement, combining the results.
thumb: assets/images/reference/operators/filter/gridClone_thumb.png
variables:
- label: coord
name: coord
+ summary: grid cell coordinates for each axis, going from 0..N.
- label: normcoord
name: normcoord
+ summary: grid cell coordinates scaled to 0..1 range.
---
+
+
+Repeats an SDF in a grid arrangement, combining the results.
+
+It's important to remember that this operator performs the work of its input once *for each clone*. That means that a 3x3 grid does 27 times the work of the input.
+
+The `modulo3D` (or `modulo1D`/`modulo2D`) can be a cheaper alternative to `gridClone` with some limitations.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/index.md b/docs/_reference/operators/filter/index.md
index 18811e96f..23d9c4c66 100644
--- a/docs/_reference/operators/filter/index.md
+++ b/docs/_reference/operators/filter/index.md
@@ -27,6 +27,7 @@ cat:
name: adjustColor
summary: Adjust properties of color values, either directly on a field, or on
the assigned surface color of an Sdf result.
+ thumb: assets/images/reference/operators/filter/adjustColor_thumb.png
- name: applyTransform
status: beta
- name: assignAttribute
@@ -40,6 +41,7 @@ cat:
shortcuts:
- ac
summary: Assigns a surface color attribute to an SDF surface.
+ thumb: assets/images/reference/operators/filter/assignColor_thumb.png
- keywords:
- material
- modularmat
@@ -47,18 +49,22 @@ cat:
- texture
name: assignUV
summary: Assigns UV coordinates to an SDF surface.
+ thumb: assets/images/reference/operators/filter/assignUV_thumb.png
- name: axisRotate
summary: A simplified and optimized version of `rotate`, which only supports rotating
around a single axis (x, y, or z).
- name: bend
summary: Bends space, along a main axis, towards a second axis.
+ thumb: assets/images/reference/operators/filter/bend_thumb.png
- name: cameraTransform
status: beta
+ summary: Specialized transform that can be applied to cameras.
- name: cartesianToPolar
summary: Convert from cartesian space to various types of polar spaces.
+ thumb: assets/images/reference/operators/filter/cartesianToPolar_thumb.png
- name: circularRepeat
status: beta
- summary: Repeat an SDF to fill a 2D circular area.
+ summary: Repeat an space to fill a 2D circular area.
- keywords:
- elongate
- extend
@@ -66,26 +72,37 @@ cat:
name: elongate
summary: Stretches a shape by splitting it into pieces, moves them apart, and
connects them.
+ thumb: assets/images/reference/operators/filter/elongate_thumb.png
- keywords:
- extend
- stretch
name: extend
- summary: Clamps coordinates around an SDF result, which causes their edges to
- be extended infinitely along each axis.
+ summary: Clamps coordinates around an area, which causes its edges to be extended
+ infinitely along each axis.
+ thumb: assets/images/reference/operators/filter/extend_thumb.png
- name: fieldExpr
status: beta
+ summary: Modifies field values using a custom expression.
- name: fieldFunction
status: beta
+ summary: Modifies the values of a field using various types of math functions,
+ similar to a `Function CHOP`.
- name: flip
summary: Flips the input across an axis, either on its own or merged with the
original.
+ thumb: assets/images/reference/operators/filter/flip_thumb.png
- name: fold
+ thumb: assets/images/reference/operators/filter/fold_thumb.png
- name: geometricSeriesSquareTile
status: beta
summary: Repeats space in a square arrangement that gets smaller in the center.
+ thumb: assets/images/reference/operators/filter/geometricSeriesSquareTile_thumb.png
- name: gridClone
+ summary: Repeats an SDF in a grid arrangement, combining the results.
+ thumb: assets/images/reference/operators/filter/gridClone_thumb.png
- name: hilbertCurveTransform
status: beta
+ thumb: assets/images/reference/operators/filter/hilbertCurveTransform_thumb.png
- keywords:
- copy
- instance
@@ -94,21 +111,33 @@ cat:
name: instance
summary: Repeats its input some number of times, exposing the index as the iteration
x value, and combines the results.
+ thumb: assets/images/reference/operators/filter/instance_thumb.png
- name: instanceField
+ summary: Repeats an input field multiple times and combines the results.
- name: invert
summary: Invert an SDF, so that the inside is the outside.
+ thumb: assets/images/reference/operators/filter/invert_thumb.png
- name: iteratedTransform
summary: Performs a transform multiple times, optionally reflecting across axes
in between the steps.
+ thumb: assets/images/reference/operators/filter/iteratedTransform_thumb.png
- name: kink
+ summary: Bends space, similar to the `bend`.
+ thumb: assets/images/reference/operators/filter/kink_thumb.png
- keywords:
- crop
- knife
- slice
name: knife
summary: Cuts off an SDF along a plane.
+ thumb: assets/images/reference/operators/filter/knife_thumb.png
+ - name: lightTransform
+ status: beta
+ summary: Specialized transform that can be applied to lights, taking into account
+ things like look at direction.
- name: limitArea
status: beta
+ summary: Use an SDF to limit the area where a field produces values.
- keywords:
- clamp
- limit
@@ -117,7 +146,14 @@ cat:
- zigzag
name: limitField
summary: Limits the values produced by a float or vector field.
+ thumb: assets/images/reference/operators/filter/limitField_thumb.png
+ - name: limitLight
+ status: beta
+ summary: Limits the brightness of a light using distance attenuation or a bounding
+ SDF (or both).
- name: linearClone
+ summary: Repeats an SDF along a line, combining the results.
+ thumb: assets/images/reference/operators/filter/linearClone_thumb.png
- keywords:
- log
- modulo
@@ -127,16 +163,24 @@ cat:
- spiral
name: logPolarRepeat
status: beta
+ thumb: assets/images/reference/operators/filter/logPolarRepeat_thumb.png
- name: lookAtRotate
status: beta
+ summary: Rotates space to face towards a point.
- name: magnet
summary: Pulls or twists space within an area.
+ thumb: assets/images/reference/operators/filter/magnet_thumb.png
- name: mirrorAxes
+ summary: Mirror space across one or more axes, similar to `reflect`.
+ thumb: assets/images/reference/operators/filter/mirrorAxes_thumb.png
- name: mirrorOctant
summary: Mirror coordinates across two axes and the diagonals.
+ thumb: assets/images/reference/operators/filter/mirrorOctant_thumb.png
- name: mirrorQuadrant
summary: Mirror coordinates across two axes.
+ thumb: assets/images/reference/operators/filter/mirrorQuadrant_thumb.png
- name: mobiusTransform
+ thumb: assets/images/reference/operators/filter/mobiusTransform_thumb.png
- name: modifyDistance
status: beta
- keywords:
@@ -157,6 +201,7 @@ cat:
shortcuts:
- m1
summary: Repeats space along one axis.
+ thumb: assets/images/reference/operators/filter/modulo1D_thumb.png
- keywords:
- grid
- modulo
@@ -165,6 +210,7 @@ cat:
shortcuts:
- m2
summary: Repeats space along 2 axes.
+ thumb: assets/images/reference/operators/filter/modulo2D_thumb.png
- keywords:
- grid
- modulo
@@ -173,6 +219,7 @@ cat:
shortcuts:
- m3
summary: Repeats space along all 3 axes.
+ thumb: assets/images/reference/operators/filter/modulo3D_thumb.png
- keywords:
- distance
- modulo
@@ -182,6 +229,7 @@ cat:
name: moduloDistance
- name: moduloLine
status: beta
+ summary: Repeats space along a line, similar to `modulo1D`.
- keywords:
- kaleidoscope
- modulo
@@ -191,20 +239,31 @@ cat:
shortcuts:
- mp
summary: Repeats space radially, like a kaleidoscope.
+ thumb: assets/images/reference/operators/filter/moduloPolar_thumb.png
- name: moduloSpherical
- - name: moduloToroidal
+ summary: Repeats space in a spherical mesh layout with rows and columns.
+ thumb: assets/images/reference/operators/filter/moduloSpherical_thumb.png
+ - keywords:
+ - torus
+ name: moduloToroidal
status: beta
+ summary: Repeats space as rows and columns of a torus-shaped grid.
+ thumb: assets/images/reference/operators/filter/moduloToroidal_thumb.png
- keywords:
- hollow
- onion
- shell
name: onion
summary: Converts a solid SDF to a thin shell of the surface.
+ thumb: assets/images/reference/operators/filter/onion_thumb.png
- name: polarToCartesian
status: beta
summary: Converts coordinates from polar to cartesian.
- name: quadTreeRepeat
status: beta
+ summary: Repeats space in a 2d grid where some cells are subdivided into smaller
+ cells recursively.
+ thumb: assets/images/reference/operators/filter/quadTreeRepeat_thumb.png
- name: quantizeCoords
summary: Quantize coordinates to a 3D grid, which is sort of like "voxelizing"
the space.
@@ -216,12 +275,18 @@ cat:
- repeat
name: radialClone
summary: Repeats an SDF radially around an axis, combining the resulting shapes.
+ thumb: assets/images/reference/operators/filter/radialClone_thumb.png
- name: radialSlice
+ summary: Takes a pie-shaped slice of an SDF around an axis, either removing it
+ or everything except it.
+ thumb: assets/images/reference/operators/filter/radialSlice_thumb.png
- name: rangeTransform
summary: Applies a transform based on a range of settings, mapped with either
the iteration value or a field input.
+ thumb: assets/images/reference/operators/filter/rangeTransform_thumb.png
- name: rectangleRepeat
status: beta
+ thumb: assets/images/reference/operators/filter/rectangleRepeat_thumb.png
- keywords:
- flip
- mirror
@@ -230,6 +295,7 @@ cat:
shortcuts:
- ref
summary: Reflects space across a plane.
+ thumb: assets/images/reference/operators/filter/reflect_thumb.png
- name: remapCoords
status: beta
summary: Modifies space using a vector field.
@@ -244,6 +310,8 @@ cat:
- rf
summary: Rescales the values produced by a field.
- name: rescaleFloatField
+ summary: Simplified version of `rescaleField` that only has single settings vs
+ vectors for each.
- name: reshapeValues
summary: Reshapes the values produced by a field by applying a function.
- name: restrictStage
@@ -260,6 +328,7 @@ cat:
- name: rotate4D
summary: Projects 3D space into 4D space, applies rotation along two axes and
then projects back into 3D space.
+ thumb: assets/images/reference/operators/filter/rotate4D_thumb.png
- keywords:
- material
- modularmat
@@ -273,21 +342,25 @@ cat:
- name: round
summary: Adds to (or subtracts from) the size of an SDF, which has the effect
of rounding it out or shrinking it.
+ thumb: assets/images/reference/operators/filter/round_thumb.png
- keywords:
- scale
- transform
name: scale
summary: Scales space.
- name: slice
- summary: Removes all of an SDF except for a slice in space.
+ summary: Takes a slice of an SDF along an axis, either removing it or everything
+ except it.
- name: sphericalMobiusTransform
status: beta
+ thumb: assets/images/reference/operators/filter/sphericalMobiusTransform_thumb.png
- keywords:
- log
- polar
- spiral
name: spiralZoom
summary: Transforms space using a logarithmic spiral.
+ thumb: assets/images/reference/operators/filter/spiralZoom_thumb.png
- keywords:
- move
- pivot
@@ -304,6 +377,8 @@ cat:
- apply
name: transformSequence
status: beta
+ summary: Applies one or more transform operators sequentially, to coordinates,
+ field values, etc, with support for looping.
- keywords:
- move
- position
@@ -315,6 +390,7 @@ cat:
summary: Translates coordinates of the input ROP.
- name: twist
summary: Twists space around an axis.
+ thumb: assets/images/reference/operators/filter/twist_thumb.png
- name: uvTransform
status: beta
summary: Transform the UV coordinates assigned to an SDF result.
@@ -326,6 +402,7 @@ cat:
- wave
name: waveWarp
summary: Uses repeating waves to offset space.
+ thumb: assets/images/reference/operators/filter/waveWarp_thumb.png
summary: Operators that take an input and modify it.
---
diff --git a/docs/_reference/operators/filter/instanceField.md b/docs/_reference/operators/filter/instanceField.md
index b38d13992..23d161119 100644
--- a/docs/_reference/operators/filter/instanceField.md
+++ b/docs/_reference/operators/filter/instanceField.md
@@ -8,6 +8,7 @@ redirect_from:
- /reference/opType/raytk.operators.filter.instanceField/
op:
category: filter
+ detail: Note that this multiplies the work of the input once per instance.
inputs:
- contextTypes:
- Context
@@ -61,12 +62,14 @@ op:
name: Operation
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: How the field values should be combined.
- label: Swap Order
name: Swaporder
readOnlyHandling: semibaked
regularHandling: runtime
summary: Swaps the two inputs. This is only relevant for some of the `Operation`
- values.
+ values like subtraction.
+ summary: Repeats an input field multiple times and combines the results.
variables:
- label: index
name: index
@@ -74,3 +77,8 @@ op:
name: normindex
---
+
+
+Repeats an input field multiple times and combines the results.
+
+Note that this multiplies the work of the input once per instance.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/kink.md b/docs/_reference/operators/filter/kink.md
index c92d73bd1..97e6aa02e 100644
--- a/docs/_reference/operators/filter/kink.md
+++ b/docs/_reference/operators/filter/kink.md
@@ -8,6 +8,12 @@ redirect_from:
- /reference/opType/raytk.operators.filter.kink/
op:
category: filter
+ detail: 'The bending that this operator applies is slightly different than the `bend`
+ operator, and is asymmetrical, causing a tighter bend on one side based on the
+ bend amount and direction.
+
+
+ Based on [Bending an SDF](https://www.shadertoy.com/view/3llfRl) by blackle.'
inputs:
- contextTypes:
- Context
@@ -102,21 +108,28 @@ op:
name: Enable
- label: Direction
menuOptions:
- - label: Along X Toward Y
+ - description: Bends along the X axis, in the Y direction
+ label: Along X Toward Y
name: xy
- - label: Along X Toward Z
+ - description: Bends along the X axis, in the Z direction
+ label: Along X Toward Z
name: xz
- - label: Along Y Toward X
+ - description: Bends along the Y axis, in the X direction
+ label: Along Y Toward X
name: yx
- - label: Along Y Toward Z
+ - description: Bends along the Y axis, in the Z direction
+ label: Along Y Toward Z
name: yz
- - label: Along Z Toward X
+ - description: Bends along the Z axis, in the X direction
+ label: Along Z Toward X
name: zx
- - label: Along Z Toward Y
+ - description: Bends along the Z axis, in the Y direction
+ label: Along Z Toward Y
name: zy
name: Direction
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Which axis to bend around on which plane.
- label: Side
menuOptions:
- label: Negative
@@ -126,18 +139,31 @@ op:
name: Side
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Which side to bend towards.
- label: Amount
name: Amount
readOnlyHandling: baked
regularHandling: runtime
+ summary: Amount of bending.
- label: Offset
name: Offset
readOnlyHandling: baked
regularHandling: runtime
+ summary: 'Position along the '
- label: Spread
name: Spread
readOnlyHandling: baked
regularHandling: runtime
+ summary: Range over which the bending is spread. Higher values mean a more gradual
+ bend.
+ summary: Bends space, similar to the `bend`.
thumb: assets/images/reference/operators/filter/kink_thumb.png
---
+
+
+Bends space, similar to the `bend`.
+
+The bending that this operator applies is slightly different than the `bend` operator, and is asymmetrical, causing a tighter bend on one side based on the bend amount and direction.
+
+Based on [Bending an SDF](https://www.shadertoy.com/view/3llfRl) by blackle.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/lightTransform.md b/docs/_reference/operators/filter/lightTransform.md
new file mode 100644
index 000000000..80b88044f
--- /dev/null
+++ b/docs/_reference/operators/filter/lightTransform.md
@@ -0,0 +1,96 @@
+---
+layout: operator
+title: lightTransform
+parent: Filter Operators
+grand_parent: Operators
+permalink: /reference/operators/filter/lightTransform
+redirect_from:
+ - /reference/opType/raytk.operators.filter.lightTransform/
+op:
+ category: filter
+ detail: Similar to `cameraTransform`, this operator is specificaly designed to work
+ on lights.
+ inputs:
+ - contextTypes:
+ - LightContext
+ coordTypes:
+ - vec3
+ label: Light
+ name: light
+ required: true
+ returnTypes:
+ - Light
+ - contextTypes:
+ - LightContext
+ coordTypes:
+ - vec3
+ label: Position Translate Field
+ name: posTranslateField
+ returnTypes:
+ - vec4
+ - contextTypes:
+ - LightContext
+ coordTypes:
+ - vec3
+ label: Direction Rotate Field
+ name: dirRotateField
+ returnTypes:
+ - vec4
+ supportedVariableInputs:
+ - posTranslateField
+ - contextTypes:
+ - LightContext
+ coordTypes:
+ - vec3
+ label: Look At Translate Field
+ name: lookAtTranslateField
+ returnTypes:
+ - vec4
+ supportedVariableInputs:
+ - posTranslateField
+ - dirRotateField
+ name: lightTransform
+ opType: raytk.operators.filter.lightTransform
+ parameters:
+ - label: Enable
+ name: Enable
+ - label: Position Translate
+ name: Postranslate
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Translation offset applied to the position of the light source.
+ - label: Direction Rotate
+ name: Dirrotate
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Rotation applied to the direction which the light source is facing.
+ - label: Look At Mode
+ menuOptions:
+ - description: The look at position should be moved by the same amount that the
+ main position is moved.
+ label: Include Position Translate
+ name: includepos
+ - description: The look at position should remain in place regardless of how the
+ main position moves.
+ label: Separate Translate Only
+ name: separate
+ name: Lookatmode
+ readOnlyHandling: semibaked
+ regularHandling: runtime
+ summary: Whether the look at position (if used) should be adjusted with the main
+ position or remain stationary.
+ - label: Look At Translate
+ name: Lookattranslate
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Translation offset applied to only the look at position.
+ status: beta
+ summary: Specialized transform that can be applied to lights, taking into account
+ things like look at direction.
+
+---
+
+
+Specialized transform that can be applied to lights, taking into account things like look at direction.
+
+Similar to `cameraTransform`, this operator is specificaly designed to work on lights.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/limitArea.md b/docs/_reference/operators/filter/limitArea.md
index d691cd0c1..3e28631db 100644
--- a/docs/_reference/operators/filter/limitArea.md
+++ b/docs/_reference/operators/filter/limitArea.md
@@ -8,6 +8,11 @@ redirect_from:
- /reference/opType/raytk.operators.filter.limitArea/
op:
category: filter
+ detail: 'Within the specified bounds, the value from the first input field is used.
+
+
+ Outside the bounds, if there''s a second input field, that is used instead. Otherwise
+ the `Outside Value` parameter is used for those areas.'
inputs:
- contextTypes:
- Context
@@ -77,14 +82,26 @@ op:
name: Offset
readOnlyHandling: baked
regularHandling: runtime
+ summary: Offsets the edge of the bound area, expanding/collapsing it. This is
+ equivalent to inserting a `round` operator.
- label: Blending
name: Blending
readOnlyHandling: baked
regularHandling: runtime
+ summary: Range over which to fade from the main field to the outside field/param.
- label: Outside Value
name: Outsidevalue
readOnlyHandling: baked
regularHandling: runtime
+ summary: Value to use outside the bounds, if there is no second field input.
status: beta
+ summary: Use an SDF to limit the area where a field produces values.
---
+
+
+Use an SDF to limit the area where a field produces values.
+
+Within the specified bounds, the value from the first input field is used.
+
+Outside the bounds, if there's a second input field, that is used instead. Otherwise the `Outside Value` parameter is used for those areas.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/limitLight.md b/docs/_reference/operators/filter/limitLight.md
new file mode 100644
index 000000000..2e64ee6f0
--- /dev/null
+++ b/docs/_reference/operators/filter/limitLight.md
@@ -0,0 +1,106 @@
+---
+layout: operator
+title: limitLight
+parent: Filter Operators
+grand_parent: Operators
+permalink: /reference/operators/filter/limitLight
+redirect_from:
+ - /reference/opType/raytk.operators.filter.limitLight/
+op:
+ category: filter
+ detail: 'Attenuation makes the light full brightness at the position of the light
+ and after a distance it tapers off to darkness.
+
+
+ Bounding SDFs do something similar but instead of using distance from the light
+ source, they use an SDF that defines an area within which the light is at full
+ brightness.
+
+
+ The optimization feature tells the renderer that in places where attentuation
+ / bounding says the light should be totally off, the renderer can skip attempting
+ to use that light at all for any materials there.'
+ inputs:
+ - contextTypes:
+ - LightContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ - vec4
+ label: Light
+ name: light
+ required: true
+ returnTypes:
+ - Light
+ summary: Light whose brightness is to be limited.
+ - contextTypes:
+ - LightContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ - vec4
+ label: Bounds SDF
+ name: bounds
+ returnTypes:
+ - Sdf
+ summary: SDF that defines an area for the light to be at full brightness.
+ name: limitLight
+ opType: raytk.operators.filter.limitLight
+ parameters:
+ - label: Enable
+ name: Enable
+ - label: Enable Attenuation
+ name: Enableattenuation
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Whether to use distance from the light source to dim the light.
+ - label: Attenuation Distance
+ name: Attenuationdistance
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Range within which the light is at full brightness.
+ - label: Attenuation Fade
+ name: Attenuationfade
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Width of the transition from light to dark for distance attenuation.
+ This fading is centered on the range from the distance parameter, so half the
+ fade will be inside that range and half will be extending beyond that range.
+ - label: Enable Bounds
+ name: Enablebounds
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Whether to use an SDF to dim the light outside an area.
+ - label: Bounds Offset
+ name: Boundsoffset
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Expands or shrinks the bounding area from the SDF, equivalent to inserting
+ a `round` operator between the SDF and the `limitLight`.
+ - label: Bounds Blending
+ name: Boundsblending
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Width of the transition from light to dark from the bounding SDF.
+ - label: Optimize Outside
+ name: Optimizeoutside
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Whether to tell the renderer it can skip material calculations for the
+ light in areas outside the attenuation / bounding SDF.
+ status: beta
+ summary: Limits the brightness of a light using distance attenuation or a bounding
+ SDF (or both).
+
+---
+
+
+Limits the brightness of a light using distance attenuation or a bounding SDF (or both).
+
+Attenuation makes the light full brightness at the position of the light and after a distance it tapers off to darkness.
+
+Bounding SDFs do something similar but instead of using distance from the light source, they use an SDF that defines an area within which the light is at full brightness.
+
+The optimization feature tells the renderer that in places where attentuation / bounding says the light should be totally off, the renderer can skip attempting to use that light at all for any materials there.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/linearClone.md b/docs/_reference/operators/filter/linearClone.md
index f363aad75..a3e8cc26d 100644
--- a/docs/_reference/operators/filter/linearClone.md
+++ b/docs/_reference/operators/filter/linearClone.md
@@ -8,6 +8,12 @@ redirect_from:
- /reference/opType/raytk.operators.filter.linearClone/
op:
category: filter
+ detail: 'Note that this multiplies the work of the input for each clone, meaning
+ that 4 clones means 4x the work of whatever is connected to the input.
+
+
+ The `modulo1D` can be a cheaper alternative to `linearClone` though it comes with
+ limitations.'
inputs:
- contextTypes:
- Context
@@ -66,10 +72,12 @@ op:
name: Translate1
readOnlyHandling: baked
regularHandling: runtime
+ summary: Position of the start of the line of clones.
- label: Translate 2
name: Translate2
readOnlyHandling: baked
regularHandling: runtime
+ summary: Position of the end of the line of clones.
- label: Merge Type
menuOptions:
- label: Simple Union
@@ -131,6 +139,7 @@ op:
readOnlyHandling: semibaked
regularHandling: semibaked
summary: Whether and how to expose iteration values to upstream operators.
+ summary: Repeats an SDF along a line, combining the results.
thumb: assets/images/reference/operators/filter/linearClone_thumb.png
variables:
- label: index
@@ -139,3 +148,10 @@ op:
name: normindex
---
+
+
+Repeats an SDF along a line, combining the results.
+
+Note that this multiplies the work of the input for each clone, meaning that 4 clones means 4x the work of whatever is connected to the input.
+
+The `modulo1D` can be a cheaper alternative to `linearClone` though it comes with limitations.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/lookAtRotate.md b/docs/_reference/operators/filter/lookAtRotate.md
index 58888ba7c..a8932e285 100644
--- a/docs/_reference/operators/filter/lookAtRotate.md
+++ b/docs/_reference/operators/filter/lookAtRotate.md
@@ -105,14 +105,21 @@ op:
name: Sourcepoint
readOnlyHandling: baked
regularHandling: runtime
+ summary: The position around which to rotate.
- label: Target Point
name: Targetpoint
readOnlyHandling: baked
regularHandling: runtime
+ summary: The position that the rotation faces towards.
- label: Roll
name: Roll
readOnlyHandling: baked
regularHandling: runtime
+ summary: Rotation perpendicular to the direction that it's facing.
status: beta
+ summary: Rotates space to face towards a point.
---
+
+
+Rotates space to face towards a point.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/magnet.md b/docs/_reference/operators/filter/magnet.md
index 289894ab0..f8365faf5 100644
--- a/docs/_reference/operators/filter/magnet.md
+++ b/docs/_reference/operators/filter/magnet.md
@@ -123,6 +123,19 @@ op:
readOnlyHandling: baked
regularHandling: runtime
summary: Amount of translation along each axis. For 2D, only X and Y are used.
+ - label: Scale Type
+ menuOptions:
+ - label: Separate XYZ
+ name: separate
+ - label: Uniform
+ name: uniform
+ name: Scaletype
+ readOnlyHandling: semibaked
+ regularHandling: semibaked
+ - label: Uniform Scale
+ name: Uniformscale
+ readOnlyHandling: baked
+ regularHandling: runtime
summary: Pulls or twists space within an area.
thumb: assets/images/reference/operators/filter/magnet_thumb.png
diff --git a/docs/_reference/operators/filter/mirrorAxes.md b/docs/_reference/operators/filter/mirrorAxes.md
index c318c7f8e..77a79bfae 100644
--- a/docs/_reference/operators/filter/mirrorAxes.md
+++ b/docs/_reference/operators/filter/mirrorAxes.md
@@ -152,6 +152,7 @@ op:
name: Axes
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Which axes should be reflected.
- label: Direction X
menuOptions:
- label: Positive
@@ -161,6 +162,7 @@ op:
name: Dirx
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Which side of the X axis should be reflected.
- label: Direction Y
menuOptions:
- label: Positive
@@ -170,6 +172,7 @@ op:
name: Diry
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Which side of the Y axis should be reflected.
- label: Direction Z
menuOptions:
- label: Positive
@@ -179,6 +182,7 @@ op:
name: Dirz
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Which side of the Z axis should be reflected.
- label: Flip X On Side
menuOptions:
- label: None
@@ -198,6 +202,7 @@ op:
name: Flipsidex
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether to flip one side of the X axis along either the Y or Z axes.
- label: Flip Y On Side
menuOptions:
- label: None
@@ -217,6 +222,7 @@ op:
name: Flipsidey
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether to flip one side of the Y axis along either the X or Z axes.
- label: Flip Z On Side
menuOptions:
- label: None
@@ -236,22 +242,29 @@ op:
name: Flipsidez
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether to flip one side of the Z axis along either the X or Y axes.
- label: Center
name: Center
readOnlyHandling: baked
regularHandling: runtime
+ summary: Center position for the reflection planes.
- label: Offset
name: Offset
readOnlyHandling: baked
regularHandling: runtime
+ summary: Offset applied to each side, pushing them towards / away from the reflection
+ planes.
- label: Enable Blend
name: Enableblend
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Whether to stretch out the area near the reflection plane to soften the
+ transition between the sides.
- label: Blending
name: Blending
readOnlyHandling: baked
regularHandling: runtime
+ summary: How much area to stretch out near the reflection planes.
- label: Apply To
menuOptions:
- label: Coordinates
@@ -265,9 +278,14 @@ op:
- label: Field Values
name: value
name: Target
+ summary: What the reflection should be applied to.
+ summary: Mirror space across one or more axes, similar to `reflect`.
thumb: assets/images/reference/operators/filter/mirrorAxes_thumb.png
variables:
- label: sides
name: sides
---
+
+
+Mirror space across one or more axes, similar to `reflect`.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/moduloLine.md b/docs/_reference/operators/filter/moduloLine.md
index 99431ed5f..85f7d5471 100644
--- a/docs/_reference/operators/filter/moduloLine.md
+++ b/docs/_reference/operators/filter/moduloLine.md
@@ -8,6 +8,9 @@ redirect_from:
- /reference/opType/raytk.operators.filter.moduloLine/
op:
category: filter
+ detail: Similar to `modulo1D`, this operator repeats space in a row of slices. But
+ instead of being on an axis, it uses an arbitrary line defined by two points,
+ with a fixed number of evenly spaced slices between them.
inputs:
- contextTypes:
- Context
@@ -53,6 +56,7 @@ op:
name: Divisions
readOnlyHandling: baked
regularHandling: runtime
+ summary: Number of slices.
- label: Mirror Type
menuOptions:
- label: None
@@ -62,12 +66,21 @@ op:
name: Mirrortype
readOnlyHandling: baked
regularHandling: runtime
- summary: How to the slices are varied.
+ summary: Whether to flip alternating slices, which can be useful for ensuring
+ that shapes line up with their neighbors if they get cut off.
status: beta
+ summary: Repeats space along a line, similar to `modulo1D`.
variables:
- label: cellcoord
name: cellcoord
+ summary: Cell index, 0, 1, 2, etc.
- label: normcoord
name: normcoord
+ summary: Cell index, scaled to a 0..1 range.
---
+
+
+Repeats space along a line, similar to `modulo1D`.
+
+Similar to `modulo1D`, this operator repeats space in a row of slices. But instead of being on an axis, it uses an arbitrary line defined by two points, with a fixed number of evenly spaced slices between them.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/moduloSpherical.md b/docs/_reference/operators/filter/moduloSpherical.md
index 54ddca6fe..b100bc1cd 100644
--- a/docs/_reference/operators/filter/moduloSpherical.md
+++ b/docs/_reference/operators/filter/moduloSpherical.md
@@ -101,18 +101,23 @@ op:
name: Repetitions
readOnlyHandling: baked
regularHandling: runtime
+ summary: How many rows and columns to have.
- label: Shift
name: Shift
readOnlyHandling: baked
regularHandling: runtime
+ summary: Shifts the repetitions across the rows and columns.
- label: Offset
name: Offset
readOnlyHandling: baked
regularHandling: runtime
+ summary: Shifts the contents of each repetition, away from the sphere center or
+ side to side along the columns.
- label: Pivot
name: Pivot
readOnlyHandling: baked
regularHandling: runtime
+ summary: Center point of the sphere
- label: Mirror Type
menuOptions:
- label: None
@@ -126,10 +131,19 @@ op:
name: Mirrortype
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Flips alternating repetitions so they mirror each other.
+ summary: Repeats space in a spherical mesh layout with rows and columns.
+ thumb: assets/images/reference/operators/filter/moduloSpherical_thumb.png
variables:
- label: cell
name: cell
+ summary: Index of the row and column as integers (0..N).
- label: normcell
name: normcell
+ summary: Index of the row and column scaled to a 0..1 range based on the number
+ of Repetitions.
---
+
+
+Repeats space in a spherical mesh layout with rows and columns.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/moduloToroidal.md b/docs/_reference/operators/filter/moduloToroidal.md
index 4ad730549..791b9ee1b 100644
--- a/docs/_reference/operators/filter/moduloToroidal.md
+++ b/docs/_reference/operators/filter/moduloToroidal.md
@@ -131,6 +131,8 @@ op:
- normangle
- cell
- normcell
+ keywords:
+ - torus
name: moduloToroidal
opType: raytk.operators.filter.moduloToroidal
parameters:
@@ -147,36 +149,66 @@ op:
name: Axis
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Axis that the torus is around.
- label: Radius
name: Radius
readOnlyHandling: baked
regularHandling: runtime
+ summary: Primary radius of the torus around the main axis.
- label: Thickness
name: Thickness
readOnlyHandling: baked
regularHandling: runtime
+ summary: Thickness of the torus.
- label: Repetitions
name: Repetitions
readOnlyHandling: baked
regularHandling: runtime
+ summary: Number of rows and columns across the torus.
- label: Shift
name: Shift
readOnlyHandling: baked
regularHandling: runtime
+ summary: Shifts the repetitions across the rows and columns of the torus.
+ - label: Mirror Type
+ menuOptions:
+ - label: None
+ name: none
+ - label: Rows
+ name: rows
+ - label: Columns
+ name: cols
+ - label: Grid
+ name: grid
+ name: Mirrortype
+ readOnlyHandling: semibaked
+ regularHandling: semibaked
+ summary: Flips alternating repetitions so they mirror each other.
status: beta
+ summary: Repeats space as rows and columns of a torus-shaped grid.
thumb: assets/images/reference/operators/filter/moduloToroidal_thumb.png
variables:
- label: cell
name: cell
+ summary: Index of the row and column as integers (0..N).
- label: normcell
name: normcell
+ summary: Index of the row and column scaled to a 0..1 range based on the number
+ of Repetitions.
- label: angle
name: angle
+ summary: Angle around the main axis as degrees (0..360).
- label: normangle
name: normangle
+ summary: Angle around the main axis, scaled to a 0..1 range.
- label: innerangle
name: innerangle
+ summary: Angle around the inner body of the torus as degrees (0..360).
- label: norminnerangle
name: norminnerangle
+ summary: Angle around the inner body of the torus, scaled to a 0..1 range.
---
+
+
+Repeats space as rows and columns of a torus-shaped grid.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/quadTreeRepeat.md b/docs/_reference/operators/filter/quadTreeRepeat.md
index b32612f94..ae1484cbf 100644
--- a/docs/_reference/operators/filter/quadTreeRepeat.md
+++ b/docs/_reference/operators/filter/quadTreeRepeat.md
@@ -31,6 +31,7 @@ op:
- Ray
- Light
- Particle
+ summary: Main input which appears within each cell.
supportedVariableInputs:
- offsetField
- shiftField
@@ -54,6 +55,7 @@ op:
required: true
returnTypes:
- vec4
+ summary: Field that controls the shifting of the overall grid layout.
- contextTypes:
- Context
- MaterialContext
@@ -71,6 +73,7 @@ op:
required: true
returnTypes:
- vec4
+ summary: Field that controls the offsetting of the contents within each cell.
supportedVariableInputs:
- shiftField
supportedVariables:
@@ -92,30 +95,38 @@ op:
name: Axis
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Axis that the grid plane faces.
- label: Division
name: Division
readOnlyHandling: baked
regularHandling: runtime
+ summary: Number of steps of subdividing.
- label: Level 1 Chance
name: Chance1
readOnlyHandling: baked
regularHandling: runtime
+ summary: Likelyhood of a cell getting one level of subdivision.
- label: Level 2 Chance
name: Chance2
readOnlyHandling: baked
regularHandling: runtime
+ summary: Likelyhood of a sub-divided cell getting another level of subdivision.
- label: Offset
name: Offset
readOnlyHandling: baked
regularHandling: runtime
+ summary: Moves the contents within each repeated cell.
- label: Shift
name: Shift
readOnlyHandling: baked
regularHandling: runtime
+ summary: Move the entire arrangement of cells.
- label: Enable Rescale
name: Enablerescale
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Whether to apply uniform scaling within each cell so that the contents
+ fit the size of the cell.
- label: Iteration Type
menuOptions:
- label: None
@@ -125,16 +136,27 @@ op:
name: Iterationtype
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: How to expose the cell information as iteration values for upstream operators
+ to use.
- label: Seed
name: Seed
readOnlyHandling: baked
regularHandling: runtime
+ summary: Seed number used as the basis of the randomization.
status: beta
+ summary: Repeats space in a 2d grid where some cells are subdivided into smaller
+ cells recursively.
thumb: assets/images/reference/operators/filter/quadTreeRepeat_thumb.png
variables:
- label: cell
name: cell
+ summary: Randomization values different for each cell, but without a predictable
+ layout.
- label: layer
name: layer
+ summary: Which layer of subdivision the current cell has.
---
+
+
+Repeats space in a 2d grid where some cells are subdivided into smaller cells recursively.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/radialClone.md b/docs/_reference/operators/filter/radialClone.md
index 974ca05a9..55b3abba3 100644
--- a/docs/_reference/operators/filter/radialClone.md
+++ b/docs/_reference/operators/filter/radialClone.md
@@ -202,6 +202,17 @@ op:
readOnlyHandling: semibaked
regularHandling: semibaked
summary: Whether and how to expose iteration values to upstream operators.
+ - label: Rotate Mode
+ menuOptions:
+ - label: Position and Rotation
+ name: both
+ - label: Position Only
+ name: pos
+ name: Rotatemode
+ readOnlyHandling: semibaked
+ regularHandling: semibaked
+ summary: Whether the copies should be rotated or just positioned in a ring in
+ their original orientation.
- label: Merge Number
name: Mergenumber
- label: Merge Offset
@@ -211,12 +222,16 @@ op:
variables:
- label: index
name: index
+ summary: Index of the current clone (0..N)
- label: normindex
name: normindex
+ summary: Index of the current clone, scaled to a 0..1 range.
- label: rotaccum
name: rotaccum
+ summary: Amount of rotation applied for the current clone (0..360).
- label: normrotaccum
name: normrotaccum
+ summary: Amount of rotation applied for the current clone, scaled to 0..1 range.
---
diff --git a/docs/_reference/operators/filter/radialSlice.md b/docs/_reference/operators/filter/radialSlice.md
index ce0764a76..d249b838b 100644
--- a/docs/_reference/operators/filter/radialSlice.md
+++ b/docs/_reference/operators/filter/radialSlice.md
@@ -119,31 +119,39 @@ op:
summary: The axis around which to take the slice.
- label: Angle Mode
menuOptions:
- - label: Center & Width
+ - description: Choose a center angle and a width.
+ label: Center & Width
name: width
- - label: Start & End
+ - description: Choose the start and end angles.
+ label: Start & End
name: sides
name: Anglemode
+ summary: How to specify the angles of the slice.
- label: Center Angle
name: Center
readOnlyHandling: baked
regularHandling: runtime
+ summary: Center angle of the slice in degrees.
- label: Angle Width
name: Width
readOnlyHandling: baked
regularHandling: runtime
+ summary: Width of the slice in degrees.
- label: Start Angle
name: Start
readOnlyHandling: baked
regularHandling: runtime
+ summary: Start angle in degrees.
- label: End Angle
name: End
readOnlyHandling: baked
regularHandling: runtime
+ summary: End angle in degrees.
- label: Invert
name: Invert
readOnlyHandling: baked
regularHandling: runtime
+ summary: Whether to remove just the slice, or remove everything except the slice.
- label: Enable Smoothing
name: Enablesmoothing
readOnlyHandling: semibaked
@@ -155,6 +163,11 @@ op:
readOnlyHandling: baked
regularHandling: runtime
summary: The amount of smoothing distance.
+ summary: Takes a pie-shaped slice of an SDF around an axis, either removing it or
+ everything except it.
thumb: assets/images/reference/operators/filter/radialSlice_thumb.png
---
+
+
+Takes a pie-shaped slice of an SDF around an axis, either removing it or everything except it.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/reflect.md b/docs/_reference/operators/filter/reflect.md
index a23fad0bb..253497413 100644
--- a/docs/_reference/operators/filter/reflect.md
+++ b/docs/_reference/operators/filter/reflect.md
@@ -101,6 +101,7 @@ op:
name: Direction
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Axis and direction across which to reflect.
- label: Plane Normal
name: Planenormal
readOnlyHandling: baked
@@ -124,10 +125,13 @@ op:
name: Enableblend
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Whether to stretch out the space near the reflection plane to smooth
+ out the border between the sides.
- label: Blending
name: Blend
readOnlyHandling: baked
regularHandling: runtime
+ summary: How much to stretch the space near the reflection plane.
- label: Iteration Type
menuOptions:
- label: None
@@ -139,6 +143,7 @@ op:
name: Iterationtype
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: How to expose information about the current side as iteration values.
shortcuts:
- ref
summary: Reflects space across a plane.
@@ -146,8 +151,10 @@ op:
variables:
- label: sign
name: sign
+ summary: +1, -1 indicating the current side of the reflection.
- label: index
name: index
+ summary: 0, 1 indicating the current side of the reflection.
---
diff --git a/docs/_reference/operators/filter/rescaleField.md b/docs/_reference/operators/filter/rescaleField.md
index 87340fbc7..17b6d44ee 100644
--- a/docs/_reference/operators/filter/rescaleField.md
+++ b/docs/_reference/operators/filter/rescaleField.md
@@ -76,14 +76,17 @@ op:
name: Multiply
readOnlyHandling: baked
regularHandling: runtime
+ summary: Multiplier value applied to all parts of the values after range scaling.
- label: Multiply
name: Mult
readOnlyHandling: baked
regularHandling: runtime
+ summary: Multiplier values applied to each part of the values after range scaling.
- label: Post Add
name: Postadd
readOnlyHandling: baked
regularHandling: runtime
+ summary: Amounts added to the rescaled values after all other steps.
shortcuts:
- rf
summary: Rescales the values produced by a field.
diff --git a/docs/_reference/operators/filter/rescaleFloatField.md b/docs/_reference/operators/filter/rescaleFloatField.md
index a0dae8c8f..e3b7f1415 100644
--- a/docs/_reference/operators/filter/rescaleFloatField.md
+++ b/docs/_reference/operators/filter/rescaleFloatField.md
@@ -8,6 +8,8 @@ redirect_from:
- /reference/opType/raytk.operators.filter.rescaleFloatField/
op:
category: filter
+ detail: This can be applied to either float or vector fields. In the case of vector
+ fields, the same settings are used for all parts of the incoming vectors.
inputs:
- contextTypes:
- Context
@@ -38,17 +40,28 @@ op:
name: Inputrange
readOnlyHandling: baked
regularHandling: runtime
+ summary: The low/high ends of the expected input values.
- label: Output Range
name: Outputrange
readOnlyHandling: baked
regularHandling: runtime
+ summary: The low/high ends of the rescaled values.
- label: Multiply
name: Multiply
readOnlyHandling: baked
regularHandling: runtime
+ summary: Multiplier applied to values after range scaling.
- label: Post Add
name: Postadd
readOnlyHandling: baked
regularHandling: runtime
+ summary: Amount added to values after the other steps.
+ summary: Simplified version of `rescaleField` that only has single settings vs vectors
+ for each.
---
+
+
+Simplified version of `rescaleField` that only has single settings vs vectors for each.
+
+This can be applied to either float or vector fields. In the case of vector fields, the same settings are used for all parts of the incoming vectors.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/restrictStage.md b/docs/_reference/operators/filter/restrictStage.md
index eef61b80a..1f53654bc 100644
--- a/docs/_reference/operators/filter/restrictStage.md
+++ b/docs/_reference/operators/filter/restrictStage.md
@@ -76,35 +76,50 @@ op:
name: Includeprimary
readOnlyHandling: baked
regularHandling: baked
- summary: 'Whether the operator should '
+ summary: Whether the operator should be used in the main raymarching stage where
+ the renderer finds surface hits for rays.
- label: Include Shadow
name: Includeshadow
readOnlyHandling: baked
regularHandling: baked
+ summary: Whether the operator should be used when the renderer is checking for
+ shadows cast on a surface.
- label: Include Reflect
name: Includereflect
readOnlyHandling: baked
regularHandling: baked
+ summary: Whether the operator should be used when the renderer is determining
+ colors reflected onto surfaces.
- label: Include Material
name: Includematerial
readOnlyHandling: baked
regularHandling: baked
+ summary: Whether the operator should be used when the renderer is using a material
+ do determine the color of a point on a surface.
- label: Include Occlusion
name: Includeocclusion
readOnlyHandling: baked
regularHandling: baked
+ summary: Whether the operator should be used when the renderer is computing ambient
+ occlusion.
- label: Include Volumetric
name: Includevolumetric
readOnlyHandling: baked
regularHandling: baked
+ summary: Whether the operator should be used when the renderer is accumulating
+ color within a light volume.
- label: Include Volumetric Shadow
name: Includevolumetricshadow
readOnlyHandling: baked
regularHandling: baked
+ summary: Whether the operator should be used when the renderer is checking for
+ shadows within a light volume.
- label: Include Normal
name: Includenormal
readOnlyHandling: baked
regularHandling: baked
+ summary: Whether the operator should be used when the renderer is calculating
+ surface normals.
summary: Restricts which render stages an operator is used in.
---
diff --git a/docs/_reference/operators/filter/slice.md b/docs/_reference/operators/filter/slice.md
index f8e10a8ff..295364055 100644
--- a/docs/_reference/operators/filter/slice.md
+++ b/docs/_reference/operators/filter/slice.md
@@ -116,9 +116,10 @@ op:
name: Operation
readOnlyHandling: semibaked
regularHandling: semibaked
- summary: Removes all of an SDF except for a slice in space.
+ summary: Takes a slice of an SDF along an axis, either removing it or everything
+ except it.
---
-Removes all of an SDF except for a slice in space.
\ No newline at end of file
+Takes a slice of an SDF along an axis, either removing it or everything except it.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/transformSequence.md b/docs/_reference/operators/filter/transformSequence.md
index 5825e7f32..1da192ec7 100644
--- a/docs/_reference/operators/filter/transformSequence.md
+++ b/docs/_reference/operators/filter/transformSequence.md
@@ -8,6 +8,29 @@ redirect_from:
- /reference/opType/raytk.operators.filter.transformSequence/
op:
category: filter
+ detail: 'The first input is the primary input, which can either be an arbitrary
+ operator which will get the transformed coordinates, or it can be a field whose
+ values are transformed, or an SDF whose UV coordinates are transformed, etc.
+
+
+ The second and later inputs are the sequence of transforms that are applied to
+ the primary.
+
+ The second input gets the coordinates/values to be transformed, and the vector
+ that it produces gets passed into the next input, and so on.
+
+ The output of the last connected input is used as the final value/coordinates.
+
+
+ Many transform filters support a mode where they have no attached primary input,
+ in which case they act as fields producing their coordinates as a vector.
+
+ But for transform filters that require a primary input, a `positionField` can
+ be attached to do the same thing.
+
+
+ The looping feature allows this operator to behave like a custom-built version
+ of `iteratedTransform`, repeating the sequence of transformations multiple times.'
inputs:
- contextTypes:
- Context
@@ -23,7 +46,7 @@ op:
- vec2
- vec3
- vec4
- label: definition_in
+ label: Primary Input
name: definition_in
required: true
returnTypes:
@@ -188,34 +211,71 @@ op:
name: Enable
- label: Apply To
menuOptions:
- - label: Coordinates
+ - description: The transforms are applied to coordinates which then get passed
+ to the primary input. This is equivalent to how common transform operators
+ like `rotate` behave.
+ label: Coordinates
name: coords
- - label: SDF UV
+ - description: The primary input is first called with un-transformed coordinates
+ to produce an SDF result, then the transform sequence is applied to the primary
+ UV coordinates of that result.
+ label: SDF UV
name: sdfuv
- - label: SDF Secondary UV
+ - description: Similar to primary UVs but for the secondary UVs that are used
+ in cases where two SDFs are blended.
+ label: SDF Secondary UV
name: sdfuv2
- - label: UV In Material
+ - description: The transforms are applied to the UVs included in the material
+ context that gets passed into the primary input, which would typically be
+ something like a `diffuseContrib`.
+ label: UV In Material
name: matuv
- - label: Field Values
+ - description: The primary input is first called with un-transformed coordinates
+ to produce a vector. Then the transform sequence is applied to that vector,
+ which then gets produced as an output.
+ label: Field Values
name: value
name: Target
readOnlyHandling: baked
regularHandling: baked
+ summary: What the transforms should be applied to.
- label: Reverse Order
name: Reverseorder
+ summary: Whether the transforms should be applied in reverse order, last to first.
- label: Enable Loop
name: Enableloop
readOnlyHandling: baked
regularHandling: baked
+ summary: Whether the transforms sequence should be applied multiple times, similar
+ to an `iteratedTransform`.
- label: Iterations
name: Iterations
readOnlyHandling: baked
regularHandling: runtime
+ summary: How many times to apply the transform sequence.
status: beta
+ summary: Applies one or more transform operators sequentially, to coordinates, field
+ values, etc, with support for looping.
variables:
- label: step
name: step
+ summary: The current loop index, 0, 1, 2, etc.
- label: normstep
name: normstep
+ summary: The current loop index, scaled to a 0..1 range.
---
+
+
+Applies one or more transform operators sequentially, to coordinates, field values, etc, with support for looping.
+
+The first input is the primary input, which can either be an arbitrary operator which will get the transformed coordinates, or it can be a field whose values are transformed, or an SDF whose UV coordinates are transformed, etc.
+
+The second and later inputs are the sequence of transforms that are applied to the primary.
+The second input gets the coordinates/values to be transformed, and the vector that it produces gets passed into the next input, and so on.
+The output of the last connected input is used as the final value/coordinates.
+
+Many transform filters support a mode where they have no attached primary input, in which case they act as fields producing their coordinates as a vector.
+But for transform filters that require a primary input, a `positionField` can be attached to do the same thing.
+
+The looping feature allows this operator to behave like a custom-built version of `iteratedTransform`, repeating the sequence of transformations multiple times.
\ No newline at end of file
diff --git a/docs/_reference/operators/filter/waveWarp.md b/docs/_reference/operators/filter/waveWarp.md
index f40b62d7d..f0ea17676 100644
--- a/docs/_reference/operators/filter/waveWarp.md
+++ b/docs/_reference/operators/filter/waveWarp.md
@@ -75,6 +75,7 @@ op:
name: Function
readOnlyHandling: runtime
regularHandling: runtime
+ summary: Type of wave used to offset space.
- label: Wave Axis
menuOptions:
- label: X
@@ -113,10 +114,12 @@ op:
name: Phaseoffset
readOnlyHandling: baked
regularHandling: runtime
+ summary: Offset applied to the wave phase separately for each axis.
- label: Amplitude Multiplier
name: Amplitudemult
readOnlyHandling: baked
regularHandling: runtime
+ summary: Multiplier applied to the wave amplitude separately for each axis.
summary: Uses repeating waves to offset space.
thumb: assets/images/reference/operators/filter/waveWarp_thumb.png
diff --git a/docs/_reference/operators/function/index.md b/docs/_reference/operators/function/index.md
index 0968084f5..08c54c0b1 100644
--- a/docs/_reference/operators/function/index.md
+++ b/docs/_reference/operators/function/index.md
@@ -20,6 +20,7 @@ cat:
- name: almostIdentityFn
summary: A mapping function that can change a value only when it's zero or very
close to it, where it replaces the value with a small constant.
+ thumb: assets/images/reference/operators/function/almostIdentityFn_thumb.png
- name: chopFn
summary: Function that looks up values in a CHOP.
- name: colorPaletteFn
@@ -27,7 +28,9 @@ cat:
summary: Cross-fades between two input functions, either based on a parameter
or on a third function.
- name: cubicPulseFn
+ thumb: assets/images/reference/operators/function/cubicPulseFn_thumb.png
- name: easeFn
+ thumb: assets/images/reference/operators/function/easeFn_thumb.png
- name: extendFn
summary: Defines the behavior of a function outside the normal expected range
of coordinates.
@@ -36,8 +39,10 @@ cat:
- name: gainFn
summary: A function that expands the sides of the coordinate range and compresses
the center.
+ thumb: assets/images/reference/operators/function/gainFn_thumb.png
- name: impulseFn
summary: Impulse functions that are useful as trigger patterns or animation envelopes.
+ thumb: assets/images/reference/operators/function/impulseFn_thumb.png
- name: joinFn
summary: Joins functions end on end.
- name: modulateFn
@@ -46,19 +51,27 @@ cat:
summary: Multiplies the returned values produced by all of the connected input
functions.
- name: parabolaFn
+ thumb: assets/images/reference/operators/function/parabolaFn_thumb.png
- keywords:
- toggle
- wave
name: pausingWaveFn
+ thumb: assets/images/reference/operators/function/pausingWaveFn_thumb.png
- name: pennerEasingFn
summary: Robert Penner's collection of easing functions.
+ thumb: assets/images/reference/operators/function/pennerEasingFn_thumb.png
- name: powerCurveFn
+ thumb: assets/images/reference/operators/function/powerCurveFn_thumb.png
- name: rainbowFn
+ thumb: assets/images/reference/operators/function/rainbowFn_thumb.png
- name: sincCurveFn
+ thumb: assets/images/reference/operators/function/sincCurveFn_thumb.png
- name: stepFn
summary: A function that changes from zero to one at a cutoff point.
+ thumb: assets/images/reference/operators/function/stepFn_thumb.png
- name: waveFn
summary: A function that uses a periodic wave, with the position as the parameter.
+ thumb: assets/images/reference/operators/function/waveFn_thumb.png
summary: Function operators are an advanced type of operator used to control the
behavior of other types of operators.
diff --git a/docs/_reference/operators/index.md b/docs/_reference/operators/index.md
index e5e0a29e8..efa70e5c7 100644
--- a/docs/_reference/operators/index.md
+++ b/docs/_reference/operators/index.md
@@ -31,7 +31,7 @@ output.
Pattern operators are essentially a sub-category of field operators that focus
on producing value or color patterns using 2D coordinates.
-* [Post](post/) -
+* [Post](post/) - Post processing operators are components that take information from a renderer and process it to produce images that can be used for post-processing.
* [Sdf](sdf/) - Signed distances functions which define geometry in 3D space, by calculating
the distance from the surface of the shape at any given point.
* [Sdf2d](sdf2d/) - Signed distances functions which define geometry in 2D space, by calculating
diff --git a/docs/_reference/operators/light/ambientLight.md b/docs/_reference/operators/light/ambientLight.md
index 766d11a98..71d765c1d 100644
--- a/docs/_reference/operators/light/ambientLight.md
+++ b/docs/_reference/operators/light/ambientLight.md
@@ -8,6 +8,11 @@ redirect_from:
- /reference/opType/raytk.operators.light.ambientLight/
op:
category: light
+ detail: 'As far as a material is concerned, an ambient light is always right in
+ front of any point on a surface.
+
+
+ Use cases for this are relatively rare.'
inputs:
- contextTypes:
- LightContext
@@ -18,6 +23,9 @@ op:
returnTypes:
- float
- vec4
+ summary: Field controls the color of the light based on the position of surface
+ hits where it is being applied. The resulting color is multiplied by the `Color`
+ parameter and `Intensity`.
supportedVariables:
- lightdir
name: ambientLight
@@ -27,17 +35,31 @@ op:
name: Intensity
readOnlyHandling: baked
regularHandling: runtime
+ summary: Brightness that is applied to the `Color`.
- label: Color
name: Color
readOnlyHandling: baked
regularHandling: runtime
+ summary: Color of the light.
- label: Enable Shadow
name: Enableshadow
readOnlyHandling: baked
regularHandling: runtime
+ summary: Whether the light should produce shadows.
status: beta
+ summary: Ambient light source that doesn't come from a particular location.
variables:
- label: lightdir
name: lightdir
+ summary: Direction that the light is from the current position on a surface that's
+ being shaded. This will always be directly in front of whatever point is being
+ shaded based on the surface normal at that point.
---
+
+
+Ambient light source that doesn't come from a particular location.
+
+As far as a material is concerned, an ambient light is always right in front of any point on a surface.
+
+Use cases for this are relatively rare.
\ No newline at end of file
diff --git a/docs/_reference/operators/light/axisLight.md b/docs/_reference/operators/light/axisLight.md
index dcc702a77..f24fafed6 100644
--- a/docs/_reference/operators/light/axisLight.md
+++ b/docs/_reference/operators/light/axisLight.md
@@ -17,6 +17,8 @@ op:
name: positionField
returnTypes:
- vec4
+ summary: Field offsets the position of the light. The coordinates that this field
+ gets are the spot on the surface that the light is being calculated for.
- contextTypes:
- LightContext
coordTypes:
@@ -26,6 +28,9 @@ op:
returnTypes:
- float
- vec4
+ summary: Field controls the color of the light based on the position of surface
+ hits where it is being applied. The resulting color is multiplied by the `Color`
+ parameter and `Intensity`.
supportedVariableInputs:
- positionField
supportedVariables:
@@ -39,6 +44,9 @@ op:
returnTypes:
- float
- vec4
+ summary: Field/function that controls the slope and coloration of the attenuation
+ rolloff is shaped. It can be used to make the light shift from one color to
+ another, or to control the sharpness of the rolloff.
supportedVariableInputs:
- positionField
- colorField
@@ -58,43 +66,56 @@ op:
name: Axis
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Axis that the limit emits from.
- label: Position
name: Position
readOnlyHandling: baked
regularHandling: runtime
+ summary: Position of the light. One axis of this won't be used since the light
+ is infinite along one axis.
- label: Rotate
name: Rotate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Rotates the light source.
- label: Intensity
name: Intensity
readOnlyHandling: baked
regularHandling: runtime
+ summary: Brightness that is applied to the `Color`.
- label: Color
name: Color
readOnlyHandling: baked
regularHandling: runtime
+ summary: Color of the light.
- label: Attenuated
name: Enableattenuation
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether to limit the light range.
- label: Attenuation Start
name: Attenuationstart
readOnlyHandling: baked
regularHandling: runtime
+ summary: The distance at which the light starts to dim.
- label: Attenuation End
name: Attenuationend
readOnlyHandling: baked
regularHandling: runtime
+ summary: The distance at which the light is fully dimmed.
- label: Enable Shadow
name: Enableshadow
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether the light should produce shadows.
summary: Light that emits from along an axis, similar to an infinitely long tube
light.
+ thumb: assets/images/reference/operators/light/axisLight_thumb.png
variables:
- label: lightdir
name: lightdir
+ summary: Direction that the light is from the current position on a surface that's
+ being shaded. This will be the closet point along the chosen axis.
---
diff --git a/docs/_reference/operators/light/directionalLight.md b/docs/_reference/operators/light/directionalLight.md
index e56169c01..74afef718 100644
--- a/docs/_reference/operators/light/directionalLight.md
+++ b/docs/_reference/operators/light/directionalLight.md
@@ -20,6 +20,9 @@ op:
returnTypes:
- float
- vec4
+ summary: Field controls the color of the light based on the position of surface
+ hits where it is being applied. The resulting color is multiplied by the `Color`
+ parameter and `Intensity`.
supportedVariables:
- lightdir
name: directionalLight
@@ -40,6 +43,7 @@ op:
name: Color
readOnlyHandling: baked
regularHandling: runtime
+ summary: Color of the light.
- label: Rotate
name: Rotate
readOnlyHandling: baked
@@ -49,17 +53,18 @@ op:
name: Enableshadow
readOnlyHandling: semibaked
regularHandling: runtime
- summary: Whether this light should cast shadows.
- summary: A directional light.
+ summary: Whether the light should produce shadows.
+ summary: Directional or distant light which always comes from one direction.
+ thumb: assets/images/reference/operators/light/directionalLight_thumb.png
variables:
- - label: RTK_raytk_operators_light_directionalLight_lightdir
- name: RTK_raytk_operators_light_directionalLight_lightdir
- label: lightdir
name: lightdir
+ summary: Direction that the light is from the current position on a surface that's
+ being shaded. This will always be the Direction with rotation applied.
---
-A directional light.
+Directional or distant light which always comes from one direction.
The light always comes from the specified direction, rather than from a point.
\ No newline at end of file
diff --git a/docs/_reference/operators/light/index.md b/docs/_reference/operators/light/index.md
index 2816a0828..68440140b 100644
--- a/docs/_reference/operators/light/index.md
+++ b/docs/_reference/operators/light/index.md
@@ -13,15 +13,21 @@ cat:
operators:
- name: ambientLight
status: beta
+ summary: Ambient light source that doesn't come from a particular location.
- name: axisLight
summary: Light that emits from along an axis, similar to an infinitely long tube
light.
+ thumb: assets/images/reference/operators/light/axisLight_thumb.png
- name: directionalLight
- summary: A directional light.
+ summary: Directional or distant light which always comes from one direction.
+ thumb: assets/images/reference/operators/light/directionalLight_thumb.png
- name: hardShadow
summary: A simple hard-edged shadow.
+ thumb: assets/images/reference/operators/light/hardShadow_thumb.png
+ - name: instanceLight
- name: lightVolume
status: beta
+ thumb: assets/images/reference/operators/light/lightVolume_thumb.png
- name: linkedLight
status: beta
summary: Light that is based on a standard Light COMP.
@@ -30,11 +36,12 @@ cat:
- name: pointLight
shortcuts:
- pl
- summary: Light eminating from a single point in space, with optional distance
- attentuation.
+ summary: Light that emits from a single point in space.
- name: ringLight
+ summary: Light that emits from a torus or ring shape.
- name: softShadow
summary: A soft-edged shadow.
+ thumb: assets/images/reference/operators/light/softShadow_thumb.png
- name: spotLight
summary: Cone-shaped spotlight.
- name: volumetricRayCast
diff --git a/docs/_reference/operators/light/instanceLight.md b/docs/_reference/operators/light/instanceLight.md
new file mode 100644
index 000000000..ea84d2179
--- /dev/null
+++ b/docs/_reference/operators/light/instanceLight.md
@@ -0,0 +1,54 @@
+---
+layout: operator
+title: instanceLight
+parent: Light Operators
+grand_parent: Operators
+permalink: /reference/operators/light/instanceLight
+redirect_from:
+ - /reference/opType/raytk.operators.light.instanceLight/
+op:
+ category: light
+ inputs:
+ - contextTypes:
+ - LightContext
+ coordTypes:
+ - vec3
+ label: Light
+ name: light
+ required: true
+ returnTypes:
+ - Light
+ name: instanceLight
+ opType: raytk.operators.light.instanceLight
+ parameters:
+ - label: Enable
+ name: Enable
+ - label: Instance Count
+ name: Instancecount
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: The number of copies to produce and merge.
+ - label: Enable Transform CHOP
+ name: Enabletransformchop
+ - label: Transform CHOP
+ name: Transformchop
+ summary: A CHOP containing channels `tx ty tz` and/or `rx ry rz` that specifies
+ the translate and/or rotate for each instance.
+ - label: Enable Translate
+ name: Enabletranslate
+ - label: Enable Rotate
+ name: Enablerotate
+ - label: Enable Active CHOP
+ name: Enableactivechop
+ - label: Active CHOP
+ name: Activechop
+ summary: A CHOP containing a channel named `active`, which is used to selectively
+ turn instances off. Any instance with an active value of 0 or less will be excluded
+ from the combined result.
+ variables:
+ - label: index
+ name: index
+ - label: normindex
+ name: normindex
+
+---
diff --git a/docs/_reference/operators/light/linkedLight.md b/docs/_reference/operators/light/linkedLight.md
index 2d1b3d802..f492efe00 100644
--- a/docs/_reference/operators/light/linkedLight.md
+++ b/docs/_reference/operators/light/linkedLight.md
@@ -26,6 +26,7 @@ op:
name: Enableshadow
readOnlyHandling: baked
regularHandling: runtime
+ summary: Whether the light should produce shadows.
status: beta
summary: Light that is based on a standard Light COMP.
diff --git a/docs/_reference/operators/light/pointLight.md b/docs/_reference/operators/light/pointLight.md
index bc2c3fd0b..4ba8370d6 100644
--- a/docs/_reference/operators/light/pointLight.md
+++ b/docs/_reference/operators/light/pointLight.md
@@ -17,9 +17,9 @@ op:
name: positionField
returnTypes:
- vec4
- summary: Optional field that can control the color of the light based on the position
- of surface hits where it is being applied. The resulting color is multiplied
- by the `Color` parameter and `Intensity`.
+ summary: Field controls the color of the light based on the position of surface
+ hits where it is being applied. The resulting color is multiplied by the `Color`
+ parameter and `Intensity`.
- contextTypes:
- LightContext
coordTypes:
@@ -29,9 +29,9 @@ op:
returnTypes:
- float
- vec4
- summary: Optional field/function that controls the slope and coloration of the
- attentuation rolloff is shaped. It can be used to make the light shift from
- one color to another, or to control the sharpness of the rolloff.
+ summary: Field/function that controls the slope and coloration of the attenuation
+ rolloff is shaped. It can be used to make the light shift from one color to
+ another, or to control the sharpness of the rolloff.
supportedVariableInputs:
- positionField
supportedVariables:
@@ -57,12 +57,12 @@ op:
name: Position
readOnlyHandling: baked
regularHandling: runtime
- summary: The point from which the light eminates.
+ summary: The point from which the light emits.
- label: Intensity
name: Intensity
readOnlyHandling: baked
regularHandling: runtime
- summary: Brightness of the light.
+ summary: Brightness that is applied to the `Color`.
- label: Color
name: Color
readOnlyHandling: baked
@@ -89,7 +89,7 @@ op:
regularHandling: runtime
shortcuts:
- pl
- summary: Light eminating from a single point in space, with optional distance attentuation.
+ summary: Light that emits from a single point in space.
variables:
- label: lightdir
name: lightdir
@@ -97,4 +97,4 @@ op:
---
-Light eminating from a single point in space, with optional distance attentuation.
\ No newline at end of file
+Light that emits from a single point in space.
\ No newline at end of file
diff --git a/docs/_reference/operators/light/ringLight.md b/docs/_reference/operators/light/ringLight.md
index 15d5d33b9..d68359625 100644
--- a/docs/_reference/operators/light/ringLight.md
+++ b/docs/_reference/operators/light/ringLight.md
@@ -18,6 +18,9 @@ op:
returnTypes:
- float
- vec4
+ summary: Field controls the color of the light based on the position of surface
+ hits where it is being applied. The resulting color is multiplied by the `Color`
+ parameter and `Intensity`.
name: ringLight
opType: raytk.operators.light.ringLight
parameters:
@@ -25,10 +28,12 @@ op:
name: Intensity
readOnlyHandling: baked
regularHandling: runtime
+ summary: Brightness that is applied to the `Color`.
- label: Color
name: Color
readOnlyHandling: baked
regularHandling: runtime
+ summary: Color of the light.
- label: Axis
menuOptions:
- label: X
@@ -40,29 +45,40 @@ op:
name: Axis
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: The axis which the ring faces.
- label: Position
name: Position
readOnlyHandling: baked
regularHandling: runtime
+ summary: Center position of the ring.
- label: Radius
name: Radius
readOnlyHandling: baked
regularHandling: runtime
+ summary: Radius of the ring.
- label: Attenuated
name: Enableattenuation
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether to limit the light range.
- label: Attenuation Start
name: Attenuationstart
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: The distance at which the light starts to dim.
- label: Attenuation End
name: Attenuationend
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: The distance at which the light is fully dimmed.
- label: Enable Shadow
name: Enableshadow
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether the light should produce shadows.
+ summary: Light that emits from a torus or ring shape.
---
+
+
+Light that emits from a torus or ring shape.
\ No newline at end of file
diff --git a/docs/_reference/operators/light/spotLight.md b/docs/_reference/operators/light/spotLight.md
index 0b80f466e..36cd6961d 100644
--- a/docs/_reference/operators/light/spotLight.md
+++ b/docs/_reference/operators/light/spotLight.md
@@ -29,10 +29,16 @@ op:
returnTypes:
- float
- vec4
- summary: Optional function that controls the color/intensity of the light based
- on the attenuation distance.
+ summary: Field controls the color of the light based on the position of surface
+ hits where it is being applied. The resulting color is multiplied by the `Color`
+ parameter and `Intensity`.
supportedVariableInputs:
- colorField
+ - label: attenuationField
+ name: attenuationField
+ summary: Field/function that controls the slope and coloration of the attenuation
+ rolloff is shaped. It can be used to make the light shift from one color to
+ another, or to control the sharpness of the rolloff.
name: spotLight
opType: raytk.operators.light.spotLight
parameters:
@@ -40,10 +46,12 @@ op:
name: Intensity
readOnlyHandling: baked
regularHandling: runtime
+ summary: Brightness that is applied to the `Color`.
- label: Color
name: Color
readOnlyHandling: baked
regularHandling: runtime
+ summary: Color of the light.
- label: Position
name: Position
readOnlyHandling: baked
@@ -63,32 +71,47 @@ op:
name: Conedelta
readOnlyHandling: baked
regularHandling: runtime
- summary: The amount of blending between the inside and outside of the cone.
+ summary: The amount of blending between the inside and the outside of the cone.
- label: Attenuated
name: Enableattenuation
readOnlyHandling: semibaked
regularHandling: runtime
- summary: Whether to adjust the amount of light depending on distance.
+ summary: Whether to limit the light range.
- label: Attenuation Start
name: Attenuationstart
readOnlyHandling: baked
regularHandling: runtime
- summary: The start of the blending range, inside which the light will be at full
- intensity.
+ summary: The distance at which the light starts to dim.
- label: Attenuation End
name: Attenuationend
readOnlyHandling: baked
regularHandling: runtime
- summary: The end of the blending range, outside which the light will be at zero
- intensity.
+ summary: The distance at which the light is fully dimmed.
- label: Rotate
name: Rotate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Rotation for the direction that the light faces.
+ - label: Enable Look At
+ name: Enablelookat
+ readOnlyHandling: semibaked
+ regularHandling: runtime
+ summary: Whether the light should face a specific position.
+ - label: Look At Position
+ name: Lookatpos
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Coordinates that the light should face.
+ - label: Up Vector
+ name: Upvec
+ readOnlyHandling: baked
+ regularHandling: runtime
+ summary: Up vector used to orient the light.
- label: Enable Shadow
name: Enableshadow
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether the light should produce shadows.
summary: Cone-shaped spotlight.
---
diff --git a/docs/_reference/operators/material/index.md b/docs/_reference/operators/material/index.md
index 8bebcb588..43419bf5c 100644
--- a/docs/_reference/operators/material/index.md
+++ b/docs/_reference/operators/material/index.md
@@ -16,6 +16,7 @@ cat:
on the surface normal, for use in a modularMat.
- name: basicMat
summary: Material with a basic lighting model.
+ thumb: assets/images/reference/operators/material/basicMat_thumb.png
- name: colorizeSdf2d
summary: Converts a 2D SDF to a striped distance pattern.
- keywords:
@@ -30,6 +31,7 @@ cat:
shortcuts:
- dc
summary: A material element that provides diffuse light contribution.
+ thumb: assets/images/reference/operators/material/diffuseContrib_thumb.png
- name: goochShadingContrib
summary: A material element that uses the Gooch shading model.
- name: hologramContrib
@@ -38,14 +40,18 @@ cat:
status: beta
summary: Shading element that produces a rainbow pattern around the edges of shapes,
depending on which direction the surface is facing (the surface normal).
+ thumb: assets/images/reference/operators/material/iridescenceContrib_thumb.png
- name: matCapContrib
status: beta
+ summary: Shading using a MatCap (Material Capture) image to fake lighting and
+ reflections.
- name: modularMat
shortcuts:
- mm
summary: A material that is composed of one or more shading elements.
- name: pbrMat
status: beta
+ thumb: assets/images/reference/operators/material/pbrMat_thumb.png
- name: phongMat
status: deprecated
summary: Material that uses phong shading.
@@ -61,7 +67,11 @@ cat:
other surfaces.
- name: reflectMat
status: beta
+ thumb: assets/images/reference/operators/material/reflectMat_thumb.png
- name: rimContrib
+ summary: Shading that is applied to the edges of a surface relative to where it's
+ viewed from.
+ thumb: assets/images/reference/operators/material/rimContrib_thumb.png
- name: sampledPointMat
summary: A material that produces color for volumetric points relative to the
input shape.
@@ -78,6 +88,7 @@ cat:
summary: A material element that produces the shading level for the surface.
- name: skyLightContrib
summary: A material element that acts as a basic pseudo directional light.
+ thumb: assets/images/reference/operators/material/skyLightContrib_thumb.png
- keywords:
- ggx
- lighting
@@ -90,6 +101,7 @@ cat:
shortcuts:
- sc
summary: A material element that provides specular light contribution.
+ thumb: assets/images/reference/operators/material/specularContrib_thumb.png
- name: subsurfaceContrib
status: beta
- keywords:
@@ -104,6 +116,7 @@ cat:
status: beta
summary: Modular shading element which uses a cell/toon shading technique with
a color ramp.
+ thumb: assets/images/reference/operators/material/toonShadingContrib_thumb.png
summary: 'Material operators that are used by renderers to determine the
color of points on the surface of geometry.'
diff --git a/docs/_reference/operators/material/matCapContrib.md b/docs/_reference/operators/material/matCapContrib.md
index 11351e00e..983635d14 100644
--- a/docs/_reference/operators/material/matCapContrib.md
+++ b/docs/_reference/operators/material/matCapContrib.md
@@ -8,6 +8,15 @@ redirect_from:
- /reference/opType/raytk.operators.material.matCapContrib/
op:
category: material
+ detail: 'MatCap images are available on [github](https://github.com/nidorx/matcaps).
+
+
+ Note that this shading does not use actual lights or reflections, it''s a shortcut
+ that fakes those things which are pre-computed and baked into the images that
+ the shading is based on.
+
+
+ This approach is commonly used in sculpting tools like zBrush.'
inputs:
- contextTypes:
- MaterialContext
@@ -42,5 +51,15 @@ op:
readOnlyHandling: baked
regularHandling: baked
status: beta
+ summary: Shading using a MatCap (Material Capture) image to fake lighting and reflections.
---
+
+
+Shading using a MatCap (Material Capture) image to fake lighting and reflections.
+
+MatCap images are available on [github](https://github.com/nidorx/matcaps).
+
+Note that this shading does not use actual lights or reflections, it's a shortcut that fakes those things which are pre-computed and baked into the images that the shading is based on.
+
+This approach is commonly used in sculpting tools like zBrush.
\ No newline at end of file
diff --git a/docs/_reference/operators/material/rimContrib.md b/docs/_reference/operators/material/rimContrib.md
index 6e25bd385..baf649dfe 100644
--- a/docs/_reference/operators/material/rimContrib.md
+++ b/docs/_reference/operators/material/rimContrib.md
@@ -8,6 +8,11 @@ redirect_from:
- /reference/opType/raytk.operators.material.rimContrib/
op:
category: material
+ detail: 'This is similar to the Rim Light feature in a standard Phong MAT.
+
+
+ Using rim shading can result in aliasing issues, since it''s essentially highlighting
+ the areas that are most likely to have aliasing.'
inputs:
- contextTypes:
- MaterialContext
@@ -59,10 +64,13 @@ op:
parameters:
- label: Enable
name: Enable
+ summary: When off, this shading will produce values of 0, meaning no contribution
+ to shading.
- label: Level
name: Level
readOnlyHandling: baked
regularHandling: runtime
+ summary: Brightness of the shading, which is used as a multiplier for the Color.
- label: Use Color
name: Usecolor
summary: Whether to produce color or just a brightness value.
@@ -70,10 +78,13 @@ op:
name: Color
readOnlyHandling: baked
regularHandling: runtime
+ summary: Color of the shading.
- label: Use Surface Color
name: Usesurfacecolor
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Whether this shading should take into account the surface color attribute
+ on the SDF (if present).
- label: Enable Shadow
name: Enableshadow
readOnlyHandling: baked
@@ -83,13 +94,24 @@ op:
name: Thickness
readOnlyHandling: baked
regularHandling: runtime
+ summary: Width of the highlight area on the sides.
- label: Blending
name: Blending
readOnlyHandling: baked
regularHandling: runtime
+ summary: Amount of fading between highlighted and not highlighted areas.
+ summary: Shading that is applied to the edges of a surface relative to where it's
+ viewed from.
thumb: assets/images/reference/operators/material/rimContrib_thumb.png
variables:
- label: normangle
name: normangle
---
+
+
+Shading that is applied to the edges of a surface relative to where it's viewed from.
+
+This is similar to the Rim Light feature in a standard Phong MAT.
+
+Using rim shading can result in aliasing issues, since it's essentially highlighting the areas that are most likely to have aliasing.
\ No newline at end of file
diff --git a/docs/_reference/operators/material/sampledPointMat.md b/docs/_reference/operators/material/sampledPointMat.md
index 5da328eea..2466ae8a0 100644
--- a/docs/_reference/operators/material/sampledPointMat.md
+++ b/docs/_reference/operators/material/sampledPointMat.md
@@ -22,6 +22,40 @@ op:
required: true
returnTypes:
- Sdf
+ - contextTypes:
+ - MaterialContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ label: Offset Field
+ name: offsetField
+ returnTypes:
+ - float
+ summary: Optional field used to control the color within the shape.
+ supportedVariables:
+ - surfacecolor
+ - surfaceuv
+ - normal
+ - sdf
+ - contextTypes:
+ - MaterialContext
+ coordTypes:
+ - float
+ - vec2
+ - vec3
+ label: Blending Field
+ name: blendingField
+ returnTypes:
+ - float
+ summary: Optional field used to control the color at the surface.
+ supportedVariableInputs:
+ - offsetField
+ supportedVariables:
+ - surfacecolor
+ - surfaceuv
+ - normal
+ - sdf
- contextTypes:
- MaterialContext
coordTypes:
@@ -33,7 +67,9 @@ op:
returnTypes:
- float
- vec4
- summary: Optional field used to control the color within the shape.
+ supportedVariableInputs:
+ - offsetField
+ - blendingField
supportedVariables:
- surfacecolor
- surfaceuv
@@ -50,8 +86,9 @@ op:
returnTypes:
- float
- vec4
- summary: Optional field used to control the color at the surface.
supportedVariableInputs:
+ - offsetField
+ - blendingField
- fillColorField
supportedVariables:
- surfacecolor
diff --git a/docs/_reference/operators/material/specularContrib.md b/docs/_reference/operators/material/specularContrib.md
index da328319a..7b08df35c 100644
--- a/docs/_reference/operators/material/specularContrib.md
+++ b/docs/_reference/operators/material/specularContrib.md
@@ -103,7 +103,7 @@ op:
- label: GGX
name: ggx
name: Method
- readOnlyHandling: semibaked
+ readOnlyHandling: baked
regularHandling: runtime
summary: The type of specular shading to use. Different methods support different
combinations of the other parameters.
diff --git a/docs/_reference/operators/output/index.md b/docs/_reference/operators/output/index.md
index e4245dcfd..059accc9e 100644
--- a/docs/_reference/operators/output/index.md
+++ b/docs/_reference/operators/output/index.md
@@ -15,8 +15,10 @@ cat:
operators:
- name: fieldRender
status: beta
+ thumb: assets/images/reference/operators/output/fieldRender_thumb.png
- name: functionGraphRender
summary: Visualizes the graph of a function operator.
+ thumb: assets/images/reference/operators/output/functionGraphRender_thumb.png
- keywords:
- point
- render
@@ -26,6 +28,7 @@ cat:
- pmr
summary: Renderer that takes in a TOP of coordinates and evaluates the scene at
each point.
+ thumb: assets/images/reference/operators/output/pointMapRender_thumb.png
- keywords:
- inspect
- preview
@@ -41,6 +44,7 @@ cat:
shortcuts:
- r2
summary: Renders a 2D image by evaluating the input field for each pixel.
+ thumb: assets/images/reference/operators/output/render2D_material_thumb.png
- name: renderSelect
summary: Accesses a color output buffer from a renderer.
summary: 'Outputs are a special category of operator that takes in one or more
diff --git a/docs/_reference/operators/pattern/brickPattern.md b/docs/_reference/operators/pattern/brickPattern.md
index 7ad640b72..a9a30f40c 100644
--- a/docs/_reference/operators/pattern/brickPattern.md
+++ b/docs/_reference/operators/pattern/brickPattern.md
@@ -8,6 +8,12 @@ redirect_from:
- /reference/opType/raytk.operators.pattern.brickPattern/
op:
category: pattern
+ detail: 'This pattern produces just float values not colors. To apply color to it,
+ pass it into a `colorRampField`.
+
+
+ The bricks themselves produce values of 0 (or black) and the spaces between them
+ produce values of 1 (or white).'
inputs:
- contextTypes:
- Context
@@ -25,6 +31,8 @@ op:
name: coordField
returnTypes:
- vec4
+ summary: Field that produces vectors that the pattern uses as coordinates instead
+ of regular spatial position. Only the X and Y parts are used.
- contextTypes:
- Context
- MaterialContext
@@ -41,6 +49,7 @@ op:
name: thicknessField
returnTypes:
- float
+ summary: Field that controls the thickness of the spacing between bricks.
supportedVariableInputs:
- coordField
- contextTypes:
@@ -59,6 +68,7 @@ op:
name: blendingField
returnTypes:
- float
+ summary: Field that controls the amount of blending between bricks and spacing.
supportedVariableInputs:
- coordField
- thicknessField
@@ -78,6 +88,7 @@ op:
name: shiftField
returnTypes:
- float
+ summary: Field that controls how much alternating rows are shifted.
supportedVariableInputs:
- coordField
- thicknessField
@@ -89,22 +100,36 @@ op:
name: Shift
readOnlyHandling: baked
regularHandling: runtime
+ summary: Offsets every other row of bricks. A value of 0 means a regular grid,
+ and 0.5 is a standard staggered brick layout.
- label: Translate
name: Translate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Moves the entire pattern.
- label: Size
name: Size
readOnlyHandling: baked
regularHandling: runtime
+ summary: Scales the pattern.
- label: Thickness
name: Thickness
readOnlyHandling: baked
regularHandling: runtime
+ summary: Thickness of the spacing between the bricks.
- label: Blending
name: Blending
readOnlyHandling: baked
regularHandling: runtime
+ summary: Amount of blending between bricks and spacing.
+ summary: Pattern of stacked rectangular bricks.
thumb: assets/images/reference/operators/pattern/brickPattern_thumb.png
---
+
+
+Pattern of stacked rectangular bricks.
+
+This pattern produces just float values not colors. To apply color to it, pass it into a `colorRampField`.
+
+The bricks themselves produce values of 0 (or black) and the spaces between them produce values of 1 (or white).
\ No newline at end of file
diff --git a/docs/_reference/operators/pattern/checkerPattern.md b/docs/_reference/operators/pattern/checkerPattern.md
index 7f33e42b2..2d2fcd8f1 100644
--- a/docs/_reference/operators/pattern/checkerPattern.md
+++ b/docs/_reference/operators/pattern/checkerPattern.md
@@ -8,6 +8,8 @@ redirect_from:
- /reference/opType/raytk.operators.pattern.checkerPattern/
op:
category: pattern
+ detail: This pattern produces just float values not colors. To apply color to it,
+ pass it into a `colorRampField`.
inputs:
- contextTypes:
- Context
@@ -25,8 +27,8 @@ op:
name: coordField
returnTypes:
- vec4
- summary: Optional field that can provide alternative coordinates instead of using
- the raw X/Y position.
+ summary: Field that produces vectors that the pattern uses as coordinates instead
+ of regular spatial position. Only the X and Y parts are used.
name: checkerPattern
opType: raytk.operators.pattern.checkerPattern
parameters:
@@ -34,14 +36,18 @@ op:
name: Translate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Moves the entire pattern.
- label: Size
name: Size
readOnlyHandling: baked
regularHandling: runtime
+ summary: Scales the pattern.
summary: Checkerboard pattern with alternating black and white rectangles.
thumb: assets/images/reference/operators/pattern/checkerPattern_thumb.png
---
-Checkerboard pattern with alternating black and white rectangles.
\ No newline at end of file
+Checkerboard pattern with alternating black and white rectangles.
+
+This pattern produces just float values not colors. To apply color to it, pass it into a `colorRampField`.
\ No newline at end of file
diff --git a/docs/_reference/operators/pattern/gridPattern.md b/docs/_reference/operators/pattern/gridPattern.md
index b4a24012b..a0ee89eb9 100644
--- a/docs/_reference/operators/pattern/gridPattern.md
+++ b/docs/_reference/operators/pattern/gridPattern.md
@@ -8,6 +8,8 @@ redirect_from:
- /reference/opType/raytk.operators.pattern.gridPattern/
op:
category: pattern
+ detail: This operator produces different types of values from the grid depending
+ on the selected Format.
inputs:
- contextTypes:
- Context
@@ -25,6 +27,8 @@ op:
name: coordField
returnTypes:
- vec4
+ summary: Field that produces vectors that the pattern uses as coordinates instead
+ of regular spatial position. Only the X and Y parts are used.
- contextTypes:
- Context
- MaterialContext
@@ -42,6 +46,7 @@ op:
returnTypes:
- float
- vec4
+ summary: Field that controls the sizing of the grid cells.
supportedVariableInputs:
- coordField
- contextTypes:
@@ -60,6 +65,7 @@ op:
name: thicknessField
returnTypes:
- float
+ summary: Field that controls the thickness of the edges between cells.
supportedVariableInputs:
- coordField
- spacingField
@@ -79,6 +85,7 @@ op:
name: blendingField
returnTypes:
- float
+ summary: Field that controls the amount of blending between cells and edges.
supportedVariableInputs:
- coordField
- spacingField
@@ -100,6 +107,7 @@ op:
returnTypes:
- float
- vec4
+ summary: Field that provides colors for the cells.
supportedVariableInputs:
- coordField
- spacingField
@@ -122,6 +130,7 @@ op:
returnTypes:
- float
- vec4
+ summary: Field that provides colors for the edges.
supportedVariableInputs:
- coordField
- spacingField
@@ -133,37 +142,54 @@ op:
parameters:
- label: Format
menuOptions:
- - label: Grid Edges
+ - description: Produces float values, with 0 for the grid cells and 1 for the
+ edges between cells.
+ label: Grid Edges
name: edge
- - label: Grid Distance
+ - description: Produces float values with the raw distance from the edge, like
+ an SDF.
+ label: Grid Distance
name: dist
- - label: Grid Normalized Distance
+ - description: Produces float values with the distance scaled so that edges are
+ 0 and cell centers are 1.
+ label: Grid Normalized Distance
name: normdist
- - label: Grid Color
+ - description: Produces vectors with the chosen color for the cells and the edges.
+ label: Grid Color
name: color
name: Format
readOnlyHandling: baked
regularHandling: baked
+ summary: What type of values to produce from the pattern.
- label: Translate
name: Translate
readOnlyHandling: baked
regularHandling: runtime
- - label: Spacing
- name: Spacing
- readOnlyHandling: baked
- regularHandling: runtime
+ summary: Moves the entire pattern.
+ - name: Size
+ summary: Scales the pattern.
- label: Thickness
name: Thickness
+ summary: Thickness of the edges between the cells.
- label: Blending
name: Blending
+ summary: Amount of blending between cells and edges.
- label: Fill Color
name: Fillcolor
+ summary: Color to use for the cells (when applicable).
- label: Edge Color
name: Edgecolor
+ summary: Color to use for the edges (when applicable).
+ - label: Spacing
+ name: Spacing
+ readOnlyHandling: baked
+ regularHandling: runtime
summary: Rectangular grid pattern.
thumb: assets/images/reference/operators/pattern/gridPattern_thumb.png
---
-Rectangular grid pattern.
\ No newline at end of file
+Rectangular grid pattern.
+
+This operator produces different types of values from the grid depending on the selected Format.
\ No newline at end of file
diff --git a/docs/_reference/operators/pattern/hexagonalGridPattern.md b/docs/_reference/operators/pattern/hexagonalGridPattern.md
index a2edd5320..6cc77bf79 100644
--- a/docs/_reference/operators/pattern/hexagonalGridPattern.md
+++ b/docs/_reference/operators/pattern/hexagonalGridPattern.md
@@ -8,6 +8,8 @@ redirect_from:
- /reference/opType/raytk.operators.pattern.hexagonalGridPattern/
op:
category: pattern
+ detail: This operator produces different types of values from the grid depending
+ on the selected Pattern.
inputs:
- contextTypes:
- Context
@@ -25,6 +27,8 @@ op:
name: coordField
returnTypes:
- vec4
+ summary: Field that produces vectors that the pattern uses as coordinates instead
+ of regular spatial position. Only the X and Y parts are used.
- contextTypes:
- Context
- MaterialContext
@@ -41,6 +45,7 @@ op:
name: thicknessField
returnTypes:
- float
+ summary: Field that controls the thickness of the edges between cells.
supportedVariableInputs:
- coordField
- contextTypes:
@@ -59,6 +64,7 @@ op:
name: blendingField
returnTypes:
- float
+ summary: Field that controls the amount of blending between cells and edges.
supportedVariableInputs:
- coordField
- thicknessField
@@ -79,6 +85,7 @@ op:
returnTypes:
- float
- vec4
+ summary: Field to provide cell color 1.
supportedVariableInputs:
- coordField
- thicknessField
@@ -100,6 +107,7 @@ op:
returnTypes:
- float
- vec4
+ summary: Field to provide cell color 2.
supportedVariableInputs:
- coordField
- thicknessField
@@ -121,6 +129,7 @@ op:
returnTypes:
- float
- vec4
+ summary: Field to provide cell color 3.
supportedVariableInputs:
- coordField
- thicknessField
@@ -130,45 +139,67 @@ op:
parameters:
- label: Pattern
menuOptions:
- - label: Hex Grid
+ - description: Produces float values, with 1 for the grid cells, and 0 for the
+ edges between cells.
+ label: Hex Grid
name: hexgrid
- - label: Hex Distance
+ - description: Produces float values with the distance scaled so that edges are
+ 0 and cell centers are 1.
+ label: Hex Distance
name: hexdist
- - label: Hex 3 Pattern
+ - description: Produces float values which mark each cell with either 0, 0.5,
+ or 1, such that no two adjacent cells are the same.
+ label: Hex 3 Pattern
name: hex3
- - label: Hex 3 Color Pattern
+ - description: Produces vectors with colors where 3 chosen colors are applied
+ to cells, such that no two adjacent cells are the same.
+ label: Hex 3 Color Pattern
name: hex3color
name: Pattern
readOnlyHandling: baked
regularHandling: baked
+ summary: What type of values to produce from the grid.
- label: Translate
name: Translate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Moves the entire pattern.
- label: Size
name: Size
readOnlyHandling: baked
regularHandling: runtime
+ summary: Scales the pattern.
- label: Thickness
name: Thickness
readOnlyHandling: baked
regularHandling: runtime
+ summary: Thickness of the edges between the cells.
- label: Blending
name: Blending
readOnlyHandling: baked
regularHandling: runtime
+ summary: Amount of blending between cells and edges.
- label: Poly Color 1
name: Polycolor1
readOnlyHandling: baked
regularHandling: runtime
+ summary: Color 1 to use for cells (when applicable).
- label: Poly Color 2
name: Polycolor2
readOnlyHandling: baked
regularHandling: runtime
+ summary: Color 2 to use for cells (when applicable).
- label: Poly Color 3
name: Polycolor3
readOnlyHandling: baked
regularHandling: runtime
+ summary: Color 3 to use for cells (when applicable).
+ summary: Hexagonal grid pattern.
thumb: assets/images/reference/operators/pattern/hexagonalGridPattern_thumb.png
---
+
+
+Hexagonal grid pattern.
+
+This operator produces different types of values from the grid depending on the selected Pattern.
\ No newline at end of file
diff --git a/docs/_reference/operators/pattern/hexagonalTruchetPattern.md b/docs/_reference/operators/pattern/hexagonalTruchetPattern.md
index ebc986f99..448524cc9 100644
--- a/docs/_reference/operators/pattern/hexagonalTruchetPattern.md
+++ b/docs/_reference/operators/pattern/hexagonalTruchetPattern.md
@@ -8,6 +8,18 @@ redirect_from:
- /reference/opType/raytk.operators.pattern.hexagonalTruchetPattern/
op:
category: pattern
+ detail: 'This operator produces different types of values from the grid depending
+ on the selected Pattern.
+
+
+ Truchet patterns involve a curving path through a grid (in this case hexagonal),
+ where the path is always uninterrupted, but may sometimes form closed loops.
+
+
+ Based on [hexagonal truchet by FabriceNeyret2](https://www.shadertoy.com/view/Xdt3D8).
+
+
+ See details about [Truchet tiles](https://en.wikipedia.org/wiki/Truchet_tiles).'
inputs:
- contextTypes:
- Context
@@ -25,32 +37,55 @@ op:
name: coordField
returnTypes:
- vec4
+ summary: Field that produces vectors that the pattern uses as coordinates instead
+ of regular spatial position. Only the X and Y parts are used.
name: hexagonalTruchetPattern
opType: raytk.operators.pattern.hexagonalTruchetPattern
parameters:
- label: Pattern
menuOptions:
- - label: Default (FabriceNeyret2)
+ - description: Produces float values with 1 for the path and 0 for the space around
+ the path.
+ label: Default (FabriceNeyret2)
name: default
- - label: Variant 1 (Shane)
+ - description: Produces float values with multiple stripes going through the path.
+ label: Variant 1 (Shane)
name: variant1
- - label: Variant 2 (Shane)
+ - description: Produces vectors with colors using stripes along the path. Currently
+ these colors are fixed and unchangeable.
+ label: Variant 2 (Shane)
name: variant2
name: Pattern
readOnlyHandling: baked
regularHandling: baked
+ summary: What type of values to produce from the grid.
- label: Seed
name: Seed
readOnlyHandling: baked
regularHandling: runtime
+ summary: Seed number used to control the randomization of the path.
- label: Translate
name: Translate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Moves the entire pattern.
- label: Size
name: Size
readOnlyHandling: baked
regularHandling: runtime
+ summary: Scales the pattern.
+ summary: Pattern using truchet tiling in a hexagonal arrangement.
thumb: assets/images/reference/operators/pattern/hexagonalTruchetPattern_thumb.png
---
+
+
+Pattern using truchet tiling in a hexagonal arrangement.
+
+This operator produces different types of values from the grid depending on the selected Pattern.
+
+Truchet patterns involve a curving path through a grid (in this case hexagonal), where the path is always uninterrupted, but may sometimes form closed loops.
+
+Based on [hexagonal truchet by FabriceNeyret2](https://www.shadertoy.com/view/Xdt3D8).
+
+See details about [Truchet tiles](https://en.wikipedia.org/wiki/Truchet_tiles).
\ No newline at end of file
diff --git a/docs/_reference/operators/pattern/hexagonalWeavePattern.md b/docs/_reference/operators/pattern/hexagonalWeavePattern.md
index 62fcfd89c..fad11ad90 100644
--- a/docs/_reference/operators/pattern/hexagonalWeavePattern.md
+++ b/docs/_reference/operators/pattern/hexagonalWeavePattern.md
@@ -8,6 +8,8 @@ redirect_from:
- /reference/opType/raytk.operators.pattern.hexagonalWeavePattern/
op:
category: pattern
+ detail: This pattern always produces colors (vectors), but the Format parameter
+ controls how those colors are produced.
inputs:
- contextTypes:
- Context
@@ -25,6 +27,8 @@ op:
name: coordField
returnTypes:
- vec4
+ summary: Field that produces vectors that the pattern uses as coordinates instead
+ of regular spatial position. Only the X and Y parts are used.
supportedVariableInputs:
- thicknessField
- blendingField
@@ -44,6 +48,7 @@ op:
name: thicknessField
returnTypes:
- float
+ summary: Field that controls the thickness of the edges between layers.
supportedVariableInputs:
- coordField
- contextTypes:
@@ -62,6 +67,7 @@ op:
name: blendingField
returnTypes:
- float
+ summary: Field that controls the amount of blending between layers and edges.
supportedVariableInputs:
- coordField
- thicknessField
@@ -82,6 +88,8 @@ op:
returnTypes:
- float
- vec4
+ summary: Field providing either the color for layer 1 or the custom color for
+ everywhere, depending on the selected Format.
supportedVariableInputs:
- coordField
- thicknessField
@@ -106,6 +114,7 @@ op:
returnTypes:
- float
- vec4
+ summary: Field providing the color for layer 2.
supportedVariableInputs:
- coordField
- thicknessField
@@ -131,6 +140,7 @@ op:
returnTypes:
- float
- vec4
+ summary: Field providing the color for the background.
supportedVariableInputs:
- coordField
- thicknessField
@@ -154,47 +164,62 @@ op:
name: Translate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Moves the entire pattern.
- label: Size
name: Size
readOnlyHandling: baked
regularHandling: runtime
+ summary: Scales the pattern.
- label: Thickness
name: Thickness
readOnlyHandling: baked
regularHandling: runtime
+ summary: Thickness of each layer, where larger values produce smaller gaps.
- label: Blending
name: Blending
readOnlyHandling: baked
regularHandling: runtime
+ summary: Amount of blending between layers and edges.
- label: Randomize
name: Randomize
readOnlyHandling: baked
regularHandling: baked
+ summary: Whether to weave the two layers together in a random arrangement, or
+ always put one layer in front of the other.
- label: Seed
name: Seed
readOnlyHandling: baked
regularHandling: runtime
+ summary: Seed number used to control randomization.
- label: Format
menuOptions:
- - label: Color
+ - description: Uses the color parameters to color layer 1, layer 2, and background.
+ label: Color
name: color
- - label: Custom Override Color
+ - description: Uses the Color 1 field input for everything, relying on that field
+ to use variables to differentiate between the different parts of the pattern.
+ label: Custom Override Color
name: customcolor
name: Format
readOnlyHandling: baked
regularHandling: baked
+ summary: What type of values are produced.
- label: Color 1
name: Color1
readOnlyHandling: baked
regularHandling: runtime
+ summary: The color to use for layer 1.
- label: Color 2
name: Color2
readOnlyHandling: baked
regularHandling: runtime
+ summary: The color to use for layer 2.
- label: Background Color
name: Bgcolor
readOnlyHandling: baked
regularHandling: runtime
+ summary: The color to use for the background behind both layers.
+ summary: Pattern with two layers with gaps in a hexagonal layout.
thumb: assets/images/reference/operators/pattern/hexagonalWeavePattern_thumb.png
variables:
- label: axialdist
@@ -203,3 +228,8 @@ op:
name: mask
---
+
+
+Pattern with two layers with gaps in a hexagonal layout.
+
+This pattern always produces colors (vectors), but the Format parameter controls how those colors are produced.
\ No newline at end of file
diff --git a/docs/_reference/operators/pattern/index.md b/docs/_reference/operators/pattern/index.md
index b4ad5b65d..ad3fa07b4 100644
--- a/docs/_reference/operators/pattern/index.md
+++ b/docs/_reference/operators/pattern/index.md
@@ -10,28 +10,50 @@ cat:
operators:
- name: blobRingPattern
status: beta
+ thumb: assets/images/reference/operators/pattern/blobRingPattern_thumb.png
- name: brickPattern
+ summary: Pattern of stacked rectangular bricks.
+ thumb: assets/images/reference/operators/pattern/brickPattern_thumb.png
- name: checkerPattern
summary: Checkerboard pattern with alternating black and white rectangles.
+ thumb: assets/images/reference/operators/pattern/checkerPattern_thumb.png
- name: gridPattern
summary: Rectangular grid pattern.
+ thumb: assets/images/reference/operators/pattern/gridPattern_thumb.png
- name: hexagonalGridPattern
+ summary: Hexagonal grid pattern.
+ thumb: assets/images/reference/operators/pattern/hexagonalGridPattern_thumb.png
- name: hexagonalTruchetPattern
+ summary: Pattern using truchet tiling in a hexagonal arrangement.
+ thumb: assets/images/reference/operators/pattern/hexagonalTruchetPattern_thumb.png
- name: hexagonalWeavePattern
+ summary: Pattern with two layers with gaps in a hexagonal layout.
+ thumb: assets/images/reference/operators/pattern/hexagonalWeavePattern_thumb.png
- name: knitPattern
status: beta
+ summary: Woven yarn pattern.
+ thumb: assets/images/reference/operators/pattern/knitPattern_thumb.png
- name: rosettePattern
+ summary: Pattern with overlapping circles in a hexagonal arrangement.
+ thumb: assets/images/reference/operators/pattern/rosettePattern_thumb.png
- name: snubQuadrilePattern
status: beta
+ thumb: assets/images/reference/operators/pattern/snubQuadrilePattern_thumb.png
- name: spiralPattern
+ thumb: assets/images/reference/operators/pattern/spiralPattern_thumb.png
- name: tilingPattern
status: beta
- name: triangleCheckerPattern
+ summary: Triangular grid checkerboard pattern.
+ thumb: assets/images/reference/operators/pattern/triangleCheckerPattern_thumb.png
- name: truchetPattern
status: beta
+ thumb: assets/images/reference/operators/pattern/truchetPattern_thumb.png
- name: waveGreekFriezePattern
status: beta
+ thumb: assets/images/reference/operators/pattern/waveGreekFriezePattern_thumb.png
- name: weavePattern
+ thumb: assets/images/reference/operators/pattern/weavePattern_thumb.png
summary: '2D pattern generators, which can be used for things like textures.
Pattern operators are essentially a sub-category of field operators that focus
diff --git a/docs/_reference/operators/pattern/knitPattern.md b/docs/_reference/operators/pattern/knitPattern.md
index 32564dc0a..3e9b3c1ed 100644
--- a/docs/_reference/operators/pattern/knitPattern.md
+++ b/docs/_reference/operators/pattern/knitPattern.md
@@ -8,6 +8,8 @@ redirect_from:
- /reference/opType/raytk.operators.pattern.knitPattern/
op:
category: pattern
+ detail: Note that this pattern has a lot of fine detail which does not work well
+ for things like offsetting SDF surfaces, unless the Texture Amount is set to 0.
inputs:
- contextTypes:
- Context
@@ -25,6 +27,8 @@ op:
name: coordField
returnTypes:
- vec4
+ summary: Field that produces vectors that the pattern uses as coordinates instead
+ of regular spatial position. Only the X and Y parts are used.
name: knitPattern
opType: raytk.operators.pattern.knitPattern
parameters:
@@ -32,19 +36,29 @@ op:
name: Translate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Moves the entire pattern.
- label: Size
name: Size
readOnlyHandling: baked
regularHandling: runtime
+ summary: Scales the pattern.
- label: Texture Amount
name: Texamount
readOnlyHandling: baked
regularHandling: runtime
+ summary: Amount of roughness in the pattern.
- label: Texture Density
name: Texdensity
readOnlyHandling: baked
regularHandling: runtime
+ summary: Tightness of the roughness.
status: beta
+ summary: Woven yarn pattern.
thumb: assets/images/reference/operators/pattern/knitPattern_thumb.png
---
+
+
+Woven yarn pattern.
+
+Note that this pattern has a lot of fine detail which does not work well for things like offsetting SDF surfaces, unless the Texture Amount is set to 0.
\ No newline at end of file
diff --git a/docs/_reference/operators/pattern/rosettePattern.md b/docs/_reference/operators/pattern/rosettePattern.md
index 607c6df2d..d215412ec 100644
--- a/docs/_reference/operators/pattern/rosettePattern.md
+++ b/docs/_reference/operators/pattern/rosettePattern.md
@@ -8,6 +8,12 @@ redirect_from:
- /reference/opType/raytk.operators.pattern.rosettePattern/
op:
category: pattern
+ detail: 'This pattern produces just float values not colors. To apply color to it,
+ pass it into a `colorRampField`.
+
+
+ The edges of the circles produce values of 1 and the background produces values
+ of 0.'
inputs:
- contextTypes:
- Context
@@ -25,6 +31,8 @@ op:
name: coordField
returnTypes:
- vec4
+ summary: Field that produces vectors that the pattern uses as coordinates instead
+ of regular spatial position. Only the X and Y parts are used.
- contextTypes:
- Context
- MaterialContext
@@ -41,6 +49,7 @@ op:
name: glowField
returnTypes:
- float
+ summary: Field that controls the amount of glow or blending.
supportedVariableInputs:
- coordField
- contextTypes:
@@ -59,6 +68,7 @@ op:
name: radiusField
returnTypes:
- float
+ summary: Field that controls the radii of the circles.
supportedVariableInputs:
- coordField
- glowField
@@ -78,6 +88,7 @@ op:
name: spreadField
returnTypes:
- vec4
+ summary: Field that controls how much the circles are spread apart.
supportedVariableInputs:
- coordField
- glowField
@@ -89,22 +100,38 @@ op:
name: Translate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Moves the entire pattern.
- label: Size
name: Size
readOnlyHandling: baked
regularHandling: runtime
+ summary: Scales the pattern.
- label: Glow
name: Glow
readOnlyHandling: baked
regularHandling: runtime
+ summary: The amount of glow, or blending between the circle edges and the background.
- label: Radius
name: Radius
readOnlyHandling: baked
regularHandling: runtime
+ summary: The radius of the circles. A value of 1 makes the circles overlap perfectly
+ at the center of their neighbors, 0.5 causes them to touch the edges of the
+ neighbors, and 0 makes the circles dots. Values larger than 1 will cut off parts
+ of the circles.
- label: Spread
name: Spread
readOnlyHandling: baked
regularHandling: runtime
+ summary: How much the arrangement of circles should be spread out along each axis.
+ summary: Pattern with overlapping circles in a hexagonal arrangement.
thumb: assets/images/reference/operators/pattern/rosettePattern_thumb.png
---
+
+
+Pattern with overlapping circles in a hexagonal arrangement.
+
+This pattern produces just float values not colors. To apply color to it, pass it into a `colorRampField`.
+
+The edges of the circles produce values of 1 and the background produces values of 0.
\ No newline at end of file
diff --git a/docs/_reference/operators/pattern/triangleCheckerPattern.md b/docs/_reference/operators/pattern/triangleCheckerPattern.md
index 88435e9ec..bc3266485 100644
--- a/docs/_reference/operators/pattern/triangleCheckerPattern.md
+++ b/docs/_reference/operators/pattern/triangleCheckerPattern.md
@@ -8,6 +8,8 @@ redirect_from:
- /reference/opType/raytk.operators.pattern.triangleCheckerPattern/
op:
category: pattern
+ detail: This pattern produces just float values not colors. To apply color to it,
+ pass it into a `colorRampField`.
inputs:
- contextTypes:
- Context
@@ -25,6 +27,8 @@ op:
name: coordField
returnTypes:
- vec4
+ summary: Field that produces vectors that the pattern uses as coordinates instead
+ of regular spatial position. Only the X and Y parts are used.
name: triangleCheckerPattern
opType: raytk.operators.pattern.triangleCheckerPattern
parameters:
@@ -32,10 +36,18 @@ op:
name: Translate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Moves the entire pattern.
- label: Size
name: Size
readOnlyHandling: baked
regularHandling: runtime
+ summary: Scales the pattern.
+ summary: Triangular grid checkerboard pattern.
thumb: assets/images/reference/operators/pattern/triangleCheckerPattern_thumb.png
---
+
+
+Triangular grid checkerboard pattern.
+
+This pattern produces just float values not colors. To apply color to it, pass it into a `colorRampField`.
\ No newline at end of file
diff --git a/docs/_reference/operators/post/index.md b/docs/_reference/operators/post/index.md
index cb178300f..01b94c2b7 100644
--- a/docs/_reference/operators/post/index.md
+++ b/docs/_reference/operators/post/index.md
@@ -6,17 +6,27 @@ has_children: true
has_toc: false
permalink: /reference/operators/post/
cat:
+ detail: Most or all of these are not standard RayTK operators that get connected
+ into a renderer and add to the generated shader.
name: post
operators:
- name: depthMap
+ thumb: assets/images/reference/operators/post/depthMap_thumb.png
- name: nearHitMap
status: beta
+ thumb: assets/images/reference/operators/post/nearHitMap_thumb.png
- name: objectIdMask
- name: stepMap
- name: worldPosMap
summary: Access the world position values from a raymarchRender3D, scaled to a
normalized range.
+ summary: Post processing operators are components that take information from a renderer
+ and process it to produce images that can be used for post-processing.
---
# Post Operators
+
+Post processing operators are components that take information from a renderer and process it to produce images that can be used for post-processing.
+
+Most or all of these are not standard RayTK operators that get connected into a renderer and add to the generated shader.
diff --git a/docs/_reference/operators/sdf/apollonianSdf.md b/docs/_reference/operators/sdf/apollonianSdf.md
index d7b3fad1b..f701c7298 100644
--- a/docs/_reference/operators/sdf/apollonianSdf.md
+++ b/docs/_reference/operators/sdf/apollonianSdf.md
@@ -8,6 +8,8 @@ redirect_from:
- /reference/opType/raytk.operators.sdf.apollonianSdf/
op:
category: sdf
+ detail: Based on [Apollonian Statue2](https://www.shadertoy.com/view/XlSfzW) by
+ EvilRyu.
keywords:
- apollonian
- fractal
@@ -30,6 +32,12 @@ op:
name: Iterations
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Apollonian gasket fractal.
thumb: assets/images/reference/operators/sdf/apollonianSdf_thumb.png
---
+
+
+Apollonian gasket fractal.
+
+Based on [Apollonian Statue2](https://www.shadertoy.com/view/XlSfzW) by EvilRyu.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf/archSdf.md b/docs/_reference/operators/sdf/archSdf.md
index 78cf486d5..9bea6db8e 100644
--- a/docs/_reference/operators/sdf/archSdf.md
+++ b/docs/_reference/operators/sdf/archSdf.md
@@ -8,6 +8,12 @@ redirect_from:
- /reference/opType/raytk.operators.sdf.archSdf/
op:
category: sdf
+ detail: 'This SDF combines a few parts, which can be toggled on/off.
+
+
+ The panel is the flat inner surface that fills the center of the arch.
+
+ The frame is the outer border of the arch.'
inputs:
- contextTypes:
- Context
@@ -134,30 +140,47 @@ op:
name: Rounding
readOnlyHandling: baked
regularHandling: runtime
+ summary: Size of the curves on the top corners. Smaller values produce more of
+ a rectangle and larger values produce a curved peak.
- label: Enable Panel
name: Enablepanel
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Whether to show the flat shape filling the center of the arch.
- label: Panel Depth
name: Paneldepth
readOnlyHandling: baked
regularHandling: runtime
+ summary: Thickness of the center part.
- label: Enable Frame
name: Enableframe
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Whether to show the outer part of the arch.
- label: Frame Thickness
name: Framethickness
readOnlyHandling: baked
regularHandling: runtime
+ summary: Thickness of the frame (width/height).
- label: Frame Depth
name: Framedepth
readOnlyHandling: baked
regularHandling: runtime
+ summary: Depth of the frame.
- label: Hide Frame Bottom
name: Hideframebottom
readOnlyHandling: semibaked
regularHandling: semibaked
+ summary: Whether to include a bottom section to the frame or leave it empty.
+ summary: Arch / doorway.
thumb: assets/images/reference/operators/sdf/archSdf_thumb.png
---
+
+
+Arch / doorway.
+
+This SDF combines a few parts, which can be toggled on/off.
+
+The panel is the flat inner surface that fills the center of the arch.
+The frame is the outer border of the arch.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf/capsuleSdf.md b/docs/_reference/operators/sdf/capsuleSdf.md
index 1556eede2..fd8ae1cd3 100644
--- a/docs/_reference/operators/sdf/capsuleSdf.md
+++ b/docs/_reference/operators/sdf/capsuleSdf.md
@@ -90,7 +90,7 @@ op:
readOnlyHandling: baked
regularHandling: runtime
summary: The thickness of the capsule.
- summary: A cylinder with rounded ends, between two points.
+ summary: A line or cylinder with rounded ends, between two points.
thumb: assets/images/reference/operators/sdf/capsuleSdf_thumb.png
variables:
- label: normoffset
@@ -99,6 +99,6 @@ op:
---
-A cylinder with rounded ends, between two points.
+A line or cylinder with rounded ends, between two points.
With a small `Radius`, this can be used to create a line segment.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf/chainSdf.md b/docs/_reference/operators/sdf/chainSdf.md
index 7ce7d404b..5ea4b7cb2 100644
--- a/docs/_reference/operators/sdf/chainSdf.md
+++ b/docs/_reference/operators/sdf/chainSdf.md
@@ -8,6 +8,7 @@ redirect_from:
- /reference/opType/raytk.operators.sdf.chainSdf/
op:
category: sdf
+ detail: Based on [Link - distance](https://www.shadertoy.com/view/wlXSD7) by iq.
inputs:
- contextTypes:
- Context
@@ -61,14 +62,23 @@ op:
name: Length
readOnlyHandling: baked
regularHandling: runtime
+ summary: Length of each chain link.
- label: Radius
name: Radius
readOnlyHandling: baked
regularHandling: runtime
+ summary: Width / rounding radius of the chain links.
- label: Thickness
name: Thickness
readOnlyHandling: baked
regularHandling: runtime
+ summary: Thickness of each link.
+ summary: Chain made of links, with infinite length.
thumb: assets/images/reference/operators/sdf/chainSdf_thumb.png
---
+
+
+Chain made of links, with infinite length.
+
+Based on [Link - distance](https://www.shadertoy.com/view/wlXSD7) by iq.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf/chamferBoxSdf.md b/docs/_reference/operators/sdf/chamferBoxSdf.md
index b960cbc6c..3dbd01884 100644
--- a/docs/_reference/operators/sdf/chamferBoxSdf.md
+++ b/docs/_reference/operators/sdf/chamferBoxSdf.md
@@ -8,6 +8,8 @@ redirect_from:
- /reference/opType/raytk.operators.sdf.chamferBoxSdf/
op:
category: sdf
+ detail: Based on [ChamferBox Super Primitive](https://www.shadertoy.com/view/3lBGzt)
+ by TLC123
inputs:
- contextTypes:
- Context
@@ -83,14 +85,18 @@ op:
name: Chamfer
readOnlyHandling: baked
regularHandling: runtime
+ summary: Width of cropping on edges/corners.
- label: Round
name: Round
readOnlyHandling: baked
regularHandling: runtime
+ summary: Rounding that smooths out the edges of the crops.
summary: A box with cropped corners at 45 degree angles.
thumb: assets/images/reference/operators/sdf/chamferBoxSdf_thumb.png
---
-A box with cropped corners at 45 degree angles.
\ No newline at end of file
+A box with cropped corners at 45 degree angles.
+
+Based on [ChamferBox Super Primitive](https://www.shadertoy.com/view/3lBGzt) by TLC123
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf/crescentSdf.md b/docs/_reference/operators/sdf/crescentSdf.md
index 9dcc935ba..278a2b20c 100644
--- a/docs/_reference/operators/sdf/crescentSdf.md
+++ b/docs/_reference/operators/sdf/crescentSdf.md
@@ -8,6 +8,7 @@ redirect_from:
- /reference/opType/raytk.operators.sdf.crescentSdf/
op:
category: sdf
+ detail: Based on [Croissant SDF](https://www.shadertoy.com/view/NdlBD4) by erratac.
inputs:
- contextTypes:
- Context
@@ -48,14 +49,23 @@ op:
name: Radius
readOnlyHandling: baked
regularHandling: runtime
+ summary: Radius of the main curve of the crescent.
- label: Thickness
name: Thickness
readOnlyHandling: baked
regularHandling: runtime
+ summary: Thickness of the crescent.
- label: Rotate
name: Rotate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Rotates the crescent around the axis that it's curving around.
+ summary: Rounded crescent shape.
thumb: assets/images/reference/operators/sdf/crescentSdf_thumb.png
---
+
+
+Rounded crescent shape.
+
+Based on [Croissant SDF](https://www.shadertoy.com/view/NdlBD4) by erratac.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf/crossSdf.md b/docs/_reference/operators/sdf/crossSdf.md
index 2207e2c01..65a9e4f81 100644
--- a/docs/_reference/operators/sdf/crossSdf.md
+++ b/docs/_reference/operators/sdf/crossSdf.md
@@ -92,6 +92,7 @@ op:
name: Axes
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Which axes to include in the cross.
- label: Shape
menuOptions:
- label: Infinite
@@ -101,14 +102,17 @@ op:
name: Shape
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether to make the cross have infinite length or limited lengths.
- label: Length
name: Length
readOnlyHandling: baked
regularHandling: runtime
- summary: An SDF for a 3D cross of infinite length along each axis.
+ summary: Length of the cross on each axis.
+ summary: An SDF for a 3D cross along each axis, with either infinite or limited
+ length.
thumb: assets/images/reference/operators/sdf/crossSdf_thumb.png
---
-An SDF for a 3D cross of infinite length along each axis.
\ No newline at end of file
+An SDF for a 3D cross along each axis, with either infinite or limited length.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf/cutSphereSdf.md b/docs/_reference/operators/sdf/cutSphereSdf.md
index d42d41f68..16ae62f60 100644
--- a/docs/_reference/operators/sdf/cutSphereSdf.md
+++ b/docs/_reference/operators/sdf/cutSphereSdf.md
@@ -8,6 +8,8 @@ redirect_from:
- /reference/opType/raytk.operators.sdf.cutSphereSdf/
op:
category: sdf
+ detail: Based on [CutSphere - distance 3D](https://www.shadertoy.com/view/stKSzc)
+ by iq.
inputs:
- contextTypes:
- Context
@@ -90,20 +92,30 @@ op:
name: Shape
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether the sphere should be solid or a hollow shell.
- label: Radius
name: Radius
readOnlyHandling: baked
regularHandling: runtime
+ summary: Radius of the sphere.
- label: Cut Offset
name: Offset
readOnlyHandling: baked
regularHandling: runtime
+ summary: How far across the sphere the cut plane should be.
- label: Thickness
name: Thickness
+ summary: Thickness of the shape if using hollow mode.
- label: Rotate
name: Rotate
readOnlyHandling: baked
regularHandling: runtime
+ summary: Sphere with part of it cut off, either solid or hollow.
thumb: assets/images/reference/operators/sdf/cutSphereSdf_thumb.png
---
+
+
+Sphere with part of it cut off, either solid or hollow.
+
+Based on [CutSphere - distance 3D](https://www.shadertoy.com/view/stKSzc) by iq.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf/cylinderSdf.md b/docs/_reference/operators/sdf/cylinderSdf.md
index 13303527e..4d7e1aa46 100644
--- a/docs/_reference/operators/sdf/cylinderSdf.md
+++ b/docs/_reference/operators/sdf/cylinderSdf.md
@@ -110,15 +110,19 @@ op:
name: Infiniteheight
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether to extend infinitely along the chosen axis or have a limited
+ height.
- label: Hollow
name: Hollow
readOnlyHandling: semibaked
regularHandling: runtime
+ summary: Whether to make the cylinder a hollow tube instead of a solid cylinder.
- label: Thickness
name: Thickness
readOnlyHandling: baked
regularHandling: runtime
- summary: SDF for a cylinder.
+ summary: Thickness of the walls of the tube when using hollow mode.
+ summary: Cylinder, either solid or a hollow tube.
thumb: assets/images/reference/operators/sdf/cylinderSdf_thumb.png
variables:
- label: axispos
@@ -131,4 +135,4 @@ op:
---
-SDF for a cylinder.
\ No newline at end of file
+Cylinder, either solid or a hollow tube.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf/ellipsoidSdf.md b/docs/_reference/operators/sdf/ellipsoidSdf.md
index 143d6ff2d..fd23c621f 100644
--- a/docs/_reference/operators/sdf/ellipsoidSdf.md
+++ b/docs/_reference/operators/sdf/ellipsoidSdf.md
@@ -8,6 +8,7 @@ redirect_from:
- /reference/opType/raytk.operators.sdf.ellipsoidSdf/
op:
category: sdf
+ detail: Based on [Ellipsoid bound](https://www.shadertoy.com/view/tdS3DG) by iq.
inputs:
- contextTypes:
- Context
@@ -38,6 +39,13 @@ op:
name: Scale
readOnlyHandling: baked
regularHandling: runtime
+ summary: Size of the ellipsoid on each axis.
+ summary: Ellipsoid (sphere with different sizes on each axis).
thumb: assets/images/reference/operators/sdf/ellipsoidSdf_thumb.png
---
+
+
+Ellipsoid (sphere with different sizes on each axis).
+
+Based on [Ellipsoid bound](https://www.shadertoy.com/view/tdS3DG) by iq.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf/helixSdf.md b/docs/_reference/operators/sdf/helixSdf.md
index e78c9b3aa..7205eec48 100644
--- a/docs/_reference/operators/sdf/helixSdf.md
+++ b/docs/_reference/operators/sdf/helixSdf.md
@@ -8,6 +8,17 @@ redirect_from:
- /reference/opType/raytk.operators.sdf.helixSdf/
op:
category: sdf
+ detail: 'There are two variations of the helix: dual and single.
+
+ The dual variation can do two parallel rails, and supports using a 2D cross-section
+ SDF, but no UV coordinates.
+
+ The single variation is just one part, and does not support cross-sections, but
+ does have UV coordinates.
+
+
+ The single variation is based on [Helix Distance](https://www.shadertoy.com/view/MstcWs)
+ by tdhooper.'
inputs:
- contextTypes:
- Context
@@ -19,8 +30,6 @@ op:
- VertexContext
- PixelContext
coordTypes:
- - float
- - vec2
- vec3
label: Thickness Field
name: thicknessField
@@ -43,7 +52,6 @@ op:
- VertexContext
- PixelContext
coordTypes:
- - float
- vec3
label: Radius Field
name: radiusField
@@ -68,7 +76,6 @@ op:
- VertexContext
- PixelContext
coordTypes:
- - float
- vec3
label: Spread Field
name: spreadField
@@ -144,6 +151,15 @@ op:
name: Dualspread
readOnlyHandling: baked
regularHandling: runtime
+ - label: Helix Type
+ menuOptions:
+ - label: Dual
+ name: dual
+ - label: Single
+ name: single
+ name: Helixtype
+ readOnlyHandling: semibaked
+ regularHandling: runtime
- label: Reverse
name: Reverse
readOnlyHandling: semibaked
@@ -161,4 +177,10 @@ op:
---
-SDF for a helix (an elongated spiral).
\ No newline at end of file
+SDF for a helix (an elongated spiral).
+
+There are two variations of the helix: dual and single.
+The dual variation can do two parallel rails, and supports using a 2D cross-section SDF, but no UV coordinates.
+The single variation is just one part, and does not support cross-sections, but does have UV coordinates.
+
+The single variation is based on [Helix Distance](https://www.shadertoy.com/view/MstcWs) by tdhooper.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf/index.md b/docs/_reference/operators/sdf/index.md
index 49a4e7574..7a8893291 100644
--- a/docs/_reference/operators/sdf/index.md
+++ b/docs/_reference/operators/sdf/index.md
@@ -14,16 +14,22 @@ cat:
- keywords:
- fractal
name: amazingSurfaceSdf
+ thumb: assets/images/reference/operators/sdf/amazingSurfaceSdf_thumb.png
- keywords:
- apollonian
- fractal
name: apollonianSdf
+ summary: Apollonian gasket fractal.
+ thumb: assets/images/reference/operators/sdf/apollonianSdf_thumb.png
- name: archSdf
+ summary: Arch / doorway.
+ thumb: assets/images/reference/operators/sdf/archSdf_thumb.png
- keywords:
- bezier
- curve
- line
name: bezierSdf
+ thumb: assets/images/reference/operators/sdf/bezierSdf_thumb.png
- keywords:
- box
- cube
@@ -34,6 +40,7 @@ cat:
shortcuts:
- bfs
summary: SDF for the squared frame of the edges of a box.
+ thumb: assets/images/reference/operators/sdf/boxFrameSdf_thumb.png
- keywords:
- box
- cube
@@ -43,37 +50,53 @@ cat:
shortcuts:
- box
summary: SDF for a box, optionally infinite one one axis.
+ thumb: assets/images/reference/operators/sdf/boxSdf_thumb.png
- name: bunnySdf
summary: SDF for a bunny.
+ thumb: assets/images/reference/operators/sdf/bunnySdf_thumb.png
- keywords:
- capsule
- line
- points
- segment
name: capsuleSdf
- summary: A cylinder with rounded ends, between two points.
+ summary: A line or cylinder with rounded ends, between two points.
+ thumb: assets/images/reference/operators/sdf/capsuleSdf_thumb.png
- name: chainSdf
+ summary: Chain made of links, with infinite length.
+ thumb: assets/images/reference/operators/sdf/chainSdf_thumb.png
- keywords:
- box
- chamfer
- cube
name: chamferBoxSdf
summary: A box with cropped corners at 45 degree angles.
+ thumb: assets/images/reference/operators/sdf/chamferBoxSdf_thumb.png
- name: coneSdf
summary: Defines a cone or capped cone shape.
+ thumb: assets/images/reference/operators/sdf/coneSdf_thumb.png
- name: crescentSdf
+ summary: Rounded crescent shape.
+ thumb: assets/images/reference/operators/sdf/crescentSdf_thumb.png
- name: crossSdf
- summary: An SDF for a 3D cross of infinite length along each axis.
+ summary: An SDF for a 3D cross along each axis, with either infinite or limited
+ length.
+ thumb: assets/images/reference/operators/sdf/crossSdf_thumb.png
- name: cutSphereSdf
+ summary: Sphere with part of it cut off, either solid or hollow.
+ thumb: assets/images/reference/operators/sdf/cutSphereSdf_thumb.png
- keywords:
- column
- cylinder
- pipe
name: cylinderSdf
- summary: SDF for a cylinder.
+ summary: Cylinder, either solid or a hollow tube.
+ thumb: assets/images/reference/operators/sdf/cylinderSdf_thumb.png
- name: discSdf
summary: A flat disc facing the Y axis.
+ thumb: assets/images/reference/operators/sdf/discSdf_thumb.png
- name: dodecahedronFractalSdf
+ thumb: assets/images/reference/operators/sdf/dodecahedronFractalSdf_thumb.png
- keywords:
- circle
- ellipse
@@ -81,6 +104,8 @@ cat:
- oval
- sphere
name: ellipsoidSdf
+ summary: Ellipsoid (sphere with different sizes on each axis).
+ thumb: assets/images/reference/operators/sdf/ellipsoidSdf_thumb.png
- keywords:
- dodecahedron
- icosahedron
@@ -88,57 +113,72 @@ cat:
- polyhedron
name: generalizedPolyhedronSdf
summary: Generates one of several different types of polyhedra.
+ thumb: assets/images/reference/operators/sdf/generalizedPolyhedronSdf_thumb.png
- keywords:
- geodesic
- polyhedron
- spikes
name: geodesicSdf
summary: A geodesic polyhedron, optionally with a spike on each face.
+ thumb: assets/images/reference/operators/sdf/geodesicSdf_thumb.png
- keywords:
- bars
- grid
name: gridSdf
summary: An infinite grid shape, along two axes.
+ thumb: assets/images/reference/operators/sdf/gridSdf_thumb.png
- keywords:
- gyroid
- sine
- wave
name: gyroidSdf
summary: Gyroid shape, which is an infinitely connected periodic surface.
+ thumb: assets/images/reference/operators/sdf/gyroidSdf_thumb.png
- name: headSdf
summary: Human head SDF created by tdhooper.
+ thumb: assets/images/reference/operators/sdf/headSdf_thumb.png
- keywords:
- coil
- helix
- spiral
name: helixSdf
summary: SDF for a helix (an elongated spiral).
+ thumb: assets/images/reference/operators/sdf/helixSdf_thumb.png
- name: hyperbolicParaboloidSdf
+ thumb: assets/images/reference/operators/sdf/hyperbolicParaboloidSdf_thumb.png
- name: jointSdf
+ thumb: assets/images/reference/operators/sdf/jointSdf_thumb.png
- keywords:
- fractal
- julia
- quaternion
name: juliaSdf
+ thumb: assets/images/reference/operators/sdf/juliaSdf_thumb.png
- name: kaliGeneratorSdf
summary: Fractal SDF based on "Generators" by Kali (https://www.shadertoy.com/view/Xtf3Rn).
+ thumb: assets/images/reference/operators/sdf/kaliGeneratorSdf_thumb.png
- keywords:
- grid
name: latticeSdf
+ thumb: assets/images/reference/operators/sdf/latticeSdf_thumb.png
- name: lineSeriesSdf
+ thumb: assets/images/reference/operators/sdf/lineSeriesSdf_thumb.png
- keywords:
- chain
- link
name: linkSdf
summary: SDF for a chain link shape (an elongated loop).
+ thumb: assets/images/reference/operators/sdf/linkSdf_thumb.png
- keywords:
- fractal
- mandelbrot
- mandelbulb
name: mandelbulbSdf
summary: Mandelbulb fractal.
+ thumb: assets/images/reference/operators/sdf/mandelbulbSdf_thumb.png
- name: mengerSpongeSdf
summary: Menger sponge fractal, made of boxes with holes cut through each axis.
+ thumb: assets/images/reference/operators/sdf/mengerSpongeSdf_thumb.png
- keywords:
- mobius
- ring
@@ -146,21 +186,27 @@ cat:
name: mobiusRingSdf
summary: SDF for a squared mobius ring, which is like a rectangular bar twisted
and then bent into a ring.
+ thumb: assets/images/reference/operators/sdf/mobiusRingSdf_thumb.png
- keywords:
- octahedron
- polyhedron
name: octahedronSdf
summary: An octahedron, with its corners facing the axes.
+ thumb: assets/images/reference/operators/sdf/octahedronSdf_thumb.png
- name: petalSdf
summary: A flower petal or leaf shape.
+ thumb: assets/images/reference/operators/sdf/petalSdf_thumb.png
- name: pistonSdf
+ thumb: assets/images/reference/operators/sdf/pistonSdf_thumb.png
- keywords:
- floor
- plane
- sheet
name: planeSdf
summary: An infinite plane on the x, y, or z axis.
+ thumb: assets/images/reference/operators/sdf/planeSdf_thumb.png
- name: polyhedronSdf
+ thumb: assets/images/reference/operators/sdf/polyhedronSdf_thumb.png
- keywords:
- column
- cylinder
@@ -171,14 +217,17 @@ cat:
- triangle
name: prismSdf
summary: A prism shape, like a cylinder but with flat sides, along the z axis.
+ thumb: assets/images/reference/operators/sdf/prismSdf_thumb.png
- name: pyramidSdf
summary: A pyramid with four sides.
+ thumb: assets/images/reference/operators/sdf/pyramidSdf_thumb.png
- keywords:
- plane
- quad
- rectangle
- square
name: quadSdf
+ thumb: assets/images/reference/operators/sdf/quadSdf_thumb.png
- name: ringsSdf
- keywords:
- line
@@ -187,6 +236,7 @@ cat:
- segments
name: segmentedLineSdf
summary: Multi-segment line SDF.
+ thumb: assets/images/reference/operators/sdf/segmentedLineSdf_thumb.png
- keywords:
- cone
- pie
@@ -194,35 +244,46 @@ cat:
- wedge
name: solidAngleSdf
summary: A conical slice of a sphere.
+ thumb: assets/images/reference/operators/sdf/solidAngleSdf_thumb.png
- name: sphereFbmSdf
+ thumb: assets/images/reference/operators/sdf/sphereFbmSdf_thumb.png
- name: sphereGridSdf
status: beta
+ thumb: assets/images/reference/operators/sdf/sphereGridSdf_thumb.png
- name: sphereSdf
shortcuts:
- sph
summary: SDF in 3D space for a uniform sphere.
+ thumb: assets/images/reference/operators/sdf/sphereSdf_thumb.png
- keywords:
- coil
- spiral
- swirl
name: spiralSdf
summary: A tapering spiral squared tube.
+ thumb: assets/images/reference/operators/sdf/spiralSdf_thumb.png
- name: springSdf
summary: A coiled spring shape.
+ thumb: assets/images/reference/operators/sdf/springSdf_thumb.png
- name: stackSdf
status: beta
- name: tetrahedronSdf
summary: Tetrahedron shape.
+ thumb: assets/images/reference/operators/sdf/tetrahedronSdf_thumb.png
- name: torusGridSdf
status: beta
+ thumb: assets/images/reference/operators/sdf/torusGridSdf_thumb.png
- keywords:
- donut
- ring
- torus
name: torusSdf
summary: SDF for a torus.
+ thumb: assets/images/reference/operators/sdf/torusSdf_thumb.png
- name: truncatedPyramidSdf
+ thumb: assets/images/reference/operators/sdf/truncatedPyramidSdf_thumb.png
- name: vesicaSegmentSdf
+ thumb: assets/images/reference/operators/sdf/vesicaSegmentSdf_thumb.png
summary: 'Signed distances functions which define geometry in 3D space, by calculating
the distance from the surface of the shape at any given point.'
diff --git a/docs/_reference/operators/sdf/springSdf.md b/docs/_reference/operators/sdf/springSdf.md
index 7df0a9b88..dc0fe7a8b 100644
--- a/docs/_reference/operators/sdf/springSdf.md
+++ b/docs/_reference/operators/sdf/springSdf.md
@@ -20,7 +20,6 @@ op:
- VertexContext
- PixelContext
coordTypes:
- - float
- vec3
label: Height Field
name: heightField
@@ -40,7 +39,6 @@ op:
- VertexContext
- PixelContext
coordTypes:
- - float
- vec3
label: Radius Field
name: radiusField
@@ -63,7 +61,6 @@ op:
- VertexContext
- PixelContext
coordTypes:
- - float
- vec3
label: Coils Field
name: coilsField
@@ -87,8 +84,6 @@ op:
- VertexContext
- PixelContext
coordTypes:
- - float
- - vec2
- vec3
label: Thickness Field
name: thicknessField
diff --git a/docs/_reference/operators/sdf2d/arbitraryPolygonSdf2d.md b/docs/_reference/operators/sdf2d/arbitraryPolygonSdf2d.md
index 43f4a0289..8c8bfdd1e 100644
--- a/docs/_reference/operators/sdf2d/arbitraryPolygonSdf2d.md
+++ b/docs/_reference/operators/sdf2d/arbitraryPolygonSdf2d.md
@@ -8,6 +8,12 @@ redirect_from:
- /reference/opType/raytk.operators.sdf2d.arbitraryPolygonSdf2d/
op:
category: sdf2d
+ detail: 'Points can either be specified with parameters or by passing in a CHOP.
+
+
+ If a CHOP is used, only the first N samples are used where N is the Max Points
+ parameter. The first two channels of the CHOP are used for the X and Y, regardless
+ of their names.'
name: arbitraryPolygonSdf2d
opType: raytk.operators.sdf2d.arbitraryPolygonSdf2d
parameters:
@@ -20,14 +26,18 @@ op:
name: Source
readOnlyHandling: baked
regularHandling: baked
+ summary: Whether to specify points using parameters or a CHOP input.
- label: Points
name: Pointcount
readOnlyHandling: baked
regularHandling: runtime
+ summary: Number of points.
- label: Points CHOP
name: Pointschop
+ summary: CHOP used for point positions.
- label: Max Points
name: Maxpointcount
+ summary: Maximum number of points allowed in the provided CHOP.
- label: Point 1
name: Point1
readOnlyHandling: baked
@@ -60,6 +70,14 @@ op:
name: Point8
readOnlyHandling: baked
regularHandling: runtime
+ summary: Polygonal area with arbitrarily positioned points.
thumb: assets/images/reference/operators/sdf2d/arbitraryPolygonSdf2d_thumb.png
---
+
+
+Polygonal area with arbitrarily positioned points.
+
+Points can either be specified with parameters or by passing in a CHOP.
+
+If a CHOP is used, only the first N samples are used where N is the Max Points parameter. The first two channels of the CHOP are used for the X and Y, regardless of their names.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf2d/arcSdf2d.md b/docs/_reference/operators/sdf2d/arcSdf2d.md
index 4a400fd29..58f5a8d09 100644
--- a/docs/_reference/operators/sdf2d/arcSdf2d.md
+++ b/docs/_reference/operators/sdf2d/arcSdf2d.md
@@ -24,6 +24,7 @@ op:
name: orientationField
returnTypes:
- float
+ summary: Field used to offset the orientation angle, in degrees.
- contextTypes:
- Context
- MaterialContext
@@ -39,6 +40,7 @@ op:
name: apertureField
returnTypes:
- float
+ summary: Field used to override the aperture angle, in degrees.
supportedVariableInputs:
- orientationField
- contextTypes:
@@ -56,6 +58,7 @@ op:
name: radiusField
returnTypes:
- float
+ summary: Field used to multiply the circle radius.
supportedVariableInputs:
- orientationField
supportedVariables:
@@ -75,6 +78,7 @@ op:
name: thicknessField
returnTypes:
- float
+ summary: Field used to multiply the thickness of the arc.
supportedVariableInputs:
- orientationField
- radiusField
@@ -87,21 +91,30 @@ op:
name: Orientation
readOnlyHandling: baked
regularHandling: runtime
+ summary: Angle of the center of the arc in degrees.
- label: Aperture
name: Aperture
readOnlyHandling: baked
regularHandling: runtime
+ summary: Range of the arc in degrees.
- label: Radius
name: Radius
readOnlyHandling: baked
regularHandling: runtime
+ summary: Radius of the circle which the arc is taken from.
- label: Thickness
name: Thickness
readOnlyHandling: baked
regularHandling: runtime
+ summary: Thickness of the arc.
+ summary: Radial arc, a segment of a circular path, with rounded ends.
thumb: assets/images/reference/operators/sdf2d/arcSdf2d_thumb.png
variables:
- label: normangle
name: normangle
+ summary: Angle from one end of the arc to the other, normalized to a 0..1 range.
---
+
+
+Radial arc, a segment of a circular path, with rounded ends.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf2d/archSdf2d.md b/docs/_reference/operators/sdf2d/archSdf2d.md
index d51628c27..7cdfc8dce 100644
--- a/docs/_reference/operators/sdf2d/archSdf2d.md
+++ b/docs/_reference/operators/sdf2d/archSdf2d.md
@@ -24,6 +24,7 @@ op:
name: scaleField
returnTypes:
- vec4
+ summary: Field used to multiply the width and height of the shape.
name: archSdf2d
opType: raytk.operators.sdf2d.archSdf2d
parameters:
@@ -31,6 +32,12 @@ op:
name: Scale
readOnlyHandling: baked
regularHandling: runtime
+ summary: Width and height of the shape. The width is also used as the radius of
+ the top curve.
+ summary: Arched doorway shape with a rounded top and rectangular bottom.
thumb: assets/images/reference/operators/sdf2d/archSdf2d_thumb.png
---
+
+
+Arched doorway shape with a rounded top and rectangular bottom.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf2d/chamferRectangleSdf2d.md b/docs/_reference/operators/sdf2d/chamferRectangleSdf2d.md
index b4d69120d..8990186c2 100644
--- a/docs/_reference/operators/sdf2d/chamferRectangleSdf2d.md
+++ b/docs/_reference/operators/sdf2d/chamferRectangleSdf2d.md
@@ -25,6 +25,7 @@ op:
returnTypes:
- float
- vec4
+ summary: Field that multiplies the scale of the rectangle.
- contextTypes:
- Context
- MaterialContext
@@ -41,6 +42,7 @@ op:
returnTypes:
- float
- vec4
+ summary: Field that overrides the chamfer distances.
supportedVariableInputs:
- scaleField
name: chamferRectangleSdf2d
@@ -55,6 +57,12 @@ op:
name: Chamfer
readOnlyHandling: baked
regularHandling: runtime
+ summary: The distance of the corner cuts on each axis. Keep these the same to
+ have 45 degree cuts.
+ summary: Rectangle with corners cut off at angles.
thumb: assets/images/reference/operators/sdf2d/chamferRectangleSdf2d_thumb.png
---
+
+
+Rectangle with corners cut off at angles.
\ No newline at end of file
diff --git a/docs/_reference/operators/sdf2d/index.md b/docs/_reference/operators/sdf2d/index.md
index 0e75c657a..9ae42d6d2 100644
--- a/docs/_reference/operators/sdf2d/index.md
+++ b/docs/_reference/operators/sdf2d/index.md
@@ -13,89 +13,144 @@ cat:
name: sdf2d
operators:
- name: arbitraryPolygonSdf2d
+ summary: Polygonal area with arbitrarily positioned points.
+ thumb: assets/images/reference/operators/sdf2d/arbitraryPolygonSdf2d_thumb.png
- name: arcSdf2d
+ summary: Radial arc, a segment of a circular path, with rounded ends.
+ thumb: assets/images/reference/operators/sdf2d/arcSdf2d_thumb.png
- name: archSdf2d
+ summary: Arched doorway shape with a rounded top and rectangular bottom.
+ thumb: assets/images/reference/operators/sdf2d/archSdf2d_thumb.png
- name: arrowSdf2d
+ thumb: assets/images/reference/operators/sdf2d/arrowSdf2d_thumb.png
- keywords:
- bezier
- curve
- line
name: bezierSdf2d
+ thumb: assets/images/reference/operators/sdf2d/bezierSdf2d_thumb.png
- name: blobbyCrossSdf2d
+ thumb: assets/images/reference/operators/sdf2d/blobbyCrossSdf2d_thumb.png
- name: branchingTreeSdf2d
status: beta
+ thumb: assets/images/reference/operators/sdf2d/branchingTreeSdf2d_thumb.png
- name: chamferRectangleSdf2d
+ summary: Rectangle with corners cut off at angles.
+ thumb: assets/images/reference/operators/sdf2d/chamferRectangleSdf2d_thumb.png
- name: circleSdf
summary: 2D circle SDF.
+ thumb: assets/images/reference/operators/sdf2d/circleSdf_thumb.png
- name: circleWaveSdf2d
+ thumb: assets/images/reference/operators/sdf2d/circleWaveSdf2d_thumb.png
- name: coolSSdf2d
+ thumb: assets/images/reference/operators/sdf2d/coolSSdf2d_thumb.png
- name: cornerSdf2d
summary: 2D SDF for an infinite corner, like an infinite square positioned by
one corner.
+ thumb: assets/images/reference/operators/sdf2d/cornerSdf2d_thumb.png
- name: crossSdf2d
summary: 2D cross shape SDF, with 4 arms and option rounding of the intersections.
+ thumb: assets/images/reference/operators/sdf2d/crossSdf2d_thumb.png
- name: cutDiscSdf2d
+ thumb: assets/images/reference/operators/sdf2d/cutDiscSdf2d_thumb.png
- name: dogBoneSdf2d
summary: 2D SDF for two connected circles.
+ thumb: assets/images/reference/operators/sdf2d/dogBoneSdf2d_thumb.png
- name: eggSdf2d
+ thumb: assets/images/reference/operators/sdf2d/eggSdf2d_thumb.png
- keywords:
- circle
- ellipse
- oval
name: ellipseSdf2d
+ thumb: assets/images/reference/operators/sdf2d/ellipseSdf2d_thumb.png
- name: flowerSdf2d
+ thumb: assets/images/reference/operators/sdf2d/flowerSdf2d_thumb.png
- name: heartSdf2d
+ thumb: assets/images/reference/operators/sdf2d/heartSdf2d_thumb.png
- name: hexagonalGridSdf2d
+ thumb: assets/images/reference/operators/sdf2d/hexagonalGridSdf2d_thumb.png
- name: horseshoeSdf2d
+ thumb: assets/images/reference/operators/sdf2d/horseshoeSdf2d_thumb.png
- name: isoscelesTriangleSdf2d
+ thumb: assets/images/reference/operators/sdf2d/isoscelesTriangleSdf2d_thumb.png
- name: jointSdf2d
+ thumb: assets/images/reference/operators/sdf2d/jointSdf2d_thumb.png
- name: kochSnowflakeSdf2d
+ thumb: assets/images/reference/operators/sdf2d/kochSnowflakeSdf2d_thumb.png
- name: lineSegmentSdf2d
summary: 2D line segment SDF.
+ thumb: assets/images/reference/operators/sdf2d/lineSegmentSdf2d_thumb.png
- name: moonSdf2d
+ thumb: assets/images/reference/operators/sdf2d/moonSdf2d_thumb.png
- name: parabolaSdf2d
+ thumb: assets/images/reference/operators/sdf2d/parabolaSdf2d_thumb.png
- name: parallelogramSdf2d
+ thumb: assets/images/reference/operators/sdf2d/parallelogramSdf2d_thumb.png
- keywords:
- arc
- ring
- slice
name: pieSdf2d
summary: SDF for a 2D pie-slice shape.
+ thumb: assets/images/reference/operators/sdf2d/pieSdf2d_thumb.png
- name: pistonSdf2d
+ thumb: assets/images/reference/operators/sdf2d/pistonSdf2d_thumb.png
- name: planeSdf2d
+ thumb: assets/images/reference/operators/sdf2d/planeSdf2d_thumb.png
- name: polySplineSdf2d
+ thumb: assets/images/reference/operators/sdf2d/polySplineSdf2d_thumb.png
- name: polygonSdf2d
summary: SDF for several types of 2D polygons.
+ thumb: assets/images/reference/operators/sdf2d/polygonSdf2d_thumb.png
- name: quadSdf2d
summary: SDF for a 2D quad with arbitrary corners.
+ thumb: assets/images/reference/operators/sdf2d/quadSdf2d_thumb.png
- name: rectangleSdf
summary: SDF for a 2D rectangle.
+ thumb: assets/images/reference/operators/sdf2d/rectangleSdf_thumb.png
- name: rhombilleTilingSdf2d
+ thumb: assets/images/reference/operators/sdf2d/rhombilleTilingSdf2d_thumb.png
- name: rhombusSdf2d
summary: SDF for a 2D rhombus (diamond), with its corners aligned to the axes.
+ thumb: assets/images/reference/operators/sdf2d/rhombusSdf2d_thumb.png
- name: roundedRectangleSdf2d
summary: SDF for a 2D rectangle with optionally rounded corners.
+ thumb: assets/images/reference/operators/sdf2d/roundedRectangleSdf2d_thumb.png
- name: spikeSdf2d
+ thumb: assets/images/reference/operators/sdf2d/spikeSdf2d_thumb.png
- name: spiralSdf2d
+ thumb: assets/images/reference/operators/sdf2d/spiralSdf2d_thumb.png
- name: stairSdf2d
status: beta
+ thumb: assets/images/reference/operators/sdf2d/stairSdf2d_thumb.png
- name: starSdf2d
summary: SDF for a 2D star shape.
+ thumb: assets/images/reference/operators/sdf2d/starSdf2d_thumb.png
- name: subdivisionSdf2d
status: beta
+ thumb: assets/images/reference/operators/sdf2d/subdivisionSdf2d_thumb.png
- name: superQuadSdf2d
+ thumb: assets/images/reference/operators/sdf2d/superQuadSdf2d_thumb.png
- name: textSdf2d
status: beta
+ thumb: assets/images/reference/operators/sdf2d/textSdf2d_thumb.png
- name: trapezoidSdf2d
+ thumb: assets/images/reference/operators/sdf2d/trapezoidSdf2d_thumb.png
- name: triangleSdf2d
summary: SDF for a 2D triangle.
+ thumb: assets/images/reference/operators/sdf2d/triangleSdf2d_thumb.png
- name: triangularGridSdf2d
+ thumb: assets/images/reference/operators/sdf2d/triangularGridSdf2d_thumb.png
- name: vesicaSdf2d
summary: SDF for a 2d vesica, which is a shape based on the overlap between two
circles.
+ thumb: assets/images/reference/operators/sdf2d/vesicaSdf2d_thumb.png
- name: vesicaSegmentSdf2d
+ thumb: assets/images/reference/operators/sdf2d/vesicaSegmentSdf2d_thumb.png
- name: wedgeSdf2d
status: beta
+ thumb: assets/images/reference/operators/sdf2d/wedgeSdf2d_thumb.png
summary: 'Signed distances functions which define geometry in 2D space, by calculating
the distance from the edge of the shape at any given point.'
diff --git a/docs/_reference/operators/time/lfoField.md b/docs/_reference/operators/time/lfoField.md
index eb74aac83..de1cc76d9 100644
--- a/docs/_reference/operators/time/lfoField.md
+++ b/docs/_reference/operators/time/lfoField.md
@@ -62,10 +62,14 @@ op:
regularHandling: baked
- label: Time Source
menuOptions:
- - label: Global
- name: global
- - label: Context
- name: context
+ - label: Seconds (Timeline)
+ name: seconds
+ - label: Frames (Timeline)
+ name: frames
+ - label: Seconds (Absolute)
+ name: absseconds
+ - label: Frames (Absolute)
+ name: absframes
name: Timesource
readOnlyHandling: baked
regularHandling: runtime
diff --git a/docs/_reference/operators/utility/index.md b/docs/_reference/operators/utility/index.md
index 06299989c..adb4b3ba0 100644
--- a/docs/_reference/operators/utility/index.md
+++ b/docs/_reference/operators/utility/index.md
@@ -25,6 +25,8 @@ cat:
status: beta
- name: providePosition
- name: provideVariable
+ - name: restrictTypes
+ status: beta
- name: speedGenerator
- name: variableList
status: beta
diff --git a/docs/_reference/operators/utility/restrictTypes.md b/docs/_reference/operators/utility/restrictTypes.md
new file mode 100644
index 000000000..bf9f1f18d
--- /dev/null
+++ b/docs/_reference/operators/utility/restrictTypes.md
@@ -0,0 +1,65 @@
+---
+layout: operator
+title: restrictTypes
+parent: Utility Operators
+grand_parent: Operators
+permalink: /reference/operators/utility/restrictTypes
+redirect_from:
+ - /reference/opType/raytk.operators.utility.restrictTypes/
+op:
+ category: utility
+ inputs:
+ - contextTypes:
+ - Context
+ coordTypes:
+ - float
+ label: definition_in
+ name: definition_in
+ required: true
+ returnTypes:
+ - Sdf
+ name: restrictTypes
+ opType: raytk.operators.utility.restrictTypes
+ parameters:
+ - label: Enable
+ name: Enable
+ - label: Coord Type
+ menuOptions:
+ - label: 1D
+ name: float
+ - label: 2D
+ name: vec2
+ - label: 3D
+ name: vec3
+ - label: 4D
+ name: vec4
+ name: Coordtype
+ - label: Context Type
+ menuOptions:
+ - label: Context
+ name: Context
+ - label: MaterialContext
+ name: MaterialContext
+ - label: CameraContext
+ name: CameraContext
+ - label: LightContext
+ name: LightContext
+ - label: RayContext
+ name: RayContext
+ name: Contexttype
+ - label: Return Type
+ menuOptions:
+ - label: Sdf
+ name: Sdf
+ - label: vec4
+ name: vec4
+ - label: float
+ name: float
+ - label: Ray
+ name: Ray
+ - label: Light
+ name: Light
+ name: Returntype
+ status: beta
+
+---
diff --git a/docs/_sass/custom/custom.scss b/docs/_sass/custom/custom.scss
index fee744017..4790289fb 100644
--- a/docs/_sass/custom/custom.scss
+++ b/docs/_sass/custom/custom.scss
@@ -96,9 +96,9 @@ $status-deprecated-fg-color: rgb(64%, 81%, 81%);
}
}
-.category-ops img {
- width: 50px;
- height: 50px;
+.category-op-table .thumb-placeholder {
+ display: block;
+ height: 80px;
}
.op-thumb {
diff --git a/docs/assets/images/reference/operators/filter/mirrorAxes_thumb.png b/docs/assets/images/reference/operators/filter/mirrorAxes_thumb.png
index 312795be5..2bdc19def 100644
Binary files a/docs/assets/images/reference/operators/filter/mirrorAxes_thumb.png and b/docs/assets/images/reference/operators/filter/mirrorAxes_thumb.png differ
diff --git a/docs/assets/images/reference/operators/filter/modulo1D_thumb.png b/docs/assets/images/reference/operators/filter/modulo1D_thumb.png
index 16b436962..1cb6abded 100644
Binary files a/docs/assets/images/reference/operators/filter/modulo1D_thumb.png and b/docs/assets/images/reference/operators/filter/modulo1D_thumb.png differ
diff --git a/docs/assets/images/reference/operators/filter/modulo3D_thumb.png b/docs/assets/images/reference/operators/filter/modulo3D_thumb.png
index 61d7be7d0..f8aa3eeaf 100644
Binary files a/docs/assets/images/reference/operators/filter/modulo3D_thumb.png and b/docs/assets/images/reference/operators/filter/modulo3D_thumb.png differ
diff --git a/docs/assets/images/reference/operators/filter/moduloSpherical_thumb.png b/docs/assets/images/reference/operators/filter/moduloSpherical_thumb.png
new file mode 100644
index 000000000..1bbf8f3c8
Binary files /dev/null and b/docs/assets/images/reference/operators/filter/moduloSpherical_thumb.png differ
diff --git a/docs/assets/images/reference/operators/filter/moduloToroidal_thumb.png b/docs/assets/images/reference/operators/filter/moduloToroidal_thumb.png
index c8f83956d..7050f2b8f 100644
Binary files a/docs/assets/images/reference/operators/filter/moduloToroidal_thumb.png and b/docs/assets/images/reference/operators/filter/moduloToroidal_thumb.png differ
diff --git a/docs/assets/images/reference/operators/light/axisLight_thumb.png b/docs/assets/images/reference/operators/light/axisLight_thumb.png
new file mode 100644
index 000000000..61fcbb14d
Binary files /dev/null and b/docs/assets/images/reference/operators/light/axisLight_thumb.png differ
diff --git a/docs/assets/images/reference/operators/light/directionalLight_thumb.png b/docs/assets/images/reference/operators/light/directionalLight_thumb.png
new file mode 100644
index 000000000..ec8b9c462
Binary files /dev/null and b/docs/assets/images/reference/operators/light/directionalLight_thumb.png differ
diff --git a/docs/assets/images/reference/operators/sdf2d/chamferRectangleSdf2d_thumb.png b/docs/assets/images/reference/operators/sdf2d/chamferRectangleSdf2d_thumb.png
index de1ce0f8d..695107799 100644
Binary files a/docs/assets/images/reference/operators/sdf2d/chamferRectangleSdf2d_thumb.png and b/docs/assets/images/reference/operators/sdf2d/chamferRectangleSdf2d_thumb.png differ
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 0d2576631..d9e8b251f 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -1,5 +1,59 @@
# Release Notes
+## v0.41
+
+### Highlights
+
+* New instanceLight, lightTransform, and limitLight operators for more flexible lighting setups.
+* Overhaul of how multiple lights are handled by materials to produce more consistent results.
+* New mixFields operator acts as a mixer to easily combine different fields with level sliders and toggles.
+* Fixed the missing palette thumbnails that disappeared in the last release.
+* Helpful new actions in the editor tools menu.
+* Significant improvements to documentation.
+
+### Details
+
+* Improvements / additions
+ * New OPs
+ * instanceLight - use instancing to create multiple lights, with CHOPs for positioning and other settings (#1213)
+ * lightTransform - transform specially designed to be used on lights (#1214)
+ * limitLight - distance and boundary attenuation and optimization (#1224)
+ * mixFields - combine multiple fields with quick toggles and level adjustments for each (#696)
+ * restrictTypes - helper to force operators that support multiple types to use a specific type (#683)
+ * New OP features
+ * adjustColor - support using on lights (#1213)
+ * assignUV - support using another SDF to assign UVs (#1218)
+ * cameraTransform - support separate transform for look at position (#841)
+ * magnet - uniform scaling
+ * moduloToroidal - mirroring
+ * radialClone - option to keep rotation while still arranging radially (#1219)
+ * sampledPointMat - blending and offset field inputs (#1143)
+ * spotLight - look at support (#834)
+ * Editor tools (#1201)
+ * Support editing multiple operators with the lock/unlock switcher actions
+ * Action to combine fields with mixFields (#696)
+ * Actions for cameraTransform/lightTransform (#541)
+ * Action for adding to multiLight
+ * Action for adding limitLight (#1224)
+ * Improvements
+ * Faster enable/disable with runtime bypass - mergeFields, shapedCombine, switch
+ * Clarify some input type error messages
+ * Fix display of thumbnail images on operator category documentation pages (#643)
+ * Documentation for lots of operators that were missing it, and updated lots of existing docs.
+* Fixes
+ * magnet - fix incorrect SDF scale adjustment (when possible)
+ * moduloToroidal - fix swapped shift parameters
+ * Fix broken previews in inspector related to missing output buffer selector
+ * Fix missing palette thumbnails (#1217)
+ * Prevent negative light levels which cause problems with multiple lights (#1213)
+ * Hide irrelevant editor actions on renderers (#1201)
+* Changes (potentially breaking)
+ * helixSdf - remove alternate coordinate type support for field inputs
+ * raymarchRender3D - make limit box disabled by default
+ * Restructured how multiple lights are handled. Materials are now responsible for looping through the lights and combining the results, rather than the renderer doing it. This allows modularMat to correctly handle shading elements that aren't based on lighting. There may be some differences in how material shading behaves, but hopefully they should be fairly minor. (#1213)
+ * Deprecate simpleDiff, simpleIntersect, simpleUnion
+* Infrastructure / internals
+
## v0.40
### Highlights
diff --git a/raytk-profile.toe b/raytk-profile.toe
new file mode 100644
index 000000000..70b540bdc
Binary files /dev/null and b/raytk-profile.toe differ
diff --git a/raytk-snippets.toe b/raytk-snippets.toe
deleted file mode 100644
index 532469ac1..000000000
Binary files a/raytk-snippets.toe and /dev/null differ
diff --git a/snippets/index.tox b/snippets/index.tox
deleted file mode 100644
index 01e73feef..000000000
Binary files a/snippets/index.tox and /dev/null differ
diff --git a/snippets/navigator/BUILD.py b/snippets/navigator/BUILD.py
deleted file mode 100644
index ac46c449f..000000000
--- a/snippets/navigator/BUILD.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# noinspection PyUnreachableCode
-if False:
- # noinspection PyUnresolvedReferences
- from raytkBuild import BuildContext
- from navigator import Navigator
- from _stubs import *
- from components.opPicker.opPicker import OpPicker
- ext.navigator = Navigator(COMP())
-
-async def build(context: 'BuildContext'):
- comp = parent()
- context.log('Processing navigator')
- await context.yieldAsync()
- ext.navigator.resetState()
- context.detachTox(comp)
- context.detachAllFileSyncDatsIn(comp, reloadFirst=True)
- context.lockBuildLockOps(comp)
-
- o = op('opPicker') # type: OpPicker | COMP
- context.disableCloning(o)
- context.detachTox(o)
- if context.experimental:
- o.SetFilterToggles(alpha=True, beta=True, deprecated=True)
-
- context.log('Finished processing navigator')
diff --git a/snippets/navigator/buildSnippetTable.py b/snippets/navigator/buildSnippetTable.py
deleted file mode 100644
index 6186b256a..000000000
--- a/snippets/navigator/buildSnippetTable.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# noinspection PyUnreachableCode
-if False:
- # noinspection PyUnresolvedReferences
- from _stubs import *
-
- from navigator import Navigator
- ext.navigator = Navigator(COMP())
-
-def onCook(dat):
- ext.navigator.buildSnippetTable(
- dat,
- snippetTable=dat.inputs[0],
- opTable=dat.inputs[1],
- )
diff --git a/snippets/navigator/navigator.py b/snippets/navigator/navigator.py
deleted file mode 100644
index 77e2669b9..000000000
--- a/snippets/navigator/navigator.py
+++ /dev/null
@@ -1,92 +0,0 @@
-from raytkUtil import navigateTo
-
-# noinspection PyUnreachableCode
-if False:
- # noinspection PyUnresolvedReferences
- from _stubs import *
- from _typeAliases import *
- from components.opPicker.opPicker import PickerItem
-
- class _Pars:
- Snippetsroot: CompParamT
- Optable: DatParamT
-
- class _Comp(COMP):
- par: _Pars
-
- class _StatePars:
- Selectedoptype: StrParamT
- Selectedsnippet: StrParamT
-
- ipar.navigatorState = _StatePars()
-
-class Navigator:
- def __init__(self, ownerComp: COMP):
- # noinspection PyTypeChecker
- self.ownerComp = ownerComp # type: _Comp
- self.currentSnippetTable = ownerComp.op('currentSnippets') # type: DAT
- self.fullSnippetTable = ownerComp.op('snippetTable') # type: DAT
-
- @staticmethod
- def resetState():
- ipar.navigatorState.Selectedoptype = ''
- ipar.navigatorState.Selectedsnippet = ''
-
- @staticmethod
- def buildSnippetTable(dat: DAT, snippetTable: DAT, opTable: DAT):
- dat.clear()
- dat.appendRow(['opType', 'name', 'relPath', 'label'])
- for i in range(1, snippetTable.numRows):
- relPath = snippetTable[i, 'relPath'].val
- name = snippetTable[i, 'name'].val
- opName = name.split('_')[0]
- opType = opTable[opName, 'opType']
- dat.appendRow([
- opType,
- name,
- relPath,
- name.replace('_', ' ')
- ])
-
- def onOpPickerPickItem(self, item: 'PickerItem'):
- if item.isCategory:
- return
- ipar.navigatorState.Selectedoptype = item.opType
- self.ownerComp.op('snippetList').par.Refresh.pulse()
- if self.currentSnippetTable.numRows == 2:
- self.onSnippetListSelect(self.currentSnippetTable[1, 'name'].val)
- else:
- ipar.navigatorState.Selectedsnippet = self.currentSnippetTable[1, 'name'] or ''
-
- def onSnippetListSelect(self, snippetName: str):
- relPath = self.currentSnippetTable[snippetName, 'relPath']
- if not relPath:
- return
- snippet = self.ownerComp.par.Snippetsroot.eval().op(relPath)
- self._updateSnippetCooking(snippet)
- pane = navigateTo(snippet, name='raytkSnippet', popup=False, goInto=True)
- self._focusSnippetNetworkBoxes(snippet, pane)
-
- def _updateSnippetCooking(self, targetSnippet: COMP | None):
- snippetsRoot = self.ownerComp.par.Snippetsroot.eval()
- allSnippets = snippetsRoot.ops(*self.fullSnippetTable.col('relPath')[1:])
- for o in allSnippets:
- if o is not targetSnippet and o.allowCooking:
- o.allowCooking = False
- if targetSnippet and not targetSnippet.allowCooking:
- targetSnippet.allowCooking = True
-
- @staticmethod
- def _focusSnippetNetworkBoxes(snippet: COMP, pane: NetworkEditor):
- if not snippet:
- return
- annotations = snippet.findChildren(type=annotateCOMP, depth=1, includeUtility=True)
- if not annotations:
- return
- annotations[0].current = True
- for a in annotations:
- a.selected = True
- pane.homeSelected(zoom=True)
-
- def Open(self, _=None):
- self.ownerComp.op('window').par.winopen.pulse()
diff --git a/snippets/navigator/navigator.tox b/snippets/navigator/navigator.tox
deleted file mode 100644
index 77e1e3c09..000000000
Binary files a/snippets/navigator/navigator.tox and /dev/null differ
diff --git a/snippets/navigator/opPickerCallbacks.py b/snippets/navigator/opPickerCallbacks.py
deleted file mode 100644
index 767019ae4..000000000
--- a/snippets/navigator/opPickerCallbacks.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# noinspection PyUnreachableCode
-if False:
- # noinspection PyUnresolvedReferences
- from _stubs import *
- from navigator import Navigator
-
- ext.navigator = Navigator(COMP())
-
-def onKeyboardShortcut(info: dict):
- pass
-
-def onPickItem(info: dict):
- ext.navigator.onOpPickerPickItem(info.get('item'))
-
-def onRolloverItem(info: dict):
- pass
diff --git a/snippets/navigator/snippetListCallbacks.py b/snippets/navigator/snippetListCallbacks.py
deleted file mode 100644
index ed3f07a5d..000000000
--- a/snippets/navigator/snippetListCallbacks.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# noinspection PyUnreachableCode
-if False:
- # noinspection PyUnresolvedReferences
- from _stubs import *
- from navigator import Navigator
- ext.navigator = Navigator(COMP())
-
-def onSelectRow(info: dict):
- ext.navigator.onSnippetListSelect(info['rowData']['rowObject']['name'])
-
-
-
-
diff --git a/snippets/operators/camera/index.tox b/snippets/operators/camera/index.tox
deleted file mode 100644
index 2e4fa696c..000000000
Binary files a/snippets/operators/camera/index.tox and /dev/null differ
diff --git a/snippets/operators/combine/index.tox b/snippets/operators/combine/index.tox
deleted file mode 100644
index 30f7b90d0..000000000
Binary files a/snippets/operators/combine/index.tox and /dev/null differ
diff --git a/snippets/operators/convert/index.tox b/snippets/operators/convert/index.tox
deleted file mode 100644
index 5e063a81a..000000000
Binary files a/snippets/operators/convert/index.tox and /dev/null differ
diff --git a/snippets/operators/field/hashField_snippet.tox b/snippets/operators/field/hashField_snippet.tox
new file mode 100644
index 000000000..9f242eaea
Binary files /dev/null and b/snippets/operators/field/hashField_snippet.tox differ
diff --git a/snippets/operators/field/index.tox b/snippets/operators/field/index.tox
deleted file mode 100644
index 08d6f503d..000000000
Binary files a/snippets/operators/field/index.tox and /dev/null differ
diff --git a/snippets/operators/filter/cameraTransform_snippet.tox b/snippets/operators/filter/cameraTransform_snippet.tox
index 5e8b9c065..b94f8742c 100644
Binary files a/snippets/operators/filter/cameraTransform_snippet.tox and b/snippets/operators/filter/cameraTransform_snippet.tox differ
diff --git a/snippets/operators/filter/index.tox b/snippets/operators/filter/index.tox
deleted file mode 100644
index 3003f9942..000000000
Binary files a/snippets/operators/filter/index.tox and /dev/null differ
diff --git a/snippets/operators/function/index.tox b/snippets/operators/function/index.tox
deleted file mode 100644
index 7c670df3c..000000000
Binary files a/snippets/operators/function/index.tox and /dev/null differ
diff --git a/snippets/operators/index.tox b/snippets/operators/index.tox
deleted file mode 100644
index 653e51c38..000000000
Binary files a/snippets/operators/index.tox and /dev/null differ
diff --git a/snippets/operators/light/index.tox b/snippets/operators/light/index.tox
deleted file mode 100644
index 181b3e343..000000000
Binary files a/snippets/operators/light/index.tox and /dev/null differ
diff --git a/snippets/operators/material/index.tox b/snippets/operators/material/index.tox
deleted file mode 100644
index 33151d2b7..000000000
Binary files a/snippets/operators/material/index.tox and /dev/null differ
diff --git a/snippets/operators/pattern/index.tox b/snippets/operators/pattern/index.tox
deleted file mode 100644
index 5504a2331..000000000
Binary files a/snippets/operators/pattern/index.tox and /dev/null differ
diff --git a/snippets/operators/sdf/index.tox b/snippets/operators/sdf/index.tox
deleted file mode 100644
index fcebaac64..000000000
Binary files a/snippets/operators/sdf/index.tox and /dev/null differ
diff --git a/snippets/operators/sdf2d/index.tox b/snippets/operators/sdf2d/index.tox
deleted file mode 100644
index 561c848cd..000000000
Binary files a/snippets/operators/sdf2d/index.tox and /dev/null differ
diff --git a/snippets/raytkSnippets.tox b/snippets/raytkSnippets.tox
deleted file mode 100644
index 102e4d9b4..000000000
Binary files a/snippets/raytkSnippets.tox and /dev/null differ
diff --git a/src/components/opDefinition/opDefinition.py b/src/components/opDefinition/opDefinition.py
index 24ed3d4ea..738286470 100644
--- a/src/components/opDefinition/opDefinition.py
+++ b/src/components/opDefinition/opDefinition.py
@@ -213,6 +213,15 @@ def _validateInput(handler: COMP):
]
return errors, warnings
+_coordTypeDescs = {'float': '1D', 'vec2': '2D', 'vec3': '3D', 'vec4': '4D'}
+_returnTypeDescs = {
+ 'float': 'fields producing float values',
+ 'vec4': 'fields producing vector values',
+ 'Sdf': 'SDFs',
+ 'Light': 'lights',
+ 'Ray': 'cameras or ray producers',
+}
+
def _checkInputType(handler: COMP, typeName: str, typeCategory: str):
if not typeName:
return
@@ -222,6 +231,14 @@ def _checkInputType(handler: COMP, typeName: str, typeCategory: str):
return
elif typeName in supported:
return
+ if typeCategory == 'coordType':
+ typeDesc = _coordTypeDescs.get(typeName, typeName)
+ return f'Input does not support {typeDesc} coordinates'
+ elif typeCategory == 'returnType':
+ typeDesc = _returnTypeDescs.get(typeName, typeName)
+ return 'Input does not support ' + typeDesc
+ elif typeCategory == 'contextType':
+ return f'Input does not support {typeName} context'
return f'Input does not support {typeCategory} {typeName}'
def onValidationChange(dat: DAT):
diff --git a/src/lib/raytkBuild.py b/src/lib/raytkBuild.py
index 00bad2a6d..72ff355ce 100644
--- a/src/lib/raytkBuild.py
+++ b/src/lib/raytkBuild.py
@@ -245,6 +245,12 @@ async def yieldAsync(self):
# do nothing!
pass
+ async def waitFrames(self, frames: int):
+ from asyncio import Future
+ future = Future()
+ run('args[0].set_result(None)', future, delayFrames=frames, delayRef=root)
+ await future
+
def updateROPInstance(self, comp: COMP):
self.log(f'Updating OP instance: {comp}')
# noinspection PyTypeChecker
@@ -413,7 +419,7 @@ def _writeDocs(self, relativePath: 'Path', docText: str):
def processOpCategory(self, categoryOp: COMP):
self.context.log(f'Processing docs for category {categoryOp}')
categoryInfo = CategoryInfo(categoryOp)
- catHelp = CategoryHelp.extractFromComp(categoryOp)
+ catHelp = CategoryHelp.extractFromComp(categoryOp, self.imagesFolder)
if not catHelp.operators:
self.context.log(f'Skipping docs for empty category {categoryOp}')
return
diff --git a/src/lib/raytkDocs.py b/src/lib/raytkDocs.py
index 6e4eeda31..6236e620a 100644
--- a/src/lib/raytkDocs.py
+++ b/src/lib/raytkDocs.py
@@ -435,7 +435,7 @@ class CategoryHelp:
operators: list[ROPHelp] = field(default_factory=list)
@classmethod
- def extractFromComp(cls, comp: COMP):
+ def extractFromComp(cls, comp: COMP, imagesFolder: Path | None):
info = CategoryInfo(comp)
catHelp = cls(
name=info.categoryName,
@@ -445,7 +445,9 @@ def extractFromComp(cls, comp: COMP):
docText = dat.text
catHelp.summary, catHelp.detail = _extractHelpSummaryAndDetail(docText)
for rop in info.operators:
- catHelp.operators.append(ROPHelp.extractFromROP(rop))
+ docManager = OpDocManager(rop)
+ ropHelp = docManager.extractForBuild(imagesFolder=imagesFolder)
+ catHelp.operators.append(ropHelp)
return catHelp
def formatAsList(self):
diff --git a/src/lib/shader/hg_sdf.glsl b/src/lib/shader/hg_sdf.glsl
index dd1df70d5..c9a6435c0 100644
--- a/src/lib/shader/hg_sdf.glsl
+++ b/src/lib/shader/hg_sdf.glsl
@@ -184,6 +184,20 @@ float pModPolar(inout vec2 p, float repetitions) {
return c;
}
+float pModPolarMirror(inout vec2 p, float repetitions) {
+ float angle = 2*PI/repetitions;
+ float a = atan(p.y, p.x) + angle/2.;
+ float r = length(p);
+ float c = floor(a/angle);
+ float a1 = mod(a, angle * 2);
+ if (a1 >= angle) {
+ a1 = angle - a1;
+ }
+ a = mod(a1,angle) - angle/2.;
+ p = vec2(cos(a), sin(a))*r;
+ return c;
+}
+
// Repeat in two dimensions
vec2 pMod2(inout vec2 p, vec2 size) {
vec2 c = floor((p + size*0.5)/size);
diff --git a/src/lib/shader/raytkCore.glsl b/src/lib/shader/raytkCore.glsl
index 579a2382b..79fd80701 100644
--- a/src/lib/shader/raytkCore.glsl
+++ b/src/lib/shader/raytkCore.glsl
@@ -53,9 +53,7 @@ struct Sdf {
vec4 objectId;
#endif
- #ifdef RAYTK_USE_SHADOW
bool useShadow;
- #endif
#ifdef RAYTK_USE_AO
bool useAO;
@@ -129,10 +127,8 @@ Sdf createSdf(float dist) {
#ifdef RAYTK_OBJECT_ID_IN_SDF
res.objectId = vec4(0);
#endif
- #ifdef RAYTK_USE_SHADOW
// Switching this on by default since the default material uses shadows.
res.useShadow = true;
- #endif
#ifdef RAYTK_USE_AO
res.useAO = false;
#endif
@@ -366,18 +362,27 @@ struct LightContext {
Time time;
#endif
vec4 iteration;
+ vec3 posOffset;
+ vec3 lookAtOffset;
+ vec3 rotation;
};
LightContext createLightContext(Sdf res, vec3 norm) {
- return LightContext(0, res, norm
+ LightContext ctx;
+ ctx.index = 0;
+ ctx.result = res;
+ ctx.normal = norm;
#ifdef RAYTK_GLOBAL_POS_IN_CONTEXT
- , vec3(0.)
+ ctx.globalPos = vec3(0);
#endif
#if defined(RAYTK_TIME_IN_CONTEXT) || defined(RAYTK_USE_TIME)
- , getGlobalTime()
+ ctx.time = getGlobalTime();
#endif
- , vec4(0.)
- );
+ ctx.iteration = vec4(0);
+ ctx.posOffset = vec3(0);
+ ctx.lookAtOffset = vec3(0);
+ ctx.rotation = vec3(0);
+ return ctx;
}
void setIterationIndex(inout LightContext ctx, float index) {
@@ -397,6 +402,11 @@ struct MaterialContext {
Context context;
Ray ray;
Light light;
+ int lightIndex;
+ #if RAYTK_LIGHT_COUNT > 1
+ Light allLights[RAYTK_LIGHT_COUNT];
+ float allShadedLevels[RAYTK_LIGHT_COUNT];
+ #endif
vec3 normal;
vec3 reflectColor;
vec3 refractColor;
@@ -443,6 +453,7 @@ MaterialContext createMaterialContext() {
matCtx.ray = Ray(vec3(0.), vec3(0.));
matCtx.normal = vec3(0.);
matCtx.reflectColor = vec3(0.);
+ matCtx.lightIndex = 0;
#ifdef RAYTK_GLOBAL_POS_IN_CONTEXT
matCtx.globalPos = vec3(0);
#endif
@@ -486,8 +497,25 @@ struct CameraContext {
#if defined(RAYTK_TIME_IN_CONTEXT) || defined(RAYTK_USE_TIME)
Time time;
#endif
+
+ vec3 posOffset;
+ vec3 lookAtOffset;
+ vec3 rotation;
};
+CameraContext createCameraContext(vec2 resolution) {
+ CameraContext ctx;
+ ctx.resolution = resolution;
+ #if defined(RAYTK_TIME_IN_CONTEXT) || defined(RAYTK_USE_TIME)
+ ctx.time = getGlobalTime();
+ #endif
+
+ ctx.posOffset = vec3(0.);
+ ctx.lookAtOffset = vec3(0.);
+ ctx.rotation = vec3(0.);
+ return ctx;
+}
+
struct RayContext {
Sdf result;
Ray ray;
diff --git a/src/operators/camera/basicCamera.glsl b/src/operators/camera/basicCamera.glsl
index cd762f199..4d8c1ef72 100644
--- a/src/operators/camera/basicCamera.glsl
+++ b/src/operators/camera/basicCamera.glsl
@@ -6,13 +6,13 @@ ReturnT thismap(CoordT p, ContextT ctx) {
//screenPos.x *= size.x / size.y;
Ray ray;
- ray.pos = THIS_Campos;
+ ray.pos = THIS_Campos + ctx.posOffset;
// Calculate ray direction
vec3 viewDir = normalize(vec3(screenPos, -z));
- viewDir *= TDRotateOnAxis(-THIS_Camrot.x, vec3(1., 0., 0.));
- viewDir *= TDRotateOnAxis(-THIS_Camrot.y, vec3(0., 1., 0.));
- viewDir *= TDRotateOnAxis(-THIS_Camrot.z, vec3(0., 0., 1.));
-// pRotateOnXYZ(viewDir, -THIS_Camrot);
+ viewDir *= TDRotateOnAxis(-THIS_Camrot.x - ctx.rotation.x, vec3(1., 0., 0.));
+ viewDir *= TDRotateOnAxis(-THIS_Camrot.y - ctx.rotation.y, vec3(0., 1., 0.));
+ viewDir *= TDRotateOnAxis(-THIS_Camrot.z - ctx.rotation.z, vec3(0., 0., 1.));
+// pRotateOnXYZ(viewDir, THIS_Camrot);
ray.dir = viewDir;
return ray;
}
\ No newline at end of file
diff --git a/src/operators/camera/basicCamera.tox b/src/operators/camera/basicCamera.tox
index 4d3749ad2..092b29e1c 100644
Binary files a/src/operators/camera/basicCamera.tox and b/src/operators/camera/basicCamera.tox differ
diff --git a/src/operators/camera/basicCamera.yaml b/src/operators/camera/basicCamera.yaml
index 65359ab99..0f12f1f90 100644
--- a/src/operators/camera/basicCamera.yaml
+++ b/src/operators/camera/basicCamera.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.camera.basicCamera
- opVersion: '9'
+ opVersion: '10'
opStatus: default
opDef: !def
enable: true
diff --git a/src/operators/camera/fieldCamera.glsl b/src/operators/camera/fieldCamera.glsl
index 4b3eff1f7..cae382659 100644
--- a/src/operators/camera/fieldCamera.glsl
+++ b/src/operators/camera/fieldCamera.glsl
@@ -11,5 +11,7 @@ ReturnT thismap(CoordT p, ContextT ctx) {
#else
ray.dir = vec3(0., 0., 1.);
#endif
+ ray.pos += ctx.posOffset;
+ pRotateOnXYZ(ray.dir, ctx.rotation);
return ray;
}
\ No newline at end of file
diff --git a/src/operators/camera/fieldCamera.tox b/src/operators/camera/fieldCamera.tox
index ffd3d6223..673c6a969 100644
Binary files a/src/operators/camera/fieldCamera.tox and b/src/operators/camera/fieldCamera.tox differ
diff --git a/src/operators/camera/fieldCamera.yaml b/src/operators/camera/fieldCamera.yaml
index 3599fa0b8..c3278ecca 100644
--- a/src/operators/camera/fieldCamera.yaml
+++ b/src/operators/camera/fieldCamera.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.camera.fieldCamera
- opVersion: '2'
+ opVersion: '3'
opStatus: beta
opDef: !def
enable: true
diff --git a/src/operators/camera/fisheyeCamera.glsl b/src/operators/camera/fisheyeCamera.glsl
index 6f5db244a..ff64a4b65 100644
--- a/src/operators/camera/fisheyeCamera.glsl
+++ b/src/operators/camera/fisheyeCamera.glsl
@@ -8,10 +8,10 @@ ReturnT thismap(CoordT p, ContextT ctx) {
screenPos.x *= size.x / size.y;
Ray ray;
- ray.pos = THIS_Campos;
+ ray.pos = THIS_Campos + ctx.posOffset;
// Calculate ray direction
vec3 up = THIS_Camup;
- vec3 lookAt = THIS_Lookatpos;
+ vec3 lookAt = THIS_Lookatpos + ctx.lookAtOffset;
vec3 camForward;
if (IS_TRUE(THIS_Enablelookat)) {
camForward = normalize(lookAt - ray.pos);
@@ -30,7 +30,7 @@ ReturnT thismap(CoordT p, ContextT ctx) {
BODY();
vec3 worldDir = camOrient * vec3(sin(theta)*cos(phi), sin(theta)*sin(phi), cos(theta));
- pRotateOnXYZ(worldDir, THIS_Camrot);
+ pRotateOnXYZ(worldDir, THIS_Camrot + ctx.rotation);
ray.dir = worldDir;
return ray;
}
\ No newline at end of file
diff --git a/src/operators/camera/fisheyeCamera.tox b/src/operators/camera/fisheyeCamera.tox
index f66a9275c..dfefcdf4b 100644
Binary files a/src/operators/camera/fisheyeCamera.tox and b/src/operators/camera/fisheyeCamera.tox differ
diff --git a/src/operators/camera/fisheyeCamera.yaml b/src/operators/camera/fisheyeCamera.yaml
index 548fb4592..c4b20a358 100644
--- a/src/operators/camera/fisheyeCamera.yaml
+++ b/src/operators/camera/fisheyeCamera.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.camera.fisheyeCamera
- opVersion: '11'
+ opVersion: '12'
opStatus: default
opDef: !def
enable: true
diff --git a/src/operators/camera/isoCamera.glsl b/src/operators/camera/isoCamera.glsl
index bad0d1247..501cfba6b 100644
--- a/src/operators/camera/isoCamera.glsl
+++ b/src/operators/camera/isoCamera.glsl
@@ -28,13 +28,15 @@ ReturnT thismap(CoordT p, ContextT ctx) {
// dir = normalize(dir);
+ pos += ctx.posOffset;
+
vec3 dir = vec3(
THIS_getDir(int(THIS_Dirx)),
THIS_getDir(int(THIS_Diry)),
THIS_getDir(int(THIS_Dirz)));
- pRotateOnXYZ(dir, THIS_Camrot);
+ pRotateOnXYZ(dir, THIS_Camrot + ctx.rotation);
Ray ray;
ray.pos = pos;
diff --git a/src/operators/camera/isoCamera.tox b/src/operators/camera/isoCamera.tox
index 657a78430..c48476764 100644
Binary files a/src/operators/camera/isoCamera.tox and b/src/operators/camera/isoCamera.tox differ
diff --git a/src/operators/camera/isoCamera.yaml b/src/operators/camera/isoCamera.yaml
index b46b26b4e..a1a2c8adc 100644
--- a/src/operators/camera/isoCamera.yaml
+++ b/src/operators/camera/isoCamera.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.camera.isoCamera
- opVersion: '4'
+ opVersion: '5'
opStatus: alpha
opDef: !def
enable: true
diff --git a/src/operators/camera/linkedCamera.glsl b/src/operators/camera/linkedCamera.glsl
index 12bd39406..5e5717afa 100644
--- a/src/operators/camera/linkedCamera.glsl
+++ b/src/operators/camera/linkedCamera.glsl
@@ -35,5 +35,7 @@ ReturnT thismap(CoordT p, ContextT ctx) {
);
}
#endif
+ ray.pos += ctx.posOffset;
+ pRotateOnXYZ(ray.dir, ctx.rotation);
return ray;
}
\ No newline at end of file
diff --git a/src/operators/camera/linkedCamera.tox b/src/operators/camera/linkedCamera.tox
index f03e81fba..20137b071 100644
Binary files a/src/operators/camera/linkedCamera.tox and b/src/operators/camera/linkedCamera.tox differ
diff --git a/src/operators/camera/linkedCamera.yaml b/src/operators/camera/linkedCamera.yaml
index 113f19a88..81d4b7aef 100644
--- a/src/operators/camera/linkedCamera.yaml
+++ b/src/operators/camera/linkedCamera.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.camera.linkedCamera
- opVersion: '9'
+ opVersion: '10'
opStatus: default
opDef: !def
enable: true
diff --git a/src/operators/camera/lookAtCamera.glsl b/src/operators/camera/lookAtCamera.glsl
index eb203db56..e1af0ba63 100644
--- a/src/operators/camera/lookAtCamera.glsl
+++ b/src/operators/camera/lookAtCamera.glsl
@@ -3,11 +3,11 @@ ReturnT thismap(CoordT p, ContextT ctx) {
vec2 xy = p - size / 2.0;
float z = size.y / tan(THIS_Camfov / 2.0);
Ray ray;
- ray.pos = THIS_Campos;
+ ray.pos = THIS_Campos + ctx.posOffset;
vec3 viewDir = normalize(vec3(xy, -z));
- mat4 viewToWorld = lookAtViewMatrix(ray.pos, THIS_Lookatpos, THIS_Camup);
+ mat4 viewToWorld = lookAtViewMatrix(ray.pos, THIS_Lookatpos + ctx.lookAtOffset, THIS_Camup);
vec3 worldDir = (viewToWorld * vec4(viewDir, 0)).xyz;
- pRotateOnXYZ(worldDir, THIS_Camrot);
+ pRotateOnXYZ(worldDir, THIS_Camrot + ctx.rotation);
ray.dir = worldDir;
return ray;
}
\ No newline at end of file
diff --git a/src/operators/camera/lookAtCamera.tox b/src/operators/camera/lookAtCamera.tox
index dd7bca7e0..bf216e69b 100644
Binary files a/src/operators/camera/lookAtCamera.tox and b/src/operators/camera/lookAtCamera.tox differ
diff --git a/src/operators/camera/lookAtCamera.yaml b/src/operators/camera/lookAtCamera.yaml
index 7809aa01a..0fd55abdc 100644
--- a/src/operators/camera/lookAtCamera.yaml
+++ b/src/operators/camera/lookAtCamera.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.camera.lookAtCamera
- opVersion: '11'
+ opVersion: '12'
opStatus: default
opDef: !def
enable: true
diff --git a/src/operators/camera/orthoCamera.glsl b/src/operators/camera/orthoCamera.glsl
index 45d5a9f99..b66c42522 100644
--- a/src/operators/camera/orthoCamera.glsl
+++ b/src/operators/camera/orthoCamera.glsl
@@ -5,5 +5,7 @@ ReturnT thismap(CoordT p, ContextT ctx) {
Ray ray;
ray.pos = THIS_Campos;
BODY();
+ ray.pos += ctx.posOffset;
+ pRotateOnXYZ(ray.dir, ctx.rotation);
return ray;
}
\ No newline at end of file
diff --git a/src/operators/camera/orthoCamera.tox b/src/operators/camera/orthoCamera.tox
index 027cec680..1cb0f4ce1 100644
Binary files a/src/operators/camera/orthoCamera.tox and b/src/operators/camera/orthoCamera.tox differ
diff --git a/src/operators/camera/orthoCamera.yaml b/src/operators/camera/orthoCamera.yaml
index cceb6037a..8f29adff0 100644
--- a/src/operators/camera/orthoCamera.yaml
+++ b/src/operators/camera/orthoCamera.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.camera.orthoCamera
- opVersion: '14'
+ opVersion: '15'
opStatus: beta
opDef: !def
enable: true
diff --git a/src/operators/combine/index.tox b/src/operators/combine/index.tox
index bc5f54d1c..dc6a1c38c 100644
Binary files a/src/operators/combine/index.tox and b/src/operators/combine/index.tox differ
diff --git a/src/operators/combine/mergeFields.glsl b/src/operators/combine/mergeFields.glsl
index 06ed98951..13019a683 100644
--- a/src/operators/combine/mergeFields.glsl
+++ b/src/operators/combine/mergeFields.glsl
@@ -1,4 +1,7 @@
ReturnT thismap(CoordT p, ContextT ctx) {
+ if (IS_FALSE(THIS_Enable)) {
+ return THIS_asReturnT(inputOp1(p, ctx));
+ }
ReturnT val = ReturnT(0.);
#ifdef THIS_UseInput1
inputOp1_ReturnT val1 = inputOp1(p, ctx);
diff --git a/src/operators/combine/mergeFields.tox b/src/operators/combine/mergeFields.tox
index bea930538..d40c3d804 100644
Binary files a/src/operators/combine/mergeFields.tox and b/src/operators/combine/mergeFields.tox differ
diff --git a/src/operators/combine/mergeFields.yaml b/src/operators/combine/mergeFields.yaml
index e604ee372..b0056dc76 100644
--- a/src/operators/combine/mergeFields.yaml
+++ b/src/operators/combine/mergeFields.yaml
@@ -1,11 +1,12 @@
!rop
meta: !meta
opType: raytk.operators.combine.mergeFields
- opVersion: '10'
+ opVersion: '11'
opStatus: default
opDef: !def
enable: !expr
expr: op('..').par.Enable
+ useRuntimeBypass: true
typeSpec: !ropTypes
coordType: !coordT
Allcoordtype: true
diff --git a/src/operators/combine/mixFields.glsl b/src/operators/combine/mixFields.glsl
new file mode 100644
index 000000000..159b6ad8f
--- /dev/null
+++ b/src/operators/combine/mixFields.glsl
@@ -0,0 +1,8 @@
+ReturnT thismap(CoordT p, ContextT ctx) {
+ float totalWeight = THIS_Defaultlevel;
+ ReturnT totalValue = THIS_asReturnT(THIS_Defaultvalue) * totalWeight;
+ AGGREGATE_BODY();
+ ReturnT res = totalValue;
+ COMBINE_BODY();
+ return res;
+}
\ No newline at end of file
diff --git a/src/operators/combine/mixFields.tox b/src/operators/combine/mixFields.tox
new file mode 100644
index 000000000..b9e3b1ee1
Binary files /dev/null and b/src/operators/combine/mixFields.tox differ
diff --git a/src/operators/combine/mixFields.yaml b/src/operators/combine/mixFields.yaml
new file mode 100644
index 000000000..0cdcb931b
--- /dev/null
+++ b/src/operators/combine/mixFields.yaml
@@ -0,0 +1,148 @@
+!rop
+meta: !meta
+ opType: raytk.operators.combine.mixFields
+ opVersion: '0'
+ opStatus: beta
+opDef: !def
+ enable: true
+ typeSpec: !ropTypes
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Allcontexttype: true
+ returnType: !returnT
+ Returntypefloat: !expr
+ expr: parent().par.Returntype == 'float'
+ Returntypevec4: !expr
+ expr: parent().par.Returntype == 'vec4'
+ function: !text
+ file: src/operators/combine/mixFields.glsl
+ name: function
+ paramGroupTable: eval_params
+ generatedMacroTables: multiInputHandler_macros
+multiInput: !multiInput
+ Minimuminputs: 1
+ Coordtypereductionmode: common
+ Coordtypereductionscope: '*'
+ Contexttypereductionmode: common
+ Contexttypereductionscope: '*'
+ Returntypereductionmode: besteach
+ Returntypereductionscope: '*'
+ Returntypepreference: vec4 float
+ inputs:
+ - !input
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Allcontexttype: true
+ returnType: !returnT
+ Returntypefloat: !expr
+ expr: parent().par.Returntype == 'float'
+ Returntypevec4: !expr
+ expr: parent().par.Returntype == 'vec4'
+ - !input
+ Variableinputs: inputOp1
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Allcontexttype: true
+ returnType: !returnT
+ Returntypefloat: !expr
+ expr: parent().par.Returntype == 'float'
+ Returntypevec4: !expr
+ expr: parent().par.Returntype == 'vec4'
+ - !input
+ Variableinputs: inputOp[1-2]
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Allcontexttype: true
+ returnType: !returnT
+ Returntypefloat: !expr
+ expr: parent().par.Returntype == 'float'
+ Returntypevec4: !expr
+ expr: parent().par.Returntype == 'vec4'
+ - !input
+ Variableinputs: inputOp[1-3]
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Allcontexttype: true
+ returnType: !returnT
+ Returntypefloat: !expr
+ expr: parent().par.Returntype == 'float'
+ Returntypevec4: !expr
+ expr: parent().par.Returntype == 'vec4'
+ - !input
+ Variableinputs: inputOp[1-4]
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Allcontexttype: true
+ returnType: !returnT
+ Returntypefloat: !expr
+ expr: parent().par.Returntype == 'float'
+ Returntypevec4: !expr
+ expr: parent().par.Returntype == 'vec4'
+ - !input
+ Variableinputs: inputOp[1-5]
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Allcontexttype: true
+ returnType: !returnT
+ Returntypefloat: !expr
+ expr: parent().par.Returntype == 'float'
+ Returntypevec4: !expr
+ expr: parent().par.Returntype == 'vec4'
+ - !input
+ Variableinputs: inputOp[1-6]
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Allcontexttype: true
+ returnType: !returnT
+ Returntypefloat: !expr
+ expr: parent().par.Returntype == 'float'
+ Returntypevec4: !expr
+ expr: parent().par.Returntype == 'vec4'
+ - !input
+ Variableinputs: inputOp[1-7]
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Allcontexttype: true
+ returnType: !returnT
+ Returntypefloat: !expr
+ expr: parent().par.Returntype == 'float'
+ Returntypevec4: !expr
+ expr: parent().par.Returntype == 'vec4'
+elements:
+- !opElement
+ name: aggregateCodeGenerator
+ elementType: aggregateCodeGenerator
+ params:
+ Startindex: 0
+ Exprindexoffset: 0
+ Reverseorder: false
+ Initmode: separate
+ Numberingmode: available
+ Startstmt: ''
+ Defaultstmt: ''
+ Firststepstmt: ''
+ Stepstmt: !expr
+ expr: op('stepTemplate').text
+ Bodycodeplaceholder: AGGREGATE_BODY();
+- !opElement
+ name: codeSwitcher_Combinemode
+ elementType: codeSwitcher
+ params:
+ Elementroot: ''
+ Table: combineModes
+ Param: Combinemode
+ Autoupdateparams: true
+ Manageparamstates: false
+ Alwaysincludeallparams: false
+ Switchmode: auto
+ Indexexpr: ''
+ Placeholder: COMBINE_BODY();
diff --git a/src/operators/combine/mixFields_combineModes.txt b/src/operators/combine/mixFields_combineModes.txt
new file mode 100644
index 000000000..893834f26
--- /dev/null
+++ b/src/operators/combine/mixFields_combineModes.txt
@@ -0,0 +1,3 @@
+name label code
+add Additive
+weighted Weighted Average res /= totalWeight;
diff --git a/src/operators/combine/mixFields_params.txt b/src/operators/combine/mixFields_params.txt
new file mode 100644
index 000000000..80e31c6c3
--- /dev/null
+++ b/src/operators/combine/mixFields_params.txt
@@ -0,0 +1,3 @@
+names source handling readOnlyHandling conversion enable
+Defaultvalue[xyzw] Defaultlevel param runtime macro 1
+Enable[1-8] Level[1-8] param runtime macro 1
diff --git a/src/operators/combine/mixFields_stepTemplate.glsl b/src/operators/combine/mixFields_stepTemplate.glsl
new file mode 100644
index 000000000..1a1261202
--- /dev/null
+++ b/src/operators/combine/mixFields_stepTemplate.glsl
@@ -0,0 +1,6 @@
+float level$ = float(THIS_Enable$) * THIS_Level$;
+if (level$ != 0.0) {
+ ReturnT v = inputOp$(p, ctx);
+ totalValue += v * level$;
+ totalWeight += level$;
+}
\ No newline at end of file
diff --git a/src/operators/combine/shapedCombine.glsl b/src/operators/combine/shapedCombine.glsl
index 9525da7eb..4b84c6436 100644
--- a/src/operators/combine/shapedCombine.glsl
+++ b/src/operators/combine/shapedCombine.glsl
@@ -1,5 +1,6 @@
ReturnT thismap(CoordT p, ContextT ctx) {
ReturnT res1 = inputOp1(p, ctx);
+ if (IS_FALSE(THIS_Enable)) { return res1; }
ReturnT res2 = inputOp2(p, ctx);
float r = THIS_Radius;
float a = adaptAsFloat(res1);
diff --git a/src/operators/combine/shapedCombine.tox b/src/operators/combine/shapedCombine.tox
index b2dfbcaaa..cc674e050 100644
Binary files a/src/operators/combine/shapedCombine.tox and b/src/operators/combine/shapedCombine.tox differ
diff --git a/src/operators/combine/shapedCombine.yaml b/src/operators/combine/shapedCombine.yaml
index 847285c2d..f07e756cc 100644
--- a/src/operators/combine/shapedCombine.yaml
+++ b/src/operators/combine/shapedCombine.yaml
@@ -1,11 +1,12 @@
!rop
meta: !meta
opType: raytk.operators.combine.shapedCombine
- opVersion: '11'
+ opVersion: '12'
opStatus: default
opDef: !def
enable: !expr
expr: op('..').par.Enable
+ useRuntimeBypass: true
typeSpec: !ropTypes
coordType: !coordT
Coordtypevec2: true
diff --git a/src/operators/combine/simpleDiff.md b/src/operators/combine/simpleDiff.md
index 4b554d2fa..159b462c7 100644
--- a/src/operators/combine/simpleDiff.md
+++ b/src/operators/combine/simpleDiff.md
@@ -6,7 +6,6 @@ Produces the area of the first shape minus any areas overlapped by the second (o
* `Enable`
* `Swaporder`: Swaps the two inputs, subtracting the first from the second.
-* `Inspect`
## Inputs
diff --git a/src/operators/combine/simpleDiff.tox b/src/operators/combine/simpleDiff.tox
index 4956faba0..d302a5701 100644
Binary files a/src/operators/combine/simpleDiff.tox and b/src/operators/combine/simpleDiff.tox differ
diff --git a/src/operators/combine/simpleDiff.yaml b/src/operators/combine/simpleDiff.yaml
index 249da5f25..2373e4b58 100644
--- a/src/operators/combine/simpleDiff.yaml
+++ b/src/operators/combine/simpleDiff.yaml
@@ -1,8 +1,8 @@
!rop
meta: !meta
opType: raytk.operators.combine.simpleDiff
- opVersion: '14'
- opStatus: default
+ opVersion: '15'
+ opStatus: deprecated
opDef: !def
enable: !expr
expr: op('..').par.Enable
diff --git a/src/operators/combine/simpleIntersect.md b/src/operators/combine/simpleIntersect.md
index 82a13046b..0b18c6457 100644
--- a/src/operators/combine/simpleIntersect.md
+++ b/src/operators/combine/simpleIntersect.md
@@ -5,11 +5,14 @@ Produces the areas where all input shapes overlap.
## Parameters
* `Enable`
-* `Inspect`
## Inputs
-* `definition_in_1`
-* `definition_in_2`
-* `definition_in_3`
-* `definition_in_4`
\ No newline at end of file
+* `definition_in_1`:
+* `definition_in_2`:
+* `definition_in_3`:
+* `definition_in_4`:
+* `definition_in_5`:
+* `definition_in_6`:
+* `definition_in_7`:
+* `definition_in_8`:
\ No newline at end of file
diff --git a/src/operators/combine/simpleIntersect.tox b/src/operators/combine/simpleIntersect.tox
index 6f680a1cc..cf6e21f5e 100644
Binary files a/src/operators/combine/simpleIntersect.tox and b/src/operators/combine/simpleIntersect.tox differ
diff --git a/src/operators/combine/simpleIntersect.yaml b/src/operators/combine/simpleIntersect.yaml
index 1af118a67..791d2cb4a 100644
--- a/src/operators/combine/simpleIntersect.yaml
+++ b/src/operators/combine/simpleIntersect.yaml
@@ -1,8 +1,8 @@
!rop
meta: !meta
opType: raytk.operators.combine.simpleIntersect
- opVersion: '16'
- opStatus: default
+ opVersion: '17'
+ opStatus: deprecated
paramPages:
- !page
name: Combine
diff --git a/src/operators/combine/simpleUnion.md b/src/operators/combine/simpleUnion.md
index 8ceafe3b0..60e834b44 100644
--- a/src/operators/combine/simpleUnion.md
+++ b/src/operators/combine/simpleUnion.md
@@ -11,4 +11,8 @@ The resulting shape is the combined areas of all of the inputs.
* `definition_in_1`:
* `definition_in_2`:
* `definition_in_3`:
-* `definition_in_4`:
\ No newline at end of file
+* `definition_in_4`:
+* `definition_in_5`:
+* `definition_in_6`:
+* `definition_in_7`:
+* `definition_in_8`:
\ No newline at end of file
diff --git a/src/operators/combine/simpleUnion.tox b/src/operators/combine/simpleUnion.tox
index 49da7345b..0ce4ca8ff 100644
Binary files a/src/operators/combine/simpleUnion.tox and b/src/operators/combine/simpleUnion.tox differ
diff --git a/src/operators/combine/simpleUnion.yaml b/src/operators/combine/simpleUnion.yaml
index 78858773e..45b4e59b9 100644
--- a/src/operators/combine/simpleUnion.yaml
+++ b/src/operators/combine/simpleUnion.yaml
@@ -1,8 +1,8 @@
!rop
meta: !meta
opType: raytk.operators.combine.simpleUnion
- opVersion: '21'
- opStatus: default
+ opVersion: '22'
+ opStatus: deprecated
opDef: !def
enable: !expr
expr: op('..').par.Enable
diff --git a/src/operators/combine/switch.glsl b/src/operators/combine/switch.glsl
index 0d795a410..1594315cc 100644
--- a/src/operators/combine/switch.glsl
+++ b/src/operators/combine/switch.glsl
@@ -18,6 +18,9 @@ ReturnT thismap(CoordT p, ContextT ctx) {
#if THIS_INPUT_COUNT == 0
initDefVal(res);
#else
+ if (IS_FALSE(THIS_Enable)) {
+ return inputOp1(p, ctx);
+ }
#ifdef THIS_HAS_INPUT_indexField
float source = inputOp_indexField(p, ctx);
#else
diff --git a/src/operators/combine/switch.md b/src/operators/combine/switch.md
index 6fc11da8c..5af92d5d4 100644
--- a/src/operators/combine/switch.md
+++ b/src/operators/combine/switch.md
@@ -1,4 +1,4 @@
-Switches between several inputs, without the need to rebuild the shader, allowing for fast switching.
+Switches or blends between several inputs, without the need to rebuild the shader, allowing for fast switching.
Note that inputs that are not connected are skipped over when assigning numbers to them, so if inputs 1, 2, and 4 are connected, they will use indices 0, 1, 2.
@@ -6,13 +6,13 @@ Note that inputs that are not connected are skipped over when assigning numbers
* `Enable`
* `Source`: When 0, the first source is used, 1 for the second, etc.
-* `Blend`
-* `Indexfield`
-* `Indexmode`
- * `zeroindex`
- * `oneindex`
- * `norm`
-* `Extend`
+* `Blend`: Whether to blend between inputs.
+* `Indexfield`: Field that can provide index values instead of using the parameter.
+* `Indexmode`: How to map index values to inputs.
+ * `zeroindex`: First is 0, second is 1, and so on.
+ * `oneindex`: First is 1, second is 2, and so on.
+ * `norm`: Scaled to a 0..1 range, so 0 is the first and 1 is the last.
+* `Extend`: How to handle indices that are outside the expected range based on the selected Index Mode.
* `clamp`
* `loop`
* `zigzag`
diff --git a/src/operators/combine/switch.tox b/src/operators/combine/switch.tox
index aeb60f48e..f9cca5e59 100644
Binary files a/src/operators/combine/switch.tox and b/src/operators/combine/switch.tox differ
diff --git a/src/operators/combine/switch.yaml b/src/operators/combine/switch.yaml
index 4b6902bb1..e0fd3ece2 100644
--- a/src/operators/combine/switch.yaml
+++ b/src/operators/combine/switch.yaml
@@ -1,11 +1,12 @@
!rop
meta: !meta
opType: raytk.operators.combine.switch
- opVersion: '20'
+ opVersion: '21'
opStatus: default
opDef: !def
enable: !expr
expr: op('..').par.Enable
+ useRuntimeBypass: true
typeSpec: !ropTypes
coordType: !coordT
Allcoordtype: true
diff --git a/src/operators/convert/vectorToFloat.md b/src/operators/convert/vectorToFloat.md
index 41cd095a1..3239a3189 100644
--- a/src/operators/convert/vectorToFloat.md
+++ b/src/operators/convert/vectorToFloat.md
@@ -1,4 +1,4 @@
-Converts a vector value field to a float field using one part of the vector.
+Converts a vector value field to a float field, e.g. using one part of the vector.
## Parameters
@@ -8,8 +8,25 @@ Converts a vector value field to a float field using one part of the vector.
* `y`
* `z`
* `w`
- * `lengthxyz`: Use the length of the XYZ part of the vector.
+ * `lengthxy`: Use the length of the XY parts of the vector.
+ * `lengthxyz`: Use the length of the XYZ parts of the vector.
* `lengthxyzw`: Use the length of all 4 parts of the vector.
+ * `minxy`: Minimum of the X and Y.
+ * `minxyz`: Minimum of the X, Y, and Z.
+ * `minxyzw`: Minimum of all 4 parts.
+ * `maxxy`: Maximum of the X and Y.
+ * `maxxyz`: Maximum of the X, Y, and Z.
+ * `maxxyzw`: Maximum of all 4 parts.
+ * `avgxy`: Average of X and Y.
+ * `avgxyz`: Average of X, Y, and Z.
+ * `avgxyzw`: Average of all 4 parts.
+ * `hue`: Treat the vector as an RGB color and get the hue.
+ * `sat`: Treat the vector as an RGB color and get the saturation.
+ * `val`: Treat the vector as an RGB color and get the value (as in HSV).
+ * `luma`: Treat the vector as an RGB color and get the luminance.
+ * `sumxy`: Add the X and Y parts.
+ * `sumxyz`: Add the X, Y, and Z parts.
+ * `sumxyzw`: Add all 4 parts.
## Inputs
diff --git a/src/operators/field/blackbodyColorField.md b/src/operators/field/blackbodyColorField.md
new file mode 100644
index 000000000..75d60cfc7
--- /dev/null
+++ b/src/operators/field/blackbodyColorField.md
@@ -0,0 +1,19 @@
+Field that produces colors using a model of blackbody radiation from physics.
+
+The operator uses a temperature value, either from a parameter of an input field, and determines the glow color that temperature would produce.
+
+Based on [Tunnel Beauty](https://www.shadertoy.com/view/Mt3GW2) by aiekick.
+
+Details on [wikipedia](https://en.wikipedia.org/wiki/Black_body).
+
+## Parameters
+
+* `Temp`: Constant value to use for the temperature, everywhere in space. This is only used if there is no input temperature field.
+* `Tempunit`: How to interpret temperature values.
+ * `norm`: Normalized to a 0..1 range.
+ * `deg`: Degrees kelvin.
+* `Exp`: Tighness of the transition curve from dark to light.
+
+## Inputs
+
+* `tempField`:
\ No newline at end of file
diff --git a/src/operators/field/blackbodyColorField.tox b/src/operators/field/blackbodyColorField.tox
index 8bb6e2384..869184b8f 100644
Binary files a/src/operators/field/blackbodyColorField.tox and b/src/operators/field/blackbodyColorField.tox differ
diff --git a/src/operators/field/blackbodyColorField.yaml b/src/operators/field/blackbodyColorField.yaml
index 68776cd72..6bc3426ed 100644
--- a/src/operators/field/blackbodyColorField.yaml
+++ b/src/operators/field/blackbodyColorField.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.field.blackbodyColorField
- opVersion: '3'
+ opVersion: '4'
opStatus: default
opDef: !def
enable: true
@@ -16,6 +16,9 @@ opDef: !def
file: src/operators/field/blackbodyColorField.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/field/blackbodyColorField.md
+ name: help
displayCategory: Color Field
inputs:
- !input
diff --git a/src/operators/field/cellTileField.md b/src/operators/field/cellTileField.md
index fef25293d..3d76018d1 100644
--- a/src/operators/field/cellTileField.md
+++ b/src/operators/field/cellTileField.md
@@ -1,6 +1,6 @@
A value field that provides an approximation of repeating cellular (voronoi) noise.
-Based on Biomine by Shane (https://www.shadertoy.com/view/4lyGzR).
+Based on [Biomine](https://www.shadertoy.com/view/4lyGzR) by Shane.
Uses a minimum blend at various 3D locations on a cubic tile. Make the tile wrappable by ensuring the objects wrap around the edges.
It isn't perfect but it is low cost.
diff --git a/src/operators/field/constantColorField.md b/src/operators/field/constantColorField.md
index 23c76e72a..ee8e61431 100644
--- a/src/operators/field/constantColorField.md
+++ b/src/operators/field/constantColorField.md
@@ -5,6 +5,7 @@ This is the same as `constantField`, but the parameter is specified as a color i
## Parameters
* `Coordtype`
+ * `auto`
* `float`
* `vec2`
* `vec3`
diff --git a/src/operators/field/constantField.md b/src/operators/field/constantField.md
index 078cf9816..62f56973e 100644
--- a/src/operators/field/constantField.md
+++ b/src/operators/field/constantField.md
@@ -3,6 +3,7 @@ A float or vector field that evaluates to a constant value.
## Parameters
* `Coordtype`
+ * `auto`
* `float`
* `vec2`
* `vec3`
diff --git a/src/operators/field/hashField.md b/src/operators/field/hashField.md
new file mode 100644
index 000000000..b775189ce
--- /dev/null
+++ b/src/operators/field/hashField.md
@@ -0,0 +1,86 @@
+Advanced field that produces randomized values.
+
+This should typically be used with an input that provides numbers that the randomization should be based on, but it can be used without an input in which case it uses spatial position as the basis.
+
+A typical use case for this operator would be something like randomizing a property within each cell of a `modulo2D`. The cell coordinates, accessed using a `variableReference`, would be passed into the `hashField`, which would produce random numbers that could be mapped to control the radius of a cylinder for example.
+
+The available hash functions have different types of inputs and outputs. Some take a single number input and produce a single number. Others take a single number and produce vectors. And still others take in a vector with multiple parts to produce single numbers, etc.
+
+Each hash function has a different range of values that it will produce. Their labels in the parameter menu contain information about how they behave.
+
+The label suffixes are in the format `( -> )`, where the first part is the type of coordinates or input value that it uses and the second is the type of value that it produces.
+
+Types labeled `X` mean it only uses/produces a single number, the X part of vectors.
+
+Types labeled `XYZ` mean it uses/produces 3 parts of vectors.
+
+Types marked with `[U]` mean unsigned integers, which treat all negative numbers as zero, and produce whole numbers ranging from 0 to 4294967295.
+
+Types without `[U]` mean floats, which can be any number. For outputs, that typically means a 0..1 or -1..1 range.
+
+Based on [Hash Functions for GPU Rendering](https://www.shadertoy.com/view/XlGcRh) by markjarzynski.
+
+More details avaiable [here](http://jcgt.org/published/0009/03/02/).
+
+## Parameters
+
+* `Function`
+ * `bbs`
+ * `city11`
+ * `city12`
+ * `city13`
+ * `city14`
+ * `esgtsa`
+ * `fast`
+ * `hashwithoutsine11`
+ * `hashwithoutsine12`
+ * `hashwithoutsine13`
+ * `hashwithoutsine21`
+ * `hashwithoutsine22`
+ * `hashwithoutsine23`
+ * `hashwithoutsine31`
+ * `hashwithoutsine32`
+ * `hashwithoutsine33`
+ * `hashwithoutsine41`
+ * `hashwithoutsine42`
+ * `hashwithoutsine43`
+ * `hashwithoutsine44`
+ * `hybridtaus`
+ * `ign`
+ * `iqint1`
+ * `iqint2`
+ * `iqint3`
+ * `jkiss32`
+ * `lcg`
+ * `md5`
+ * `murmur311`
+ * `murmur312`
+ * `murmur313`
+ * `murmur314`
+ * `pcg`
+ * `pcg2d`
+ * `pcg3d`
+ * `pcg3d16`
+ * `pcg4d`
+ * `pseudo`
+ * `ranlim32`
+ * `superfast11`
+ * `superfast21`
+ * `superfast31`
+ * `superfast41`
+ * `trig21`
+ * `wang11`
+ * `xorshift128`
+ * `xorshift32`
+ * `xxhash321`
+ * `xxhash322`
+* `Coordtype`
+ * `auto`
+ * `float`
+ * `vec2`
+ * `vec3`
+ * `vec4`
+
+## Inputs
+
+* `coordField`:
\ No newline at end of file
diff --git a/src/operators/field/hashField.tox b/src/operators/field/hashField.tox
index 1489e89d6..01c2dfa4e 100644
Binary files a/src/operators/field/hashField.tox and b/src/operators/field/hashField.tox differ
diff --git a/src/operators/field/hashField.yaml b/src/operators/field/hashField.yaml
index 09147764e..52ea5cb69 100644
--- a/src/operators/field/hashField.yaml
+++ b/src/operators/field/hashField.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.field.hashField
- opVersion: '6'
+ opVersion: '7'
opStatus: beta
opDef: !def
enable: true
@@ -34,6 +34,9 @@ opDef: !def
name: macro_exprs
evaluate: true
evalOpts: !evalOpts {}
+ help: !text
+ file: src/operators/field/hashField.md
+ name: help
displayCategory: Noise Field
inputs:
- !input
diff --git a/src/operators/field/rampField.md b/src/operators/field/rampField.md
new file mode 100644
index 000000000..e1fa0c90c
--- /dev/null
+++ b/src/operators/field/rampField.md
@@ -0,0 +1,38 @@
+Field that produces values that fade from one value to another along an axis or line.
+
+## Parameters
+
+* `Enable`
+* `Coordmode`: Whether to specify the ends of the ramp using an axis or arbitrary points.
+ * `axis`
+ * `points`
+* `Axis`: Which axis of the position (or coord input) the ramp should use.
+ * `x`
+ * `y`
+ * `z`
+ * `dist`
+* `Range`: The start and end of the ramp along the chosen axis.
+* `Point1`: The start point when using arbitrary points.
+* `Point2`: The ened point when using arbitrary points.
+* `Extendmode`: How to handle points outside the specified range.
+ * `hold`
+ * `zero`
+ * `repeat`
+ * `mirror`
+* `Returntype`: What type of values to produce (single number floats or vectors).
+ * `float`
+ * `vec4`
+* `Value1`: The value at the start of the ramp. If in float mode only the first part is used.
+* `Value2`: The value at the end of the ramp. If in float mode only the first part is used.
+* `Coordtype`
+ * `auto`
+ * `float`
+ * `vec2`
+ * `vec3`
+
+## Inputs
+
+* `coordField`:
+* `point1Field`:
+* `point2Field`:
+* `easingFunc`:
\ No newline at end of file
diff --git a/src/operators/field/rampField.tox b/src/operators/field/rampField.tox
index b10fc5f9c..0c7aae4f1 100644
Binary files a/src/operators/field/rampField.tox and b/src/operators/field/rampField.tox differ
diff --git a/src/operators/field/rampField.yaml b/src/operators/field/rampField.yaml
index 810364bee..8cb778853 100644
--- a/src/operators/field/rampField.yaml
+++ b/src/operators/field/rampField.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.field.rampField
- opVersion: '5'
+ opVersion: '6'
opStatus: beta
opDef: !def
enable: !expr
@@ -31,6 +31,9 @@ opDef: !def
paramGroupTable: eval_params
libraryNames: !expr
expr: op('modZigZag')
+ help: !text
+ file: src/operators/field/rampField.md
+ name: help
displayCategory: Spatial Field
inputs:
- !input
diff --git a/src/operators/field/spectralColorField.md b/src/operators/field/spectralColorField.md
new file mode 100644
index 000000000..616b908e2
--- /dev/null
+++ b/src/operators/field/spectralColorField.md
@@ -0,0 +1,23 @@
+Produces colors using rainbow spectrum patterns.
+
+There are several spectrum types to choose from which balance the colors in different ways.
+
+The field will produce a color based on either the Wavelength parameter, or values from the wavelength input field.
+
+## Parameters
+
+* `Wavelength`: Constant value to use as the wavelength to map to a color. This is only used when there is no wavelength input field.
+* `Wavelengthunit`: How wavelength values should be interpreted.
+ * `norm`: Normalized to a 0..1 range.
+ * `nm`: Nanometers.
+* `Spectrumtype`
+ * `zucconi`
+ * `zucconi6`
+ * `jet`
+ * `gems`
+ * `bruton`
+ * `spektre`
+
+## Inputs
+
+* `wavelengthField`: Field that provides the wavelengths that the colors are based on.
\ No newline at end of file
diff --git a/src/operators/field/spectralColorField.tox b/src/operators/field/spectralColorField.tox
index 851d946bf..d59b5abeb 100644
Binary files a/src/operators/field/spectralColorField.tox and b/src/operators/field/spectralColorField.tox differ
diff --git a/src/operators/field/spectralColorField.yaml b/src/operators/field/spectralColorField.yaml
index 258818700..ef47cb5f1 100644
--- a/src/operators/field/spectralColorField.yaml
+++ b/src/operators/field/spectralColorField.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.field.spectralColorField
- opVersion: '3'
+ opVersion: '4'
opStatus: default
opDef: !def
enable: true
@@ -18,6 +18,9 @@ opDef: !def
paramGroupTable: eval_params
libraryNames: !expr
expr: op('spectralColorField_lib')
+ help: !text
+ file: src/operators/field/spectralColorField.md
+ name: help
displayCategory: Color Field
inputs:
- !input
diff --git a/src/operators/field/terrainNoiseField.md b/src/operators/field/terrainNoiseField.md
new file mode 100644
index 000000000..2dc87e783
--- /dev/null
+++ b/src/operators/field/terrainNoiseField.md
@@ -0,0 +1,38 @@
+Noise that uses fBm (fractal brownian motion), which can work well for surface offsetting for terrain.
+
+Based on [Musgrave's Noises Collection](https://www.shadertoy.com/view/4sXXW2) by xbe.
+
+See also http://www.classes.cs.uchicago.edu/archive/2014/winter/23700-1/project_4_and_5/MusgraveTerrain00.pdf.
+
+## Parameters
+
+* `Noisetype`
+ * `fBm`
+ * `multifractal`
+ * `heteroTerrain`
+ * `hybridMultiFractal`
+ * `ridgedMultiFractal`
+* `Axis`: When the `Noisetype` uses 2D coordinates but `Coordtype` is 3D, this is used to choose which plane of the coordinates are used.
+ * `x`
+ * `y`
+ * `z`
+* `Translate`
+* `Scale`
+* `Increment`
+* `Lacunarity`: Gap between successive frequencies.
+* `Frequency`: Density of the pattern (basically another Scale).
+* `Octaves`: Number of layers of detail (frequencies used in the fBm). Larger values produce more detail. Avoid values below 1.
+* `Stepoffset`
+* `Gain`
+* `Amplitude`: Multiplies the amount produced by the noise.
+* `Offset`: Offsets (adds to) the amount produced by the noise.
+
+## Inputs
+
+* `coordField`:
+* `incrementField`:
+* `lacunarityField`:
+* `frequencyField`:
+* `octavesField`:
+* `stepOffsetField`:
+* `gainField`:
\ No newline at end of file
diff --git a/src/operators/field/terrainNoiseField.tox b/src/operators/field/terrainNoiseField.tox
index d94a064d7..14d584143 100644
Binary files a/src/operators/field/terrainNoiseField.tox and b/src/operators/field/terrainNoiseField.tox differ
diff --git a/src/operators/field/terrainNoiseField.yaml b/src/operators/field/terrainNoiseField.yaml
index 377828ea2..72a9b8847 100644
--- a/src/operators/field/terrainNoiseField.yaml
+++ b/src/operators/field/terrainNoiseField.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.field.terrainNoiseField
- opVersion: '3'
+ opVersion: '4'
opStatus: beta
opDef: !def
enable: true
@@ -23,6 +23,9 @@ opDef: !def
name: macro_exprs
evaluate: true
evalOpts: !evalOpts {}
+ help: !text
+ file: src/operators/field/terrainNoiseField.md
+ name: help
keywords:
- fbm
- landscape
diff --git a/src/operators/filter/adjustColor.glsl b/src/operators/filter/adjustColor.glsl
index d4477ad55..c35c67ebc 100644
--- a/src/operators/filter/adjustColor.glsl
+++ b/src/operators/filter/adjustColor.glsl
@@ -4,6 +4,10 @@ ReturnT thismap(CoordT p, ContextT ctx) {
Sdf surface = inputOp1(p, ctx);
if (!hasColor(surface)) { return surface; }
col = vec4(getColor(surface), 1.);
+ #elif defined(THIS_RETURN_TYPE_Light)
+ Light light = inputOp1(p, ctx);
+ if (light.absent) { return light; }
+ col = vec4(light.color, 1);
#else
col = inputOp1(p, ctx);
#endif
@@ -34,11 +38,15 @@ ReturnT thismap(CoordT p, ContextT ctx) {
col.rgb = ((col.rgb - 0.5) * cn) + 0.5;
col.rgb = pow(col.rgb, vec3(1.0 / THIS_Gamma));
}
+ ReturnT res;
#ifdef THIS_RETURN_TYPE_Sdf
assignColor(surface, col.rgb);
- ReturnT res = surface;
+ res = surface;
+ #elif defined(THIS_RETURN_TYPE_Light)
+ light.color = col.rgb;
+ res = light;
#else
- ReturnT res = col;
+ res = col;
#endif
return res;
}
\ No newline at end of file
diff --git a/src/operators/filter/adjustColor.md b/src/operators/filter/adjustColor.md
index 635bd0d7f..34b94c3b8 100644
--- a/src/operators/filter/adjustColor.md
+++ b/src/operators/filter/adjustColor.md
@@ -13,4 +13,8 @@ This is similar to Level TOP and HSV Adjust TOP.
## Inputs
-* `definition_in`:
\ No newline at end of file
+* `definition_in`:
+* `brightnessField`:
+* `contrastField`:
+* `hueField`:
+* `saturationField`:
\ No newline at end of file
diff --git a/src/operators/filter/adjustColor.tox b/src/operators/filter/adjustColor.tox
index 4a94f2691..aea0a1b54 100644
Binary files a/src/operators/filter/adjustColor.tox and b/src/operators/filter/adjustColor.tox differ
diff --git a/src/operators/filter/adjustColor.yaml b/src/operators/filter/adjustColor.yaml
index d2cc2576c..ca72e3aec 100644
--- a/src/operators/filter/adjustColor.yaml
+++ b/src/operators/filter/adjustColor.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.adjustColor
- opVersion: '16'
+ opVersion: '17'
opStatus: default
opDef: !def
enable: !expr
@@ -43,6 +43,7 @@ inputs:
returnType: !returnT
Returntypesdf: true
Returntypevec4: true
+ Returntypelight: true
- !input
Localalias: brightnessField
Variableinputs: inputOp1
diff --git a/src/operators/filter/assignUV.glsl b/src/operators/filter/assignUV.glsl
index 34595fd87..38d3813f7 100644
--- a/src/operators/filter/assignUV.glsl
+++ b/src/operators/filter/assignUV.glsl
@@ -7,7 +7,9 @@ ReturnT thismap(CoordT p, ContextT ctx) {
THIS_sdf = res;
#endif
vec3 uv;
- #ifdef THIS_HAS_INPUT_uvField
+ #ifdef inputOp_uvField_RETURN_TYPE_Sdf
+ uv = inputOp_uvField(p, ctx).uv.xyz;
+ #elif defined(inputOp_uvField_RETURN_TYPE_vec4)
uv = inputOp_uvField(p, ctx).xyz;
#else
vec3 q = adaptAsVec3(p) - THIS_Center;
diff --git a/src/operators/filter/assignUV.tox b/src/operators/filter/assignUV.tox
index 1765b4591..39f4020c2 100644
Binary files a/src/operators/filter/assignUV.tox and b/src/operators/filter/assignUV.tox differ
diff --git a/src/operators/filter/assignUV.yaml b/src/operators/filter/assignUV.yaml
index b1ecbb95f..ed0a2d1f6 100644
--- a/src/operators/filter/assignUV.yaml
+++ b/src/operators/filter/assignUV.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.assignUV
- opVersion: '17'
+ opVersion: '18'
opStatus: default
opDef: !def
enable: !expr
@@ -51,6 +51,7 @@ inputs:
contextType: !contextT
Allcontexttype: true
returnType: !returnT
+ Returntypesdf: true
Returntypevec4: true
elements:
- !opElement
diff --git a/src/operators/filter/cameraTransform.glsl b/src/operators/filter/cameraTransform.glsl
index 77dde60f2..705613d43 100644
--- a/src/operators/filter/cameraTransform.glsl
+++ b/src/operators/filter/cameraTransform.glsl
@@ -1,18 +1,27 @@
ReturnT thismap(CoordT p, ContextT ctx) {
+ // initial ray used for position for fields
ReturnT ray = inputOp_camera(p, ctx);
-
- vec3 t = THIS_Translate;
- ray.pos += t;
- #ifdef THIS_HAS_INPUT_translateField
- t = inputOp_translateField(ray.pos, ctx).xyz;
- ray.pos += t;
- #endif
-
- vec3 dirRot = THIS_Dirrotate;
- #ifdef THIS_HAS_INPUT_dirRotateField
- dirRot += radians(inputOp_dirRotateField(ray.pos, ctx).xyz);
- #endif
- pRotateOnXYZ(ray.dir, dirRot);
+ if (IS_TRUE(THIS_Enable)) {
+ vec3 initialPos = ray.pos;
+ vec3 posOffset = THIS_Translate;
+ #ifdef THIS_HAS_INPUT_translateField
+ posOffset += inputOp_translateField(initialPos + posOffset, ctx).xyz;
+ #endif
+ ctx.posOffset = posOffset;
+ vec3 lookAtOffset = THIS_Lookattranslate;
+ #ifdef THIS_HAS_INPUT_lookAtTranslateField
+ lookAtOffset += adaptAsVec3(inputOp_lookAtTranslateField(initialPos + posOffset, ctx));
+ #endif
+ ctx.lookAtOffset += lookAtOffset;
+ LOOK_AT_BODY();
+ vec3 dirRot = THIS_Dirrotate;
+ #ifdef THIS_HAS_INPUT_dirRotateField
+ dirRot += radians(inputOp_dirRotateField(initialPos + posOffset, ctx).xyz);
+ #endif
+ ctx.rotation = dirRot;
+ // recalculate the ray with lookat and rotation
+ ray = inputOp_camera(p, ctx);
+ }
return ray;
}
\ No newline at end of file
diff --git a/src/operators/filter/cameraTransform.md b/src/operators/filter/cameraTransform.md
new file mode 100644
index 000000000..a4738d976
--- /dev/null
+++ b/src/operators/filter/cameraTransform.md
@@ -0,0 +1,19 @@
+Specialized transform that can be applied to cameras.
+
+Similar to `lightTransform`, this operator is designed to work specifically with cameras, including changes to direction and look at position.
+
+## Parameters
+
+* `Enable`
+* `Translate`: Offset applied to the camera's origin position.
+* `Dirrotate`: Rotation applied to the direction that the camera is facing. Note that this does not impact the position of the camera.
+* `Lookatmode`: Whether the look at position (if used) should be adjusted with the position or remain stationary.
+ * `includepos`: The look at position should be moved by the same amount that the main position is moved.
+ * `separate`: The look at position should remain in place regardless of how the main position moves.
+* `Lookattranslate`: Translation offset applied to only the look at position.
+
+## Inputs
+
+* `camera`:
+* `translateField`:
+* `dirRotateField`:
\ No newline at end of file
diff --git a/src/operators/filter/cameraTransform.tox b/src/operators/filter/cameraTransform.tox
index 8ef6e9e4e..ab74c8d38 100644
Binary files a/src/operators/filter/cameraTransform.tox and b/src/operators/filter/cameraTransform.tox differ
diff --git a/src/operators/filter/cameraTransform.yaml b/src/operators/filter/cameraTransform.yaml
index a61dac189..1519a7692 100644
--- a/src/operators/filter/cameraTransform.yaml
+++ b/src/operators/filter/cameraTransform.yaml
@@ -1,11 +1,12 @@
!rop
meta: !meta
opType: raytk.operators.filter.cameraTransform
- opVersion: '1'
+ opVersion: '4'
opStatus: beta
opDef: !def
enable: !expr
expr: op('..').par.Enable
+ useRuntimeBypass: true
typeSpec: !ropTypes
coordType: !coordT
Coordtypevec2: true
@@ -17,6 +18,9 @@ opDef: !def
file: src/operators/filter/cameraTransform.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/filter/cameraTransform.md
+ name: help
displayCategory: Camera
inputs:
- !input
@@ -48,3 +52,17 @@ inputs:
Contexttypecameracontext: true
returnType: !returnT
Returntypevec4: true
+elements:
+- !opElement
+ name: codeSwitcher_Conversion
+ elementType: codeSwitcher
+ params:
+ Elementroot: ''
+ Table: lookAtModes
+ Param: Lookatmode
+ Autoupdateparams: true
+ Manageparamstates: false
+ Alwaysincludeallparams: false
+ Switchmode: autoconst
+ Indexexpr: ''
+ Placeholder: LOOK_AT_BODY();
diff --git a/src/operators/filter/cameraTransform_params.txt b/src/operators/filter/cameraTransform_params.txt
index ecac6616c..37b24362c 100644
--- a/src/operators/filter/cameraTransform_params.txt
+++ b/src/operators/filter/cameraTransform_params.txt
@@ -1,3 +1,3 @@
names source handling readOnlyHandling conversion enable
-Translate[xyz] param runtime macro 1
+Translate[xyz] Lookattranslate[xyz] param runtime macro 1
Dirrotate[xyz] param runtime macro angle 1
diff --git a/src/operators/filter/circularRepeat.md b/src/operators/filter/circularRepeat.md
index af7275354..f17e4c2e6 100644
--- a/src/operators/filter/circularRepeat.md
+++ b/src/operators/filter/circularRepeat.md
@@ -1,4 +1,4 @@
-Repeat an SDF to fill a 2D circular area.
+Repeat an space to fill a 2D circular area.
## Parameters
diff --git a/src/operators/filter/elongate.md b/src/operators/filter/elongate.md
index c8fe8b05b..b18e19707 100644
--- a/src/operators/filter/elongate.md
+++ b/src/operators/filter/elongate.md
@@ -8,9 +8,19 @@ See [example](https://www.shadertoy.com/view/Ml3fWj).
## Parameters
* `Enable`
-* `Center` - The center point of the stretching.
-* `Size` - The distance that that parts are pushed apart from the origin.
+* `Center`: The center point of the stretching.
+* `Size`: The distance that that parts are pushed apart from the origin.
+* `Axes`: Which axes should be stretched.
+ * `xyz`
+ * `xy`
+ * `yz`
+ * `xz`
+ * `x`
+ * `y`
+ * `z`
## Inputs
-* `definition_in`:
\ No newline at end of file
+* `definition_in`:
+* `sizeField`:
+* `centerField`:
\ No newline at end of file
diff --git a/src/operators/filter/extend.md b/src/operators/filter/extend.md
index eda7ef4b5..a0ff7135c 100644
--- a/src/operators/filter/extend.md
+++ b/src/operators/filter/extend.md
@@ -1,11 +1,21 @@
-Clamps coordinates around an SDF result, which causes their edges to be extended infinitely along each axis.
+Clamps coordinates around an area, which causes its edges to be extended infinitely along each axis.
## Parameters
* `Enable`
* `Center`: The center position around which the coordinates are clamped.
* `Size`: The size of the region outside which the coordinates are clamped. Within this area, the SDF will behave as it normally does.
+* `Axes`: Which axes should be extended.
+ * `x`
+ * `y`
+ * `z`
+ * `xy`
+ * `yz`
+ * `xz`
+ * `xyz`
## Inputs
-* `definition_in`:
\ No newline at end of file
+* `definition_in`:
+* `sizeField`:
+* `centerField`:
\ No newline at end of file
diff --git a/src/operators/filter/fieldExpr.md b/src/operators/filter/fieldExpr.md
new file mode 100644
index 000000000..309dd3e38
--- /dev/null
+++ b/src/operators/filter/fieldExpr.md
@@ -0,0 +1,68 @@
+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 like `inputOp1(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.
+* Other inputs are available as `inputOp2(...)` etc
+* The two slider parameters are available as `THIS_Param1` and `THIS_Param2`
+* The two vector parameters are available as `THIS_Vecparam1` and `THIS_Vecparam2`
+ * To get at an individual part of one of the vector params, you can use `THIS_Vecparam1.y`
+
+## Parameters
+
+* `Enable`
+* `Expression`
+ * `sqrt`
+ * `abs`
+ * `sign`
+ * `cos`
+ * `sin`
+ * `tan`
+ * `acos`
+ * `asin`
+ * `atan`
+ * `atan2`
+ * `cosh`
+ * `sinh`
+ * `tanh`
+ * `log2`
+ * `ln`
+ * `exp`
+ * `exp2`
+ * `powb`
+ * `powxy`
+* `Param1`
+* `Param2`
+* `Vecparam1`
+* `Vecparam2`
+* `Coordtype`
+ * `useinput`
+ * `float`
+ * `vec2`
+ * `vec3`
+* `Returntype`
+ * `useinput`
+ * `Sdf`
+ * `vec4`
+ * `float`
+ * `Ray`
+ * `Light`
+* `Contexttype`
+ * `useinput`
+ * `auto`
+ * `Context`
+ * `MaterialContext`
+ * `CameraContext`
+ * `LightContext`
+ * `RayContext`
+
+## Inputs
+
+* `definition_in_1`:
+* `definition_in_2`:
+* `definition_in_3`:
+* `definition_in_4`:
\ No newline at end of file
diff --git a/src/operators/filter/fieldExpr.tox b/src/operators/filter/fieldExpr.tox
index a6b515a18..3fda9c17b 100644
Binary files a/src/operators/filter/fieldExpr.tox and b/src/operators/filter/fieldExpr.tox differ
diff --git a/src/operators/filter/fieldExpr.yaml b/src/operators/filter/fieldExpr.yaml
index 57a5070c0..42504356b 100644
--- a/src/operators/filter/fieldExpr.yaml
+++ b/src/operators/filter/fieldExpr.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.fieldExpr
- opVersion: '13'
+ opVersion: '14'
opStatus: beta
opDef: !def
enable: !expr
@@ -53,6 +53,9 @@ opDef: !def
name: macro_exprs
evaluate: true
evalOpts: !evalOpts {}
+ help: !text
+ file: src/operators/filter/fieldExpr.md
+ name: help
displayCategory: Field Modifier
inputs:
- !input
diff --git a/src/operators/filter/fieldFunction.md b/src/operators/filter/fieldFunction.md
new file mode 100644
index 000000000..1f71912dc
--- /dev/null
+++ b/src/operators/filter/fieldFunction.md
@@ -0,0 +1,41 @@
+Modifies the values of a field using various types of math functions, similar to a `Function CHOP`.
+
+## Parameters
+
+* `Enable`
+* `Function`
+ * `abs`
+ * `ceil`
+ * `floor`
+ * `sign`
+ * `exp`
+ * `exp2`
+ * `fract`
+ * `mod`
+ * `inversesqrt`
+ * `pow`
+ * `round`
+ * `roundEven`
+ * `sqrt`
+ * `trunc`
+ * `cos`
+ * `sin`
+ * `tan`
+ * `acos`
+ * `asin`
+ * `atan`
+ * `atan2`
+ * `cosh`
+ * `sinh`
+ * `tanh`
+ * `log2`
+ * `log`
+ * `degrees`
+ * `radians`
+* `Value1`
+* `Value2`
+
+## Inputs
+
+* `definition_in_1`:
+* `definition_in_2`:
\ No newline at end of file
diff --git a/src/operators/filter/fieldFunction.tox b/src/operators/filter/fieldFunction.tox
index 8d6299e57..2dbbf6445 100644
Binary files a/src/operators/filter/fieldFunction.tox and b/src/operators/filter/fieldFunction.tox differ
diff --git a/src/operators/filter/fieldFunction.yaml b/src/operators/filter/fieldFunction.yaml
index e423dc4f9..8c7d9754e 100644
--- a/src/operators/filter/fieldFunction.yaml
+++ b/src/operators/filter/fieldFunction.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.fieldFunction
- opVersion: '9'
+ opVersion: '10'
opStatus: beta
opDef: !def
enable: !expr
@@ -22,6 +22,9 @@ opDef: !def
file: src/operators/filter/fieldFunction.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/filter/fieldFunction.md
+ name: help
displayCategory: Field Modifier
multiInput: !multiInput
Minimuminputs: 0
diff --git a/src/operators/filter/flip.md b/src/operators/filter/flip.md
index 9f67050a5..ce07fd97e 100644
--- a/src/operators/filter/flip.md
+++ b/src/operators/filter/flip.md
@@ -11,14 +11,40 @@ Flips the input across an axis, either on its own or merged with the original.
* `Shift`: Moves the input towards / away from the reflection plane.
* `Mergetype`: Whether to just flip the input or flip it and merge that with the original.
* `none`
- * `union`
+ * `simpleUnion`
+ * `simpleIntersect`
+ * `simpleDiff`
* `smoothUnion`
+ * `smoothIntersect`
+ * `smoothDiff`
+ * `roundUnion`
+ * `roundIntersect`
+ * `roundDiff`
+ * `chamferUnion`
+ * `chamferIntersect`
+ * `chamferDiff`
+ * `stairUnion`
+ * `stairIntersect`
+ * `stairDiff`
+ * `columnUnion`
+ * `columnIntersect`
+ * `columnDiff`
+ * `simpleXOR`
* `Mergeradius`
* `Iterationtype`: What kind of iteration values should be provided for upstream ops.
* `none`
* `index`: The original is assigned 0, flipped 1.
* `sign`: Original is assigned 1, flipped -1.
+* `Mergenumber`
+* `Mergeoffset`
## Inputs
-* `definition_in`:
\ No newline at end of file
+* `definition_in`:
+* `offsetField`:
+* `shiftField`:
+
+## Variables
+
+* `sign`:
+* `index`:
\ No newline at end of file
diff --git a/src/operators/filter/gridClone.md b/src/operators/filter/gridClone.md
new file mode 100644
index 000000000..0858a89ee
--- /dev/null
+++ b/src/operators/filter/gridClone.md
@@ -0,0 +1,45 @@
+Repeats an SDF in a grid arrangement, combining the results.
+
+It's important to remember that this operator performs the work of its input once *for each clone*. That means that a 3x3 grid does 27 times the work of the input.
+
+The `modulo3D` (or `modulo1D`/`modulo2D`) can be a cheaper alternative to `gridClone` with some limitations.
+
+## Parameters
+
+* `Enable`
+* `Count`: The number of copies. The performance cost of the input is multiplied by this number.
+* `Center`: Center position of the grid.
+* `Size`: Size of the grid on each axis.
+* `Mergetype`: How to merge the copies.
+ * `simpleUnion`
+ * `simpleIntersect`
+ * `simpleDiff`
+ * `smoothUnion`
+ * `smoothIntersect`
+ * `smoothDiff`
+ * `roundUnion`
+ * `roundIntersect`
+ * `roundDiff`
+ * `chamferUnion`
+ * `chamferIntersect`
+ * `chamferDiff`
+ * `stairUnion`
+ * `stairIntersect`
+ * `stairDiff`
+ * `columnUnion`
+ * `columnIntersect`
+ * `columnDiff`
+ * `simpleXOR`
+* `Mergeradius`: The amount of smoothing to apply when merging copies.
+* `Mergenumber`
+* `Mergeoffset`
+
+## Inputs
+
+* `definition_in`:
+* `blendRadiusField`:
+
+## Variables
+
+* `coord`: grid cell coordinates for each axis, going from 0..N.
+* `normcoord`: grid cell coordinates scaled to 0..1 range.
\ No newline at end of file
diff --git a/src/operators/filter/gridClone.tox b/src/operators/filter/gridClone.tox
index 080b34c91..6b50df6c0 100644
Binary files a/src/operators/filter/gridClone.tox and b/src/operators/filter/gridClone.tox differ
diff --git a/src/operators/filter/gridClone.yaml b/src/operators/filter/gridClone.yaml
index 36d05cddd..68b29c8b5 100644
--- a/src/operators/filter/gridClone.yaml
+++ b/src/operators/filter/gridClone.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.gridClone
- opVersion: '3'
+ opVersion: '4'
opStatus: default
opDef: !def
enable: !expr
@@ -27,6 +27,9 @@ opDef: !def
evalOpts: !evalOpts
excludeFirstRow: true
cols: enable
+ help: !text
+ file: src/operators/filter/gridClone.md
+ name: help
displayCategory: Repeat
inputs:
- !input
diff --git a/src/operators/filter/index.tox b/src/operators/filter/index.tox
index 004c3eda8..5ab0af6ba 100644
Binary files a/src/operators/filter/index.tox and b/src/operators/filter/index.tox differ
diff --git a/src/operators/filter/instance.md b/src/operators/filter/instance.md
index 19dedd971..7aafdb1da 100644
--- a/src/operators/filter/instance.md
+++ b/src/operators/filter/instance.md
@@ -32,6 +32,7 @@ iteration, which can cause a significant drain on resources if the input network
* `columnUnion`
* `columnIntersect`
* `columnDiff`
+ * `simpleXOR`
* `Radius`
* `Mergenumber`
* `Mergeoffset`
@@ -41,6 +42,7 @@ iteration, which can cause a significant drain on resources if the input network
* `Enablerotate`
* `Enableactivechop`
* `Activechop`: A CHOP containing a channel named `active`, which is used to selectively turn instances off. Any instance with an active value of 0 or less will be excluded from the combined result.
+* `Enablescale`
## Inputs
diff --git a/src/operators/filter/instanceField.md b/src/operators/filter/instanceField.md
new file mode 100644
index 000000000..5ad7ac051
--- /dev/null
+++ b/src/operators/filter/instanceField.md
@@ -0,0 +1,26 @@
+Repeats an input field multiple times and combines the results.
+
+Note that this multiplies the work of the input once per instance.
+
+## Parameters
+
+* `Enable`
+* `Instancecount`: The number of copies to produce and merge.
+* `Operation`: How the field values should be combined.
+ * `add`
+ * `sub`
+ * `mul`
+ * `div`
+ * `avg`
+ * `min`
+ * `max`
+* `Swaporder`: Swaps the two inputs. This is only relevant for some of the `Operation` values like subtraction.
+
+## Inputs
+
+* `definition_in`:
+
+## Variables
+
+* `index`:
+* `normindex`:
\ No newline at end of file
diff --git a/src/operators/filter/instanceField.tox b/src/operators/filter/instanceField.tox
index 494e558f5..61e6d737c 100644
Binary files a/src/operators/filter/instanceField.tox and b/src/operators/filter/instanceField.tox differ
diff --git a/src/operators/filter/instanceField.yaml b/src/operators/filter/instanceField.yaml
index fbdf81304..d9d5c8dca 100644
--- a/src/operators/filter/instanceField.yaml
+++ b/src/operators/filter/instanceField.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.instanceField
- opVersion: '2'
+ opVersion: '3'
opStatus: default
opDef: !def
enable: !expr
@@ -26,6 +26,9 @@ opDef: !def
evalOpts: !evalOpts
excludeFirstRow: true
cols: enable
+ help: !text
+ file: src/operators/filter/instanceField.md
+ name: help
displayCategory: Repeat
inputs:
- !input
diff --git a/src/operators/filter/kink.md b/src/operators/filter/kink.md
new file mode 100644
index 000000000..877119053
--- /dev/null
+++ b/src/operators/filter/kink.md
@@ -0,0 +1,29 @@
+Bends space, similar to the `bend`.
+
+The bending that this operator applies is slightly different than the `bend` operator, and is asymmetrical, causing a tighter bend on one side based on the bend amount and direction.
+
+Based on [Bending an SDF](https://www.shadertoy.com/view/3llfRl) by blackle.
+
+## Parameters
+
+* `Enable`
+* `Direction`: Which axis to bend around on which plane.
+ * `xy`: Bends along the X axis, in the Y direction
+ * `xz`: Bends along the X axis, in the Z direction
+ * `yx`: Bends along the Y axis, in the X direction
+ * `yz`: Bends along the Y axis, in the Z direction
+ * `zx`: Bends along the Z axis, in the X direction
+ * `zy`: Bends along the Z axis, in the Y direction
+* `Side`: Which side to bend towards.
+ * `neg`
+ * `pos`
+* `Amount`: Amount of bending.
+* `Offset`: Position along the
+* `Spread`: Range over which the bending is spread. Higher values mean a more gradual bend.
+
+## Inputs
+
+* `definition_in`:
+* `amountField`:
+* `offsetField`:
+* `spreadField`:
\ No newline at end of file
diff --git a/src/operators/filter/kink.tox b/src/operators/filter/kink.tox
index 9f5ea80a7..61ab6af5b 100644
Binary files a/src/operators/filter/kink.tox and b/src/operators/filter/kink.tox differ
diff --git a/src/operators/filter/kink.yaml b/src/operators/filter/kink.yaml
index e2858485e..8f6d104f1 100644
--- a/src/operators/filter/kink.yaml
+++ b/src/operators/filter/kink.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.kink
- opVersion: '10'
+ opVersion: '11'
opStatus: default
paramPages:
- !page
@@ -84,6 +84,9 @@ opDef: !def
file: src/operators/filter/kink.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/filter/kink.md
+ name: help
displayCategory: Transform
inputs:
- !input
diff --git a/src/operators/filter/knife.md b/src/operators/filter/knife.md
index 29d260f9c..d10ea1345 100644
--- a/src/operators/filter/knife.md
+++ b/src/operators/filter/knife.md
@@ -8,7 +8,14 @@ Cuts off an SDF along a plane.
* `below`
* `Offset`: Shifts the cut plane along the axis that it faces.
* `Rotateplane`: Rotate the cut plane in XYZ. When in 2D, only the Z rotation is used.
+* `Axis`
+ * `x`
+ * `y`
+ * `z`
+* `Enablesmoothing`: Whether to smooth the transition on each side of the slice down to a size of zero.
+* `Smoothradius`: The amount of smoothing distance.
## Inputs
-* `definition_in`:
\ No newline at end of file
+* `definition_in`:
+* `offsetField`:
\ No newline at end of file
diff --git a/src/operators/filter/lightTransform.glsl b/src/operators/filter/lightTransform.glsl
new file mode 100644
index 000000000..9b18e6123
--- /dev/null
+++ b/src/operators/filter/lightTransform.glsl
@@ -0,0 +1,20 @@
+ReturnT thismap(CoordT p, ContextT ctx) {
+ if (IS_TRUE(THIS_Enable)) {
+ vec3 posOffset = THIS_Postranslate;
+ #ifdef THIS_HAS_INPUT_posTranslateField
+ posOffset += adaptAsVec3(inputOp_posTranslateField(p, ctx));
+ #endif
+ vec3 rot = THIS_Dirrotate;
+ #ifdef THIS_HAS_INPUT_dirRotateField
+ rot += adaptAsVec3(inputOp_dirRotateField(p, ctx));
+ #endif
+ vec3 lookAtOffset = THIS_Lookattranslate;
+ #ifdef THIS_HAS_INPUT_lookAtTranslateField
+ lookAtOffset += adaptAsVec3(inputOp_lookAtTranslateField(p, ctx));
+ #endif
+ ctx.posOffset += posOffset;
+ LOOK_AT_BODY();
+ ctx.rotation = rot;
+ }
+ return inputOp_light(p, ctx);
+}
\ No newline at end of file
diff --git a/src/operators/filter/lightTransform.md b/src/operators/filter/lightTransform.md
new file mode 100644
index 000000000..f9498ef34
--- /dev/null
+++ b/src/operators/filter/lightTransform.md
@@ -0,0 +1,20 @@
+Specialized transform that can be applied to lights, taking into account things like look at direction.
+
+Similar to `cameraTransform`, this operator is specificaly designed to work on lights.
+
+## Parameters
+
+* `Enable`
+* `Postranslate`: Translation offset applied to the position of the light source.
+* `Dirrotate`: Rotation applied to the direction which the light source is facing.
+* `Lookatmode`: Whether the look at position (if used) should be adjusted with the main position or remain stationary.
+ * `includepos`: The look at position should be moved by the same amount that the main position is moved.
+ * `separate`: The look at position should remain in place regardless of how the main position moves.
+* `Lookattranslate`: Translation offset applied to only the look at position.
+
+## Inputs
+
+* `light`:
+* `posTranslateField`:
+* `dirRotateField`:
+* `lookAtTranslateField`:
\ No newline at end of file
diff --git a/src/operators/filter/lightTransform.tox b/src/operators/filter/lightTransform.tox
new file mode 100644
index 000000000..5b1f319a8
Binary files /dev/null and b/src/operators/filter/lightTransform.tox differ
diff --git a/src/operators/filter/lightTransform.yaml b/src/operators/filter/lightTransform.yaml
new file mode 100644
index 000000000..3b7ea6ccb
--- /dev/null
+++ b/src/operators/filter/lightTransform.yaml
@@ -0,0 +1,74 @@
+!rop
+meta: !meta
+ opType: raytk.operators.filter.lightTransform
+ opVersion: '2'
+ opStatus: beta
+opDef: !def
+ enable: !expr
+ expr: op('..').par.Enable
+ useRuntimeBypass: true
+ typeSpec: !ropTypes
+ coordType: !coordT
+ Coordtypevec3: true
+ contextType: !contextT
+ Contexttypelightcontext: true
+ returnType: !returnT
+ Returntypelight: true
+ function: !text
+ file: src/operators/filter/lightTransform.glsl
+ name: function
+ paramGroupTable: eval_params
+ help: !text
+ file: src/operators/filter/lightTransform.md
+ name: help
+ displayCategory: Light
+inputs:
+- !input
+ Localalias: light
+ Required: true
+ coordType: !coordT
+ Coordtypevec3: true
+ contextType: !contextT
+ Contexttypelightcontext: true
+ returnType: !returnT
+ Returntypelight: true
+- !input
+ Localalias: posTranslateField
+ coordType: !coordT
+ Coordtypevec3: true
+ contextType: !contextT
+ Contexttypelightcontext: true
+ returnType: !returnT
+ Returntypevec4: true
+- !input
+ Localalias: dirRotateField
+ Variableinputs: posTranslateField
+ coordType: !coordT
+ Coordtypevec3: true
+ contextType: !contextT
+ Contexttypelightcontext: true
+ returnType: !returnT
+ Returntypevec4: true
+- !input
+ Localalias: lookAtTranslateField
+ Variableinputs: posTranslateField dirRotateField
+ coordType: !coordT
+ Coordtypevec3: true
+ contextType: !contextT
+ Contexttypelightcontext: true
+ returnType: !returnT
+ Returntypevec4: true
+elements:
+- !opElement
+ name: codeSwitcher_Conversion
+ elementType: codeSwitcher
+ params:
+ Elementroot: ''
+ Table: lookAtModes
+ Param: Lookatmode
+ Autoupdateparams: true
+ Manageparamstates: false
+ Alwaysincludeallparams: false
+ Switchmode: autoconst
+ Indexexpr: ''
+ Placeholder: LOOK_AT_BODY();
diff --git a/src/operators/filter/lightTransform_lookAtModes.txt b/src/operators/filter/lightTransform_lookAtModes.txt
new file mode 100644
index 000000000..ab86edd42
--- /dev/null
+++ b/src/operators/filter/lightTransform_lookAtModes.txt
@@ -0,0 +1,3 @@
+name label code
+includepos Include Position Translate ctx.lookAtOffset += posOffset + lookAtOffset;
+separate Separate Translate Only ctx.lookAtOffset += lookAtOffset;
diff --git a/src/operators/filter/lightTransform_params.txt b/src/operators/filter/lightTransform_params.txt
new file mode 100644
index 000000000..27b8332ef
--- /dev/null
+++ b/src/operators/filter/lightTransform_params.txt
@@ -0,0 +1,3 @@
+names source handling readOnlyHandling conversion enable
+Postranslate[xyz] Lookattranslate[xyz] param runtime macro 1
+Dirrotate[xyz] param runtime macro angle 1
diff --git a/src/operators/filter/limitArea.md b/src/operators/filter/limitArea.md
new file mode 100644
index 000000000..05a41e4ee
--- /dev/null
+++ b/src/operators/filter/limitArea.md
@@ -0,0 +1,18 @@
+Use an SDF to limit the area where a field produces values.
+
+Within the specified bounds, the value from the first input field is used.
+
+Outside the bounds, if there's a second input field, that is used instead. Otherwise the `Outside Value` parameter is used for those areas.
+
+## Parameters
+
+* `Enable`
+* `Offset`: Offsets the edge of the bound area, expanding/collapsing it. This is equivalent to inserting a `round` operator.
+* `Blending`: Range over which to fade from the main field to the outside field/param.
+* `Outsidevalue`: Value to use outside the bounds, if there is no second field input.
+
+## Inputs
+
+* `inside`:
+* `outside`:
+* `boundVolume`:
\ No newline at end of file
diff --git a/src/operators/filter/limitArea.tox b/src/operators/filter/limitArea.tox
index 9d038968c..cc577b977 100644
Binary files a/src/operators/filter/limitArea.tox and b/src/operators/filter/limitArea.tox differ
diff --git a/src/operators/filter/limitArea.yaml b/src/operators/filter/limitArea.yaml
index d0067f676..6ac3d65c4 100644
--- a/src/operators/filter/limitArea.yaml
+++ b/src/operators/filter/limitArea.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.limitArea
- opVersion: '2'
+ opVersion: '3'
opStatus: beta
opDef: !def
enable: !expr
@@ -18,6 +18,9 @@ opDef: !def
file: src/operators/filter/limitArea.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/filter/limitArea.md
+ name: help
displayCategory: Restrict
multiInput: !multiInput
Minimuminputs: 0
diff --git a/src/operators/filter/limitLight.glsl b/src/operators/filter/limitLight.glsl
new file mode 100644
index 000000000..5de3e4c95
--- /dev/null
+++ b/src/operators/filter/limitLight.glsl
@@ -0,0 +1,34 @@
+ReturnT thismap(CoordT p, ContextT ctx) {
+ Light light = inputOp_light(p, ctx);
+ if (IS_FALSE(THIS_Enable) || light.absent) {
+ return light;
+ }
+
+ float amount = 1.0;
+ if (IS_TRUE(THIS_Enableattenuation)) {
+ float attenDist = THIS_Attenuationdistance;
+ float attenFade = THIS_Attenuationfade * .5;
+ float dist = length(p - light.pos);
+ amount = 1.0 - smoothstep(attenDist - attenFade, attenDist + attenFade, dist);
+ }
+
+ // TODO: BOUNDS
+ #ifdef THIS_HAS_INPUT_bounds
+ if (IS_TRUE(THIS_Enablebounds)) {
+ Sdf bounds = inputOp_bounds(p, ctx);
+ float bd = bounds.x - THIS_Boundsoffset;
+ if (bd > 0.0) {
+ amount *= 1.0 - smoothstep(0.0, THIS_Boundsblending, bd);
+ }
+ }
+ #endif
+
+ light.color *= amount;
+ if (IS_TRUE(THIS_Optimizeoutside)) {
+ if (amount <= 0.0) {
+ light.absent = true;
+ return light;
+ }
+ }
+ return light;
+}
\ No newline at end of file
diff --git a/src/operators/filter/limitLight.md b/src/operators/filter/limitLight.md
new file mode 100644
index 000000000..f6ba4ed52
--- /dev/null
+++ b/src/operators/filter/limitLight.md
@@ -0,0 +1,23 @@
+Limits the brightness of a light using distance attenuation or a bounding SDF (or both).
+
+Attenuation makes the light full brightness at the position of the light and after a distance it tapers off to darkness.
+
+Bounding SDFs do something similar but instead of using distance from the light source, they use an SDF that defines an area within which the light is at full brightness.
+
+The optimization feature tells the renderer that in places where attentuation / bounding says the light should be totally off, the renderer can skip attempting to use that light at all for any materials there.
+
+## Parameters
+
+* `Enable`
+* `Enableattenuation`: Whether to use distance from the light source to dim the light.
+* `Attenuationdistance`: Range within which the light is at full brightness.
+* `Attenuationfade`: Width of the transition from light to dark for distance attenuation. This fading is centered on the range from the distance parameter, so half the fade will be inside that range and half will be extending beyond that range.
+* `Enablebounds`: Whether to use an SDF to dim the light outside an area.
+* `Boundsoffset`: Expands or shrinks the bounding area from the SDF, equivalent to inserting a `round` operator between the SDF and the `limitLight`.
+* `Boundsblending`: Width of the transition from light to dark from the bounding SDF.
+* `Optimizeoutside`: Whether to tell the renderer it can skip material calculations for the light in areas outside the attenuation / bounding SDF.
+
+## Inputs
+
+* `light`: Light whose brightness is to be limited.
+* `bounds`: SDF that defines an area for the light to be at full brightness.
\ No newline at end of file
diff --git a/src/operators/filter/limitLight.tox b/src/operators/filter/limitLight.tox
new file mode 100644
index 000000000..c7857c64b
Binary files /dev/null and b/src/operators/filter/limitLight.tox differ
diff --git a/src/operators/filter/limitLight.yaml b/src/operators/filter/limitLight.yaml
new file mode 100644
index 000000000..93c0b4808
--- /dev/null
+++ b/src/operators/filter/limitLight.yaml
@@ -0,0 +1,42 @@
+!rop
+meta: !meta
+ opType: raytk.operators.filter.limitLight
+ opVersion: '2'
+ opStatus: beta
+opDef: !def
+ enable: !expr
+ expr: op('..').par.Enable
+ useRuntimeBypass: true
+ typeSpec: !ropTypes
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Contexttypelightcontext: true
+ returnType: !returnT
+ Returntypelight: true
+ function: !text
+ file: src/operators/filter/limitLight.glsl
+ name: function
+ paramGroupTable: eval_params
+ help: !text
+ file: src/operators/filter/limitLight.md
+ name: help
+ displayCategory: Light
+inputs:
+- !input
+ Localalias: light
+ Required: true
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Contexttypelightcontext: true
+ returnType: !returnT
+ Returntypelight: true
+- !input
+ Localalias: bounds
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Contexttypelightcontext: true
+ returnType: !returnT
+ Returntypesdf: true
diff --git a/src/operators/filter/limitLight_params.txt b/src/operators/filter/limitLight_params.txt
new file mode 100644
index 000000000..a77898659
--- /dev/null
+++ b/src/operators/filter/limitLight_params.txt
@@ -0,0 +1,3 @@
+names source handling readOnlyHandling conversion enable
+Enableattenuation Attenuationdistance Attenuationfade param runtime macro 1
+Enablebounds Optimizeoutside Boundsoffset Boundsblending param runtime macro 1
diff --git a/src/operators/filter/linearClone.md b/src/operators/filter/linearClone.md
new file mode 100644
index 000000000..3f7535041
--- /dev/null
+++ b/src/operators/filter/linearClone.md
@@ -0,0 +1,48 @@
+Repeats an SDF along a line, combining the results.
+
+Note that this multiplies the work of the input for each clone, meaning that 4 clones means 4x the work of whatever is connected to the input.
+
+The `modulo1D` can be a cheaper alternative to `linearClone` though it comes with limitations.
+
+## Parameters
+
+* `Enable`
+* `Count`: The number of copies. The performance cost of the input is multiplied by this number.
+* `Translate1`: Position of the start of the line of clones.
+* `Translate2`: Position of the end of the line of clones.
+* `Mergetype`: How to merge the copies.
+ * `simpleUnion`
+ * `simpleIntersect`
+ * `simpleDiff`
+ * `smoothUnion`
+ * `smoothIntersect`
+ * `smoothDiff`
+ * `roundUnion`
+ * `roundIntersect`
+ * `roundDiff`
+ * `chamferUnion`
+ * `chamferIntersect`
+ * `chamferDiff`
+ * `stairUnion`
+ * `stairIntersect`
+ * `stairDiff`
+ * `columnUnion`
+ * `columnIntersect`
+ * `columnDiff`
+ * `simpleXOR`
+* `Mergeradius`: The amount of smoothing to apply when merging copies.
+* `Mergenumber`
+* `Mergeoffset`
+* `Iterationtype`: Whether and how to expose iteration values to upstream operators.
+ * `none`
+ * `index`
+
+## Inputs
+
+* `definition_in`:
+* `blendRadiusField`:
+
+## Variables
+
+* `index`:
+* `normindex`:
\ No newline at end of file
diff --git a/src/operators/filter/linearClone.tox b/src/operators/filter/linearClone.tox
index 37fc3eed7..df3a47c89 100644
Binary files a/src/operators/filter/linearClone.tox and b/src/operators/filter/linearClone.tox differ
diff --git a/src/operators/filter/linearClone.yaml b/src/operators/filter/linearClone.yaml
index f288bde4b..3230c4735 100644
--- a/src/operators/filter/linearClone.yaml
+++ b/src/operators/filter/linearClone.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.linearClone
- opVersion: '3'
+ opVersion: '4'
opStatus: default
opDef: !def
enable: !expr
@@ -26,6 +26,9 @@ opDef: !def
evalOpts: !evalOpts
excludeFirstRow: true
cols: enable
+ help: !text
+ file: src/operators/filter/linearClone.md
+ name: help
displayCategory: Repeat
inputs:
- !input
diff --git a/src/operators/filter/lookAtRotate.md b/src/operators/filter/lookAtRotate.md
new file mode 100644
index 000000000..436c89702
--- /dev/null
+++ b/src/operators/filter/lookAtRotate.md
@@ -0,0 +1,15 @@
+Rotates space to face towards a point.
+
+## Parameters
+
+* `Enable`
+* `Sourcepoint`: The position around which to rotate.
+* `Targetpoint`: The position that the rotation faces towards.
+* `Roll`: Rotation perpendicular to the direction that it's facing.
+
+## Inputs
+
+* `definition_in`:
+* `sourcePointField`:
+* `targetPointField`:
+* `rollField`:
\ No newline at end of file
diff --git a/src/operators/filter/lookAtRotate.tox b/src/operators/filter/lookAtRotate.tox
index bbda4ecc1..55c994781 100644
Binary files a/src/operators/filter/lookAtRotate.tox and b/src/operators/filter/lookAtRotate.tox differ
diff --git a/src/operators/filter/lookAtRotate.yaml b/src/operators/filter/lookAtRotate.yaml
index d27e4def7..6d341c95c 100644
--- a/src/operators/filter/lookAtRotate.yaml
+++ b/src/operators/filter/lookAtRotate.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.lookAtRotate
- opVersion: '4'
+ opVersion: '5'
opStatus: beta
opDef: !def
enable: !expr
@@ -20,6 +20,9 @@ opDef: !def
paramGroupTable: eval_params
libraryNames: !expr
expr: op('lookAtRotate_lib')
+ help: !text
+ file: src/operators/filter/lookAtRotate.md
+ name: help
displayCategory: Transform
inputs:
- !input
diff --git a/src/operators/filter/magnet.glsl b/src/operators/filter/magnet.glsl
index 8005d8b55..9710b40fd 100644
--- a/src/operators/filter/magnet.glsl
+++ b/src/operators/filter/magnet.glsl
@@ -36,14 +36,28 @@ ReturnT thismap(CoordT p, ContextT ctx) {
CoordT translate = THIS_asCoordT(THIS_Translate) * d;
p -= translate;
- CoordT scale = mix(CoordT(1.), THIS_asCoordT(THIS_Scale), d);
- p /= scale;
+ float adjust = 1.;
+ switch (int(THIS_Scaletype)) {
+ case THISTYPE_Scaletype_uniform:
+ {
+ float scale = mix(1., THIS_Uniformscale, d);
+ p /= scale;
+ adjust = scale;
+ }
+ break;
+ case THISTYPE_Scaletype_separate:
+ {
+ vec3 scale = mix(vec3(1.), THIS_Scale, d);
+ p /= THIS_asCoordT(scale);
+ adjust = vmin(scale);
+ }
+ break;
+ }
+
p += center;
ReturnT res = inputOp1(p, ctx);
- #ifdef THIS_RETURN_TYPE_float
- res /= length(scale);
- #else
- res.x /= length(scale);
+ #ifdef THIS_RETURN_TYPE_Sdf
+ res = withAdjustedScale(res, adjust);
#endif
return res;
}
diff --git a/src/operators/filter/magnet.tox b/src/operators/filter/magnet.tox
index cc1925cf9..f52d475d2 100644
Binary files a/src/operators/filter/magnet.tox and b/src/operators/filter/magnet.tox differ
diff --git a/src/operators/filter/magnet.yaml b/src/operators/filter/magnet.yaml
index 7c16844bb..6094012df 100644
--- a/src/operators/filter/magnet.yaml
+++ b/src/operators/filter/magnet.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.magnet
- opVersion: '14'
+ opVersion: '15'
opStatus: default
opDef: !def
enable: !expr
diff --git a/src/operators/filter/magnet_params.txt b/src/operators/filter/magnet_params.txt
index 6614fd5d4..20588251e 100644
--- a/src/operators/filter/magnet_params.txt
+++ b/src/operators/filter/magnet_params.txt
@@ -1,3 +1,4 @@
names source handling readOnlyHandling conversion enable
-Center[xyz] Translate[xyz] Scale[xyz] Amount Radius Fade param runtime macro 1
+Center[xyz] Translate[xyz] Scale[xyz] Uniformscale Amount Radius Fade param runtime macro 1
Rotate[xyz] param runtime macro angle 1
+Scaletype param constant 1
diff --git a/src/operators/filter/mirrorAxes.md b/src/operators/filter/mirrorAxes.md
new file mode 100644
index 000000000..327872527
--- /dev/null
+++ b/src/operators/filter/mirrorAxes.md
@@ -0,0 +1,68 @@
+Mirror space across one or more axes, similar to `reflect`.
+
+## Parameters
+
+* `Enable`
+* `Axes`: Which axes should be reflected.
+ * `x`
+ * `y`
+ * `z`
+ * `xy`
+ * `yz`
+ * `zx`
+ * `xyz`
+* `Dirx`: Which side of the X axis should be reflected.
+ * `pos`
+ * `neg`
+* `Diry`: Which side of the Y axis should be reflected.
+ * `pos`
+ * `neg`
+* `Dirz`: Which side of the Z axis should be reflected.
+ * `pos`
+ * `neg`
+* `Flipsidex`: Whether to flip one side of the X axis along either the Y or Z axes.
+ * `none`
+ * `xpos`
+ * `xneg`
+ * `ypos`
+ * `yneg`
+ * `zpos`
+ * `zneg`
+* `Flipsidey`: Whether to flip one side of the Y axis along either the X or Z axes.
+ * `none`
+ * `xpos`
+ * `xneg`
+ * `ypos`
+ * `yneg`
+ * `zpos`
+ * `zneg`
+* `Flipsidez`: Whether to flip one side of the Z axis along either the X or Y axes.
+ * `none`
+ * `xpos`
+ * `xneg`
+ * `ypos`
+ * `yneg`
+ * `zpos`
+ * `zneg`
+* `Center`: Center position for the reflection planes.
+* `Offset`: Offset applied to each side, pushing them towards / away from the reflection planes.
+* `Enableblend`: Whether to stretch out the area near the reflection plane to soften the transition between the sides.
+* `Blending`: How much area to stretch out near the reflection planes.
+* `Target`: What the reflection should be applied to.
+ * `coords`
+ * `sdfuv`
+ * `sdfuv2`
+ * `matuv`
+ * `value`
+
+## Inputs
+
+* `definition_in`:
+* `offsetField`:
+* `directionField`:
+* `flipSideField`:
+* `blendingField`:
+
+## Variables
+
+* `sides`:
\ No newline at end of file
diff --git a/src/operators/filter/mirrorAxes.tox b/src/operators/filter/mirrorAxes.tox
index 569c0bfdf..a8027f73f 100644
Binary files a/src/operators/filter/mirrorAxes.tox and b/src/operators/filter/mirrorAxes.tox differ
diff --git a/src/operators/filter/mirrorAxes.yaml b/src/operators/filter/mirrorAxes.yaml
index fb9be02e2..cea8927e0 100644
--- a/src/operators/filter/mirrorAxes.yaml
+++ b/src/operators/filter/mirrorAxes.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.mirrorAxes
- opVersion: '14'
+ opVersion: '15'
opStatus: default
opDef: !def
enable: !expr
@@ -39,6 +39,9 @@ opDef: !def
evaluate: true
evalOpts: !evalOpts
excludeFirstRow: true
+ help: !text
+ file: src/operators/filter/mirrorAxes.md
+ name: help
displayCategory: Repeat
inputs:
- !input
diff --git a/src/operators/filter/moduloLine.md b/src/operators/filter/moduloLine.md
new file mode 100644
index 000000000..9786b9ec6
--- /dev/null
+++ b/src/operators/filter/moduloLine.md
@@ -0,0 +1,22 @@
+Repeats space along a line, similar to `modulo1D`.
+
+Similar to `modulo1D`, this operator repeats space in a row of slices. But instead of being on an axis, it uses an arbitrary line defined by two points, with a fixed number of evenly spaced slices between them.
+
+## Parameters
+
+* `Enable`
+* `Point1`
+* `Point2`
+* `Divisions`: Number of slices.
+* `Mirrortype`: Whether to flip alternating slices, which can be useful for ensuring that shapes line up with their neighbors if they get cut off.
+ * `none`
+ * `mirror`
+
+## Inputs
+
+* `definition_in`:
+
+## Variables
+
+* `cellcoord`: Cell index, 0, 1, 2, etc.
+* `normcoord`: Cell index, scaled to a 0..1 range.
\ No newline at end of file
diff --git a/src/operators/filter/moduloLine.tox b/src/operators/filter/moduloLine.tox
index baa207d73..7d64ba594 100644
Binary files a/src/operators/filter/moduloLine.tox and b/src/operators/filter/moduloLine.tox differ
diff --git a/src/operators/filter/moduloLine.yaml b/src/operators/filter/moduloLine.yaml
index 731ec777e..106172195 100644
--- a/src/operators/filter/moduloLine.yaml
+++ b/src/operators/filter/moduloLine.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.moduloLine
- opVersion: '4'
+ opVersion: '5'
opStatus: beta
opDef: !def
enable: !expr
@@ -26,6 +26,9 @@ opDef: !def
evalOpts: !evalOpts
excludeFirstRow: true
cols: enable
+ help: !text
+ file: src/operators/filter/moduloLine.md
+ name: help
displayCategory: Repeat
inputs:
- !input
diff --git a/src/operators/filter/moduloSpherical.md b/src/operators/filter/moduloSpherical.md
new file mode 100644
index 000000000..86b209777
--- /dev/null
+++ b/src/operators/filter/moduloSpherical.md
@@ -0,0 +1,26 @@
+Repeats space in a spherical mesh layout with rows and columns.
+
+## Parameters
+
+* `Enable`
+* `Repetitions`: How many rows and columns to have.
+* `Shift`: Shifts the repetitions across the rows and columns.
+* `Offset`: Shifts the contents of each repetition, away from the sphere center or side to side along the columns.
+* `Pivot`: Center point of the sphere
+* `Mirrortype`: Flips alternating repetitions so they mirror each other.
+ * `none`
+ * `rows`
+ * `cols`
+ * `grid`
+
+## Inputs
+
+* `definition_in`:
+* `repetitionsField`:
+* `offsetField`:
+* `shiftField`:
+
+## Variables
+
+* `cell`: Index of the row and column as integers (0..N).
+* `normcell`: Index of the row and column scaled to a 0..1 range based on the number of Repetitions.
\ No newline at end of file
diff --git a/src/operators/filter/moduloSpherical.tox b/src/operators/filter/moduloSpherical.tox
index ca8ca437d..3bfc7e535 100644
Binary files a/src/operators/filter/moduloSpherical.tox and b/src/operators/filter/moduloSpherical.tox differ
diff --git a/src/operators/filter/moduloSpherical.yaml b/src/operators/filter/moduloSpherical.yaml
index 2b2adbfc7..8638c8665 100644
--- a/src/operators/filter/moduloSpherical.yaml
+++ b/src/operators/filter/moduloSpherical.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.moduloSpherical
- opVersion: '8'
+ opVersion: '9'
opStatus: default
opDef: !def
enable: !expr
@@ -25,6 +25,9 @@ opDef: !def
evalOpts: !evalOpts
excludeFirstRow: true
cols: enable
+ help: !text
+ file: src/operators/filter/moduloSpherical.md
+ name: help
displayCategory: Repeat
inputs:
- !input
diff --git a/src/operators/filter/moduloToroidal.glsl b/src/operators/filter/moduloToroidal.glsl
index 82ea0fe9b..42f5d61ae 100644
--- a/src/operators/filter/moduloToroidal.glsl
+++ b/src/operators/filter/moduloToroidal.glsl
@@ -51,8 +51,12 @@ ReturnT thismap(CoordT p, ContextT ctx) {
float col;
float row;
- pR(p.xz, shift.y);
- col = pModPolar(p.xz, r.x);
+ pR(p.xz, shift.x);
+ if (THIS_Mirrortype == THISTYPE_Mirrortype_cols || THIS_Mirrortype == THISTYPE_Mirrortype_grid) {
+ col = pModPolarMirror(p.xz, r.x);
+ } else {
+ col = pModPolar(p.xz, r.x);
+ }
p.x -= rOuter;
#ifdef THIS_EXPOSE_innerangle
@@ -62,8 +66,12 @@ ReturnT thismap(CoordT p, ContextT ctx) {
THIS_norminnerangle = atan(p.x, p.z)/TAU + .5;
#endif
- pR(p.xy, shift.x);
- row = pModPolar(p.xy, r.y);
+ pR(p.xy, shift.y);
+ if (THIS_Mirrortype == THISTYPE_Mirrortype_rows || THIS_Mirrortype == THISTYPE_Mirrortype_grid) {
+ row = pModPolar(p.xy, r.y);
+ } else {
+ row = pModPolarMirror(p.xy, r.y);
+ }
p.x -= thOuter;
#ifdef THIS_EXPOSE_cell
diff --git a/src/operators/filter/moduloToroidal.md b/src/operators/filter/moduloToroidal.md
new file mode 100644
index 000000000..5a2c73c33
--- /dev/null
+++ b/src/operators/filter/moduloToroidal.md
@@ -0,0 +1,35 @@
+Repeats space as rows and columns of a torus-shaped grid.
+
+## Parameters
+
+* `Enable`
+* `Axis`: Axis that the torus is around.
+ * `x`
+ * `y`
+ * `z`
+* `Radius`: Primary radius of the torus around the main axis.
+* `Thickness`: Thickness of the torus.
+* `Repetitions`: Number of rows and columns across the torus.
+* `Shift`: Shifts the repetitions across the rows and columns of the torus.
+* `Mirrortype`: Flips alternating repetitions so they mirror each other.
+ * `none`
+ * `rows`
+ * `cols`
+ * `grid`
+
+## Inputs
+
+* `definition_in`:
+* `repetitionsField`:
+* `radiusField`:
+* `thicknessField`:
+* `shiftField`:
+
+## Variables
+
+* `cell`: Index of the row and column as integers (0..N).
+* `normcell`: Index of the row and column scaled to a 0..1 range based on the number of Repetitions.
+* `angle`: Angle around the main axis as degrees (0..360).
+* `normangle`: Angle around the main axis, scaled to a 0..1 range.
+* `innerangle`: Angle around the inner body of the torus as degrees (0..360).
+* `norminnerangle`: Angle around the inner body of the torus, scaled to a 0..1 range.
\ No newline at end of file
diff --git a/src/operators/filter/moduloToroidal.tox b/src/operators/filter/moduloToroidal.tox
index f286fda6d..93da8b4d0 100644
Binary files a/src/operators/filter/moduloToroidal.tox and b/src/operators/filter/moduloToroidal.tox differ
diff --git a/src/operators/filter/moduloToroidal.yaml b/src/operators/filter/moduloToroidal.yaml
index 725b66216..af9f341a4 100644
--- a/src/operators/filter/moduloToroidal.yaml
+++ b/src/operators/filter/moduloToroidal.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.moduloToroidal
- opVersion: '2'
+ opVersion: '5'
opStatus: beta
opDef: !def
enable: !expr
@@ -25,6 +25,10 @@ opDef: !def
evalOpts: !evalOpts
excludeFirstRow: true
cols: enable
+ help: !text
+ file: src/operators/filter/moduloToroidal.md
+ name: help
+ keywords: torus
inputs:
- !input
Variables: '*'
diff --git a/src/operators/filter/moduloToroidal_mirrorTypes.txt b/src/operators/filter/moduloToroidal_mirrorTypes.txt
new file mode 100644
index 000000000..4722c4522
--- /dev/null
+++ b/src/operators/filter/moduloToroidal_mirrorTypes.txt
@@ -0,0 +1,5 @@
+name label
+none None
+rows Rows
+cols Columns
+grid Grid
diff --git a/src/operators/filter/moduloToroidal_params.txt b/src/operators/filter/moduloToroidal_params.txt
index 69a4b037e..5aa10340e 100644
--- a/src/operators/filter/moduloToroidal_params.txt
+++ b/src/operators/filter/moduloToroidal_params.txt
@@ -4,3 +4,4 @@ Radius param runtime macro op('radius_definition').numRows < 2
Thickness param runtime macro op('thickness_definition').numRows < 2
Repetitions[1-2] param runtime macro op('repetitions_definition').numRows < 2
Shift[1-2] param runtime macro 1
+Mirrortype param constant 1
diff --git a/src/operators/filter/quadTreeRepeat.md b/src/operators/filter/quadTreeRepeat.md
new file mode 100644
index 000000000..5886d8faf
--- /dev/null
+++ b/src/operators/filter/quadTreeRepeat.md
@@ -0,0 +1,30 @@
+Repeats space in a 2d grid where some cells are subdivided into smaller cells recursively.
+
+## Parameters
+
+* `Enable`
+* `Axis`: Axis that the grid plane faces.
+ * `x`
+ * `y`
+ * `z`
+* `Division`: Number of steps of subdividing.
+* `Chance1`: Likelyhood of a cell getting one level of subdivision.
+* `Chance2`: Likelyhood of a sub-divided cell getting another level of subdivision.
+* `Offset`: Moves the contents within each repeated cell.
+* `Shift`: Move the entire arrangement of cells.
+* `Enablerescale`: Whether to apply uniform scaling within each cell so that the contents fit the size of the cell.
+* `Iterationtype`: How to expose the cell information as iteration values for upstream operators to use.
+ * `none`
+ * `cell`
+* `Seed`: Seed number used as the basis of the randomization.
+
+## Inputs
+
+* `definition_in`: Main input which appears within each cell.
+* `shiftField`: Field that controls the shifting of the overall grid layout.
+* `offsetField`: Field that controls the offsetting of the contents within each cell.
+
+## Variables
+
+* `cell`: Randomization values different for each cell, but without a predictable layout.
+* `layer`: Which layer of subdivision the current cell has.
\ No newline at end of file
diff --git a/src/operators/filter/quadTreeRepeat.tox b/src/operators/filter/quadTreeRepeat.tox
index 0a0a1a325..075c62ccf 100644
Binary files a/src/operators/filter/quadTreeRepeat.tox and b/src/operators/filter/quadTreeRepeat.tox differ
diff --git a/src/operators/filter/quadTreeRepeat.yaml b/src/operators/filter/quadTreeRepeat.yaml
index 986d8bcff..247deb8b2 100644
--- a/src/operators/filter/quadTreeRepeat.yaml
+++ b/src/operators/filter/quadTreeRepeat.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.quadTreeRepeat
- opVersion: '10'
+ opVersion: '11'
opStatus: beta
opDef: !def
enable: !expr
@@ -25,6 +25,9 @@ opDef: !def
evaluate: true
evalOpts: !evalOpts
excludeFirstRow: true
+ help: !text
+ file: src/operators/filter/quadTreeRepeat.md
+ name: help
displayCategory: Repeat
inputs:
- !input
diff --git a/src/operators/filter/radialClone.glsl b/src/operators/filter/radialClone.glsl
index fb239d4ed..de251ba27 100644
--- a/src/operators/filter/radialClone.glsl
+++ b/src/operators/filter/radialClone.glsl
@@ -15,6 +15,38 @@ MERGE_PREP();
MERGE_BODY();
}
+void THIS_applyCounterRot(inout vec2 q2, float totalRot) {
+ if (int(THIS_Rotatemode) == THISTYPE_Rotatemode_pos) {
+ pR(q2, -totalRot);
+ }
+}
+
+void THIS_prepareForInputCall(inout CoordT q, float rot, float totalRot, float radOffset) {
+#ifdef THIS_COORD_TYPE_vec2
+ pR(q, rot);
+ q.y -= radOffset;
+ THIS_applyCounterRot(q, totalRot);
+#else
+ switch (THIS_Axis) {
+ case THISTYPE_Axis_x:
+ pR(q.yz, rot);
+ q.y -= radOffset;
+ THIS_applyCounterRot(q.yz, totalRot);
+ break;
+ case THISTYPE_Axis_y:
+ pR(q.zx, rot);
+ q.z -= radOffset;
+ THIS_applyCounterRot(q.zx, totalRot);
+ break;
+ case THISTYPE_Axis_z:
+ pR(q.xy, rot);
+ q.x -= radOffset;
+ THIS_applyCounterRot(q.xy, totalRot);
+ break;
+ }
+#endif
+}
+
ReturnT thismap(CoordT p, ContextT ctx) {
int n = int(THIS_Count);
THIS_exposeIndex(ctx, 0, n);
@@ -39,16 +71,7 @@ ReturnT thismap(CoordT p, ContextT ctx) {
#ifdef THIS_HAS_INPUT_radialOffsetField
ro += inputOp_radialOffsetField(p, ctx);
#endif
-#ifdef THIS_COORD_TYPE_vec2
- pR(q, rot);
- q.y -= ro;
-#else
- switch (THIS_Axis) {
- case THISTYPE_Axis_x: pR(q.yz, rot); q.y -= ro; break;
- case THISTYPE_Axis_y: pR(q.zx, rot); q.z -= ro; break;
- case THISTYPE_Axis_z: pR(q.xy, rot); q.x -= ro; break;
- }
-#endif
+ THIS_prepareForInputCall(q, rot, totalRot, ro);
res = inputOp1(q, ctx);
for (int i = 1; i < n; i++) {
THIS_exposeIndex(ctx, i, n);
@@ -69,16 +92,7 @@ ReturnT thismap(CoordT p, ContextT ctx) {
#ifdef THIS_HAS_INPUT_radialOffsetField
ro += inputOp_radialOffsetField(p, ctx);
#endif
- #ifdef THIS_COORD_TYPE_vec2
- pR(q, rot);
- q.y -= ro;
- #else
- switch (THIS_Axis) {
- case THISTYPE_Axis_x: pR(q.yz, rot); q.y -= ro; break;
- case THISTYPE_Axis_y: pR(q.zx, rot); q.z -= ro; break;
- case THISTYPE_Axis_z: pR(q.xy, rot); q.x -= ro; break;
- }
- #endif
+ THIS_prepareForInputCall(q, rot, totalRot, ro);
Sdf res2 = inputOp1(q, ctx);
THIS_combine(res, res2, q, ctx);
}
diff --git a/src/operators/filter/radialClone.md b/src/operators/filter/radialClone.md
index 558b161c1..dff562c56 100644
--- a/src/operators/filter/radialClone.md
+++ b/src/operators/filter/radialClone.md
@@ -14,13 +14,45 @@ Note that this runs its input multiple times, which can lead to performance issu
* `Angleoffset`: Shifts the angle of the first copy around the axis.
* `Radiusoffset`: Offsets the copies towards/away from the axis. At zero, all copies will be centered on the axis.
* `Mergetype`: How to merge the copies.
- * `union`: Show all the shapes, without any special treatment for overlap between them.
- * `smoothunion`: Smooths overlaps between the copies.
+ * `simpleUnion`
+ * `simpleIntersect`
+ * `simpleDiff`
+ * `smoothUnion`
+ * `smoothIntersect`
+ * `smoothDiff`
+ * `roundUnion`
+ * `roundIntersect`
+ * `roundDiff`
+ * `chamferUnion`
+ * `chamferIntersect`
+ * `chamferDiff`
+ * `stairUnion`
+ * `stairIntersect`
+ * `stairDiff`
+ * `columnUnion`
+ * `columnIntersect`
+ * `columnDiff`
+ * `simpleXOR`
* `Mergeradius`: The amount of smoothing to apply when merging copies.
* `Iterationtype`: Whether and how to expose iteration values to upstream operators.
* `none`: Pass along whatever is provided by the next op after this one.
* `index`: Use the copy index (from 0 to `Count`-1) as the x iteration value.
+* `Rotatemode`: Whether the copies should be rotated or just positioned in a ring in their original orientation.
+ * `both`
+ * `pos`
+* `Mergenumber`
+* `Mergeoffset`
## Inputs
-* `definition_in`:
\ No newline at end of file
+* `definition_in`:
+* `radialOffsetField`:
+* `angleOffsetField`:
+* `blendRadiusField`:
+
+## Variables
+
+* `index`: Index of the current clone (0..N)
+* `normindex`: Index of the current clone, scaled to a 0..1 range.
+* `rotaccum`: Amount of rotation applied for the current clone (0..360).
+* `normrotaccum`: Amount of rotation applied for the current clone, scaled to 0..1 range.
\ No newline at end of file
diff --git a/src/operators/filter/radialClone.tox b/src/operators/filter/radialClone.tox
index a79da2508..9a43e2a2f 100644
Binary files a/src/operators/filter/radialClone.tox and b/src/operators/filter/radialClone.tox differ
diff --git a/src/operators/filter/radialClone.yaml b/src/operators/filter/radialClone.yaml
index fe2ac09b4..8ccc40b79 100644
--- a/src/operators/filter/radialClone.yaml
+++ b/src/operators/filter/radialClone.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.radialClone
- opVersion: '26'
+ opVersion: '27'
opStatus: default
opDef: !def
enable: !expr
@@ -100,3 +100,16 @@ elements:
Prepcodeplaceholder: MERGE_PREP();
Bodycodeplaceholder: MERGE_BODY();
Defaultinitcodeplaceholder: ''
+- !opElement
+ name: codeSwitcher_Rotatemode
+ elementType: codeSwitcher
+ params:
+ Elementroot: ''
+ Table: rotateModes
+ Param: Rotatemode
+ Autoupdateparams: true
+ Manageparamstates: false
+ Alwaysincludeallparams: false
+ Switchmode: constswitch
+ Indexexpr: ''
+ Placeholder: ''
diff --git a/src/operators/filter/radialClone_rotateModes.txt b/src/operators/filter/radialClone_rotateModes.txt
new file mode 100644
index 000000000..ca8fe6b16
--- /dev/null
+++ b/src/operators/filter/radialClone_rotateModes.txt
@@ -0,0 +1,3 @@
+name label
+both Position and Rotation
+pos Position Only
diff --git a/src/operators/filter/radialSlice.md b/src/operators/filter/radialSlice.md
new file mode 100644
index 000000000..a8e99fa10
--- /dev/null
+++ b/src/operators/filter/radialSlice.md
@@ -0,0 +1,27 @@
+Takes a pie-shaped slice of an SDF around an axis, either removing it or everything except it.
+
+## Parameters
+
+* `Enable`
+* `Axis`: The axis around which to take the slice.
+ * `x`
+ * `y`
+ * `z`
+* `Anglemode`: How to specify the angles of the slice.
+ * `width`: Choose a center angle and a width.
+ * `sides`: Choose the start and end angles.
+* `Center`: Center angle of the slice in degrees.
+* `Width`: Width of the slice in degrees.
+* `Start`: Start angle in degrees.
+* `End`: End angle in degrees.
+* `Invert`: Whether to remove just the slice, or remove everything except the slice.
+* `Enablesmoothing`: Whether to smooth the transition on each side of the slice down to a size of zero.
+* `Smoothradius`: The amount of smoothing distance.
+
+## Inputs
+
+* `definition_in`:
+* `centerField`:
+* `widthField`:
+* `startField`:
+* `endField`:
\ No newline at end of file
diff --git a/src/operators/filter/radialSlice.tox b/src/operators/filter/radialSlice.tox
index e957b50f1..b685a278b 100644
Binary files a/src/operators/filter/radialSlice.tox and b/src/operators/filter/radialSlice.tox differ
diff --git a/src/operators/filter/radialSlice.yaml b/src/operators/filter/radialSlice.yaml
index 48c41fa9e..a58c11364 100644
--- a/src/operators/filter/radialSlice.yaml
+++ b/src/operators/filter/radialSlice.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.radialSlice
- opVersion: '2'
+ opVersion: '3'
opStatus: default
opDef: !def
enable: !expr
@@ -19,6 +19,9 @@ opDef: !def
file: src/operators/filter/radialSlice.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/filter/radialSlice.md
+ name: help
displayCategory: Spatial Modifier
inputs:
- !input
diff --git a/src/operators/filter/reflect.md b/src/operators/filter/reflect.md
index 953c7603e..dfa3359e2 100644
--- a/src/operators/filter/reflect.md
+++ b/src/operators/filter/reflect.md
@@ -3,19 +3,25 @@ Reflects space across a plane.
## Parameters
* `Enable`
-* `Direction`
- * `custom`: Use a plane defined by a custom normal vector.
- * `xpos`: Reflect the positive X side onto the negative.
- * `xneg`: Reflect the negative X side onto the positive.
- * `ypos`: Reflect the positive Y side onto the negative.
- * `yneg`: Reflect the negative Y side onto the positive.
- * `zpos`: Reflect the positive Z side onto the negative.
- * `zneg`: Reflect the negative Z side onto the positive.
+* `Direction`: Axis and direction across which to reflect.
* `Planenormal`: Vector that the cut plane faces. Note that this is only a direction and not a position in space.
* `Offset`: Moves the reflection plane along the normal that it faces.
* `Shift`: Moves the whole resulting shape along the normal.
* `Exposeiteration`: Whether to expose which side of the plane a point is on as an iteration value for upstream ops.
+* `Enableblend`: Whether to stretch out the space near the reflection plane to smooth out the border between the sides.
+* `Blend`: How much to stretch the space near the reflection plane.
+* `Iterationtype`: How to expose information about the current side as iteration values.
+ * `none`
+ * `index`
+ * `sign`
## Inputs
-* `definition_in`:
\ No newline at end of file
+* `definition_in`:
+* `offsetField`:
+* `shiftField`:
+
+## Variables
+
+* `sign`: +1, -1 indicating the current side of the reflection.
+* `index`: 0, 1 indicating the current side of the reflection.
\ No newline at end of file
diff --git a/src/operators/filter/rescaleField.md b/src/operators/filter/rescaleField.md
index e2a469749..7ac25b0bb 100644
--- a/src/operators/filter/rescaleField.md
+++ b/src/operators/filter/rescaleField.md
@@ -11,6 +11,13 @@ It works for either float value fields or vector fields. When using a float valu
* `Inputhigh`: The high end of the expected input values.
* `Outputlow`: The low end of the rescaled value range.
* `Outputhigh`: The high end of the rescaled value range.
+* `Returntype`
+ * `auto`
+ * `float`
+ * `vec4`
+* `Multiply`: Multiplier value applied to all parts of the values after range scaling.
+* `Mult`: Multiplier values applied to each part of the values after range scaling.
+* `Postadd`: Amounts added to the rescaled values after all other steps.
## Inputs
diff --git a/src/operators/filter/rescaleFloatField.md b/src/operators/filter/rescaleFloatField.md
new file mode 100644
index 000000000..c506d3f40
--- /dev/null
+++ b/src/operators/filter/rescaleFloatField.md
@@ -0,0 +1,15 @@
+Simplified version of `rescaleField` that only has single settings vs vectors for each.
+
+This can be applied to either float or vector fields. In the case of vector fields, the same settings are used for all parts of the incoming vectors.
+
+## Parameters
+
+* `Enable`
+* `Inputrange`: The low/high ends of the expected input values.
+* `Outputrange`: The low/high ends of the rescaled values.
+* `Multiply`: Multiplier applied to values after range scaling.
+* `Postadd`: Amount added to values after the other steps.
+
+## Inputs
+
+* `definition_in`:
\ No newline at end of file
diff --git a/src/operators/filter/rescaleFloatField.tox b/src/operators/filter/rescaleFloatField.tox
index 7ddc106a0..9537bfd99 100644
Binary files a/src/operators/filter/rescaleFloatField.tox and b/src/operators/filter/rescaleFloatField.tox differ
diff --git a/src/operators/filter/rescaleFloatField.yaml b/src/operators/filter/rescaleFloatField.yaml
index 5c41433b0..00aab0d70 100644
--- a/src/operators/filter/rescaleFloatField.yaml
+++ b/src/operators/filter/rescaleFloatField.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.rescaleFloatField
- opVersion: '1'
+ opVersion: '2'
opStatus: default
opDef: !def
enable: !expr
@@ -19,6 +19,9 @@ opDef: !def
file: src/operators/filter/rescaleFloatField.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/filter/rescaleFloatField.md
+ name: help
displayCategory: Field Modifier
inputs:
- !input
diff --git a/src/operators/filter/restrictStage.md b/src/operators/filter/restrictStage.md
index 0610f7054..28471b8fc 100644
--- a/src/operators/filter/restrictStage.md
+++ b/src/operators/filter/restrictStage.md
@@ -10,11 +10,14 @@ The default value is "non-hit" for SDFs, and `0` / `vec4(0)` etc for other types
## Parameters
* `Enable`
-* `Includeprimary`
-* `Includeshadow`
-* `Includereflect`
-* `Includematerial`
-* `Includeocclusion`
+* `Includeprimary`: Whether the operator should be used in the main raymarching stage where the renderer finds surface hits for rays.
+* `Includeshadow`: Whether the operator should be used when the renderer is checking for shadows cast on a surface.
+* `Includereflect`: Whether the operator should be used when the renderer is determining colors reflected onto surfaces.
+* `Includematerial`: Whether the operator should be used when the renderer is using a material do determine the color of a point on a surface.
+* `Includeocclusion`: Whether the operator should be used when the renderer is computing ambient occlusion.
+* `Includevolumetric`: Whether the operator should be used when the renderer is accumulating color within a light volume.
+* `Includevolumetricshadow`: Whether the operator should be used when the renderer is checking for shadows within a light volume.
+* `Includenormal`: Whether the operator should be used when the renderer is calculating surface normals.
## Inputs
diff --git a/src/operators/filter/slice.md b/src/operators/filter/slice.md
index 5a9b278cd..528a0e346 100644
--- a/src/operators/filter/slice.md
+++ b/src/operators/filter/slice.md
@@ -1,4 +1,4 @@
-Removes all of an SDF except for a slice in space.
+Takes a slice of an SDF along an axis, either removing it or everything except it.
## Parameters
diff --git a/src/operators/filter/transform.md b/src/operators/filter/transform.md
index e1b2f1713..68838e4f7 100644
--- a/src/operators/filter/transform.md
+++ b/src/operators/filter/transform.md
@@ -1,6 +1,47 @@
-# transform (filter)
-
Transform the coordinates of the input, with rotation, scaling, and translation.
Various parts of the transform can be switched off to improve performance, and the sequence of transform steps can be reordered.
-It either uses the origin (0,0,0) as the pivot point, or can use another pivot point.
\ No newline at end of file
+It either uses the origin (0,0,0) as the pivot point, or can use another pivot point.
+
+## Parameters
+
+* `Enable`
+* `Enabletranslate`
+* `Enablerotate`
+* `Enablescale`
+* `Enablepivot`
+* `Translate`
+* `Rotate`
+* `Scale`
+* `Uniformscale`
+* `Pivot`
+* `Transformorder`
+ * `srt`
+ * `str`
+ * `rst`
+ * `rts`
+ * `tsr`
+ * `trs`
+* `Rotateorder`
+ * `xyz`
+ * `xzy`
+ * `yxz`
+ * `yzx`
+ * `zxy`
+ * `zyx`
+* `Scaletype`
+ * `separate`
+ * `uniform`
+* `Target`
+ * `coords`
+ * `sdfuv`
+ * `sdfuv2`
+ * `matuv`
+ * `value`
+
+## Inputs
+
+* `definition_in`:
+* `rotateField`:
+* `translateField`:
+* `scaleField`:
\ No newline at end of file
diff --git a/src/operators/filter/transformSequence.md b/src/operators/filter/transformSequence.md
new file mode 100644
index 000000000..983a8edc5
--- /dev/null
+++ b/src/operators/filter/transformSequence.md
@@ -0,0 +1,40 @@
+Applies one or more transform operators sequentially, to coordinates, field values, etc, with support for looping.
+
+The first input is the primary input, which can either be an arbitrary operator which will get the transformed coordinates, or it can be a field whose values are transformed, or an SDF whose UV coordinates are transformed, etc.
+
+The second and later inputs are the sequence of transforms that are applied to the primary.
+The second input gets the coordinates/values to be transformed, and the vector that it produces gets passed into the next input, and so on.
+The output of the last connected input is used as the final value/coordinates.
+
+Many transform filters support a mode where they have no attached primary input, in which case they act as fields producing their coordinates as a vector.
+But for transform filters that require a primary input, a `positionField` can be attached to do the same thing.
+
+The looping feature allows this operator to behave like a custom-built version of `iteratedTransform`, repeating the sequence of transformations multiple times.
+
+## Parameters
+
+* `Enable`
+* `Target`: What the transforms should be applied to.
+ * `coords`: The transforms are applied to coordinates which then get passed to the primary input. This is equivalent to how common transform operators like `rotate` behave.
+ * `sdfuv`: The primary input is first called with un-transformed coordinates to produce an SDF result, then the transform sequence is applied to the primary UV coordinates of that result.
+ * `sdfuv2`: Similar to primary UVs but for the secondary UVs that are used in cases where two SDFs are blended.
+ * `matuv`: The transforms are applied to the UVs included in the material context that gets passed into the primary input, which would typically be something like a `diffuseContrib`.
+ * `value`: The primary input is first called with un-transformed coordinates to produce a vector. Then the transform sequence is applied to that vector, which then gets produced as an output.
+* `Reverseorder`: Whether the transforms should be applied in reverse order, last to first.
+* `Enableloop`: Whether the transforms sequence should be applied multiple times, similar to an `iteratedTransform`.
+* `Iterations`: How many times to apply the transform sequence.
+
+## Inputs
+
+* `definition_in`:
+* `transform1`:
+* `transform2`:
+* `transform3`:
+* `transform4`:
+* `transform5`:
+* `transform6`:
+
+## Variables
+
+* `step`: The current loop index, 0, 1, 2, etc.
+* `normstep`: The current loop index, scaled to a 0..1 range.
\ No newline at end of file
diff --git a/src/operators/filter/transformSequence.tox b/src/operators/filter/transformSequence.tox
index 2c51aff2b..181b7150b 100644
Binary files a/src/operators/filter/transformSequence.tox and b/src/operators/filter/transformSequence.tox differ
diff --git a/src/operators/filter/transformSequence.yaml b/src/operators/filter/transformSequence.yaml
index 5b7de54f1..f6289ff74 100644
--- a/src/operators/filter/transformSequence.yaml
+++ b/src/operators/filter/transformSequence.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.filter.transformSequence
- opVersion: '8'
+ opVersion: '9'
opStatus: beta
opDef: !def
enable: !expr
@@ -24,6 +24,9 @@ opDef: !def
evaluate: true
evalOpts: !evalOpts
excludeFirstRow: true
+ help: !text
+ file: src/operators/filter/transformSequence.md
+ name: help
keywords: apply
displayCategory: Transform
multiInput: !multiInput
diff --git a/src/operators/filter/twist.md b/src/operators/filter/twist.md
index 4e567ab7c..371db9234 100644
--- a/src/operators/filter/twist.md
+++ b/src/operators/filter/twist.md
@@ -9,8 +9,6 @@ Twists space around an axis.
* `z`
* `Amount`: The amount of twisting to apply.
* `Shift`: Offsets the twisting along the axis, effectively rotating everything equally around it.
-* `Inspect`
-* `Help`
## Inputs
diff --git a/src/operators/filter/waveWarp.md b/src/operators/filter/waveWarp.md
index 1cc385339..d6c0d1cfd 100644
--- a/src/operators/filter/waveWarp.md
+++ b/src/operators/filter/waveWarp.md
@@ -11,12 +11,16 @@ The `Amplitude` and `Offset` parameters control how much each axis's wave shifts
## Parameters
* `Enable`
-* `Function`
+* `Function`: Type of wave used to offset space.
* `sin`
* `cos`
* `tri`
* `ramp`
+ * `rramp`
* `square`
+ * `addsquare2`
+ * `addsquare4`
+ * `addsquare8`
* `Axis`: The axis along which the waves are produced.
* `x`
* `y`
@@ -26,6 +30,8 @@ The `Amplitude` and `Offset` parameters control how much each axis's wave shifts
* `Phase`: The phase of the waves for each axis.
* `Amplitude`: The scale of the movement for each axis.
* `Offset`: Offsets the movement for each axis.
+* `Phaseoffset`: Offset applied to the wave phase separately for each axis.
+* `Amplitudemult`: Multiplier applied to the wave amplitude separately for each axis.
## Inputs
diff --git a/src/operators/light/ambientLight.md b/src/operators/light/ambientLight.md
new file mode 100644
index 000000000..50d1f2254
--- /dev/null
+++ b/src/operators/light/ambientLight.md
@@ -0,0 +1,19 @@
+Ambient light source that doesn't come from a particular location.
+
+As far as a material is concerned, an ambient light is always right in front of any point on a surface.
+
+Use cases for this are relatively rare.
+
+## Parameters
+
+* `Intensity`: Brightness that is applied to the `Color`.
+* `Color`: Color of the light.
+* `Enableshadow`: Whether the light should produce shadows.
+
+## Inputs
+
+* `colorField`: Field controls the color of the light based on the position of surface hits where it is being applied. The resulting color is multiplied by the `Color` parameter and `Intensity`.
+
+## Variables
+
+* `lightdir`: Direction that the light is from the current position on a surface that's being shaded. This will always be directly in front of whatever point is being shaded based on the surface normal at that point.
\ No newline at end of file
diff --git a/src/operators/light/ambientLight.tox b/src/operators/light/ambientLight.tox
index 8e65712be..c4b33bfd4 100644
Binary files a/src/operators/light/ambientLight.tox and b/src/operators/light/ambientLight.tox differ
diff --git a/src/operators/light/ambientLight.yaml b/src/operators/light/ambientLight.yaml
index dc11613b0..ed4bf714d 100644
--- a/src/operators/light/ambientLight.yaml
+++ b/src/operators/light/ambientLight.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.light.ambientLight
- opVersion: '2'
+ opVersion: '3'
opStatus: beta
opDef: !def
enable: true
@@ -30,6 +30,9 @@ opDef: !def
evalOpts: !evalOpts
excludeFirstRow: true
cols: enable
+ help: !text
+ file: src/operators/light/ambientLight.md
+ name: help
inputs:
- !input
Localalias: colorField
diff --git a/src/operators/light/axisLight.glsl b/src/operators/light/axisLight.glsl
index 2ff81dfcd..cf1ef111d 100644
--- a/src/operators/light/axisLight.glsl
+++ b/src/operators/light/axisLight.glsl
@@ -4,13 +4,14 @@ ReturnT thismap(CoordT p, ContextT ctx) {
#else
vec3 pos = THIS_Position;
#endif
+ pos += ctx.posOffset;
Light light = createLight(pos, THIS_Color * THIS_Intensity);
switch (int(THIS_Axis)) {
case 0: light.pos.x = p.x; break;
case 1: light.pos.y = p.y; break;
case 2: light.pos.z = p.z; break;
}
- pRotateOnXYZ(light.pos, THIS_Rotate);
+ pRotateOnXYZ(light.pos, THIS_Rotate + ctx.rotation);
#ifdef THIS_EXPOSE_lightdir
THIS_lightdir = normalize(light.pos - p);
#endif
diff --git a/src/operators/light/axisLight.md b/src/operators/light/axisLight.md
index f339a5d2c..ae94fc964 100644
--- a/src/operators/light/axisLight.md
+++ b/src/operators/light/axisLight.md
@@ -2,20 +2,25 @@ Light that emits from along an axis, similar to an infinitely long tube light.
## Parameters
-* `Axis`
+* `Axis`: Axis that the limit emits from.
* `x`
* `y`
* `z`
-* `Position`
-* `Rotate`
-* `Intensity`
-* `Color`
-* `Enableattenuation`
-* `Attenuationstart`
-* `Attenuationend`
-* `Enableshadow`
+* `Position`: Position of the light. One axis of this won't be used since the light is infinite along one axis.
+* `Rotate`: Rotates the light source.
+* `Intensity`: Brightness that is applied to the `Color`.
+* `Color`: Color of the light.
+* `Enableattenuation`: Whether to limit the light range.
+* `Attenuationstart`: The distance at which the light starts to dim.
+* `Attenuationend`: The distance at which the light is fully dimmed.
+* `Enableshadow`: Whether the light should produce shadows.
## Inputs
-* `colorField`:
-* `attenuationField`:
\ No newline at end of file
+* `positionField`: Field offsets the position of the light. The coordinates that this field gets are the spot on the surface that the light is being calculated for.
+* `colorField`: Field controls the color of the light based on the position of surface hits where it is being applied. The resulting color is multiplied by the `Color` parameter and `Intensity`.
+* `attenuationField`: Field/function that controls the slope and coloration of the attenuation rolloff is shaped. It can be used to make the light shift from one color to another, or to control the sharpness of the rolloff.
+
+## Variables
+
+* `lightdir`: Direction that the light is from the current position on a surface that's being shaded. This will be the closet point along the chosen axis.
\ No newline at end of file
diff --git a/src/operators/light/axisLight.tox b/src/operators/light/axisLight.tox
index 05584ad46..858e7972c 100644
Binary files a/src/operators/light/axisLight.tox and b/src/operators/light/axisLight.tox differ
diff --git a/src/operators/light/axisLight.yaml b/src/operators/light/axisLight.yaml
index 309c71d8b..41bcc041e 100644
--- a/src/operators/light/axisLight.yaml
+++ b/src/operators/light/axisLight.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.light.axisLight
- opVersion: '12'
+ opVersion: '13'
opStatus: default
opDef: !def
enable: true
diff --git a/src/operators/light/directionalLight.glsl b/src/operators/light/directionalLight.glsl
index ad3cd1585..e5b79cacb 100644
--- a/src/operators/light/directionalLight.glsl
+++ b/src/operators/light/directionalLight.glsl
@@ -1,7 +1,8 @@
ReturnT thismap(CoordT p, ContextT ctx) {
vec3 dir = normalize(THIS_Direction);
- pRotateOnXYZ(dir, THIS_Rotate);
+ pRotateOnXYZ(dir, THIS_Rotate + ctx.rotation);
vec3 pos = p + dir * RAYTK_MAX_DIST;
+ pos += ctx.posOffset;
vec3 col = THIS_Color * THIS_Intensity * clamp(dot(ctx.normal, dir), 0., 1.);
Light light = createLight(pos, col);
#ifdef THIS_EXPOSE_lightdir
diff --git a/src/operators/light/directionalLight.md b/src/operators/light/directionalLight.md
index 19dbcfcea..1e3be2ee4 100644
--- a/src/operators/light/directionalLight.md
+++ b/src/operators/light/directionalLight.md
@@ -1,4 +1,4 @@
-A directional light.
+Directional or distant light which always comes from one direction.
The light always comes from the specified direction, rather than from a point.
@@ -6,14 +6,14 @@ The light always comes from the specified direction, rather than from a point.
* `Direction`: Vector pointing which direction the light shines. This vector is automatically normalized.
* `Intensity`: Brightness that is applied to the `Color`.
-* `Color`
+* `Color`: Color of the light.
* `Rotate`: Rotates the direction of the light on all 3 axes.
-* `Enableshadow`: Whether this light should cast shadows.
+* `Enableshadow`: Whether the light should produce shadows.
## Inputs
-* `colorField`:
+* `colorField`: Field controls the color of the light based on the position of surface hits where it is being applied. The resulting color is multiplied by the `Color` parameter and `Intensity`.
## Variables
-* `RTK_raytk_operators_light_directionalLight_lightdir`:
\ No newline at end of file
+* `lightdir`: Direction that the light is from the current position on a surface that's being shaded. This will always be the Direction with rotation applied.
\ No newline at end of file
diff --git a/src/operators/light/directionalLight.tox b/src/operators/light/directionalLight.tox
index 7adc8cf0a..3e17e2c9d 100644
Binary files a/src/operators/light/directionalLight.tox and b/src/operators/light/directionalLight.tox differ
diff --git a/src/operators/light/directionalLight.yaml b/src/operators/light/directionalLight.yaml
index 2105ceaf9..cd9a712c1 100644
--- a/src/operators/light/directionalLight.yaml
+++ b/src/operators/light/directionalLight.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.light.directionalLight
- opVersion: '12'
+ opVersion: '13'
opStatus: default
opDef: !def
enable: true
diff --git a/src/operators/light/index.tox b/src/operators/light/index.tox
index da5135800..3b307ffb1 100644
Binary files a/src/operators/light/index.tox and b/src/operators/light/index.tox differ
diff --git a/src/operators/light/instanceLight.glsl b/src/operators/light/instanceLight.glsl
new file mode 100644
index 000000000..4420ab46b
--- /dev/null
+++ b/src/operators/light/instanceLight.glsl
@@ -0,0 +1,26 @@
+ReturnT thismap(CoordT p, ContextT ctx) {
+ int n = int(THIS_Instancecount);
+ int i = ctx.index;
+ Light light;
+ #ifdef THIS_HAS_ACTIVE
+ if (IS_FALSE(THIS_actives[i])) {
+ light.absent = true;
+ return light;
+ }
+ #endif
+ setIterationIndex(ctx, i);
+ #ifdef THIS_EXPOSE_index
+ THIS_index = i;
+ #endif
+ #ifdef THIS_EXPOSE_normindex
+ THIS_normindex = float(i) / float(n - 1);
+ #endif
+ #ifdef THIS_HAS_TRANSLATE
+ ctx.posOffset = adaptAsVec3(THIS_translates[i]);
+ #endif
+ #ifdef THIS_HAS_ROTATE
+ ctx.rotation = radians(THIS_rotates[i]);
+ #endif
+ light = inputOp_light(p, ctx);
+ return light;
+}
\ No newline at end of file
diff --git a/src/operators/light/instanceLight.tox b/src/operators/light/instanceLight.tox
new file mode 100644
index 000000000..9950da1b3
Binary files /dev/null and b/src/operators/light/instanceLight.tox differ
diff --git a/src/operators/light/instanceLight.yaml b/src/operators/light/instanceLight.yaml
new file mode 100644
index 000000000..bcdf4fbd0
--- /dev/null
+++ b/src/operators/light/instanceLight.yaml
@@ -0,0 +1,48 @@
+!rop
+meta: !meta
+ opType: raytk.operators.light.instanceLight
+ opVersion: '1'
+ opStatus: default
+opDef: !def
+ enable: !expr
+ expr: op('..').par.Enable
+ typeSpec: !ropTypes
+ coordType: !coordT
+ Coordtypevec3: true
+ contextType: !contextT
+ Contexttypelightcontext: true
+ returnType: !returnT
+ Returntypelight: true
+ function: !text
+ file: src/operators/light/instanceLight.glsl
+ name: function
+ paramGroupTable: eval_params
+ bufferTable: !table
+ file: src/operators/light/instanceLight_buffers.txt
+ name: buffer_table
+ evaluate: true
+ evalOpts: !evalOpts
+ excludeFirstRow: true
+ macroTable: !table
+ file: src/operators/light/instanceLight_macros.txt
+ name: macro_exprs
+ evaluate: true
+ evalOpts: !evalOpts {}
+ variableTable: !table
+ file: src/operators/light/instanceLight_variables.txt
+ name: variable_exprs
+ evaluate: true
+ evalOpts: !evalOpts
+ excludeFirstRow: true
+ cols: enable
+ displayCategory: Light
+inputs:
+- !input
+ Localalias: light
+ Required: true
+ coordType: !coordT
+ Coordtypevec3: true
+ contextType: !contextT
+ Contexttypelightcontext: true
+ returnType: !returnT
+ Returntypelight: true
diff --git a/src/operators/light/instanceLight_buffers.txt b/src/operators/light/instanceLight_buffers.txt
new file mode 100644
index 000000000..d5f0c66e6
--- /dev/null
+++ b/src/operators/light/instanceLight_buffers.txt
@@ -0,0 +1,4 @@
+name enable type chop uniformType length
+'translates' parent().par.Enabletransformchop and parent().par.Enabletranslate 'vec3' op('translateVals') 'uniformarray' parent().par.Instancecount
+'rotates' parent().par.Enabletransformchop and parent().par.Enablerotate 'vec3' op('rotateVals') 'uniformarray' parent().par.Instancecount
+'actives' parent().par.Enableactivechop 'float' op('activeVals') 'uniformarray' parent().par.Instancecount
diff --git a/src/operators/light/instanceLight_macros.txt b/src/operators/light/instanceLight_macros.txt
new file mode 100644
index 000000000..1d8668c50
--- /dev/null
+++ b/src/operators/light/instanceLight_macros.txt
@@ -0,0 +1,4 @@
+1 'RAYTK_LIGHT_COUNT' parent().par.Instancecount
+parent().par.Enabletransformchop and parent().par.Enabletranslate and bool(parent().par.Transformchop) 'THIS_HAS_TRANSLATE'
+parent().par.Enabletransformchop and parent().par.Enablerotate and bool(parent().par.Transformchop) 'THIS_HAS_ROTATE'
+parent().par.Enableactivechop and bool(parent().par.Activechop) 'THIS_HAS_ACTIVE'
diff --git a/src/operators/light/instanceLight_params.txt b/src/operators/light/instanceLight_params.txt
new file mode 100644
index 000000000..c4d1436ad
--- /dev/null
+++ b/src/operators/light/instanceLight_params.txt
@@ -0,0 +1,2 @@
+names source handling readOnlyHandling conversion enable
+Instancecount param runtime macro 1
diff --git a/src/operators/light/instanceLight_variables.txt b/src/operators/light/instanceLight_variables.txt
new file mode 100644
index 000000000..dc1ad0320
--- /dev/null
+++ b/src/operators/light/instanceLight_variables.txt
@@ -0,0 +1,3 @@
+name label dataType enable
+index Index int 1
+normindex Normalized Index (0..1) float 1
diff --git a/src/operators/light/linkedLight.glsl b/src/operators/light/linkedLight.glsl
index a5c20be28..6b00ed30d 100644
--- a/src/operators/light/linkedLight.glsl
+++ b/src/operators/light/linkedLight.glsl
@@ -10,6 +10,7 @@ ReturnT thismap(CoordT p, ContextT ctx) {
#if defined(THIS_lighttype_point)
{
light.pos = lightMat[3].xyz;
+ light.pos += ctx.posOffset;
#ifdef THIS_attenuated
// Based on TDAttenuateLight()
float d = length(p - light.pos);
diff --git a/src/operators/light/linkedLight.md b/src/operators/light/linkedLight.md
index 43eec50ca..6262f8c82 100644
--- a/src/operators/light/linkedLight.md
+++ b/src/operators/light/linkedLight.md
@@ -7,4 +7,5 @@ Not all light types are supported.
## Parameters
* `Light`: The Light COMP to match.
-* `Createlight`: Creates and attaches a new Light COMP.
\ No newline at end of file
+* `Createlight`: Creates and attaches a new Light COMP.
+* `Enableshadow`: Whether the light should produce shadows.
\ No newline at end of file
diff --git a/src/operators/light/linkedLight.tox b/src/operators/light/linkedLight.tox
index 8a8466427..bcbf9e0de 100644
Binary files a/src/operators/light/linkedLight.tox and b/src/operators/light/linkedLight.tox differ
diff --git a/src/operators/light/linkedLight.yaml b/src/operators/light/linkedLight.yaml
index 1ed2dcc20..3b0617dc3 100644
--- a/src/operators/light/linkedLight.yaml
+++ b/src/operators/light/linkedLight.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.light.linkedLight
- opVersion: '8'
+ opVersion: '9'
opStatus: beta
opDef: !def
enable: true
diff --git a/src/operators/light/multiLight.tox b/src/operators/light/multiLight.tox
index 528658fef..aa627959c 100644
Binary files a/src/operators/light/multiLight.tox and b/src/operators/light/multiLight.tox differ
diff --git a/src/operators/light/multiLight.yaml b/src/operators/light/multiLight.yaml
index 65d69a490..57effeb0d 100644
--- a/src/operators/light/multiLight.yaml
+++ b/src/operators/light/multiLight.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.light.multiLight
- opVersion: '10'
+ opVersion: '11'
opStatus: default
opDef: !def
enable: true
diff --git a/src/operators/light/pointLight.glsl b/src/operators/light/pointLight.glsl
index 4533eeead..414fe07f7 100644
--- a/src/operators/light/pointLight.glsl
+++ b/src/operators/light/pointLight.glsl
@@ -4,6 +4,7 @@ ReturnT thismap(CoordT p, ContextT ctx) {
#else
vec3 pos = THIS_Position;
#endif
+ pos += ctx.posOffset;
Light light = createLight(pos, THIS_Color * THIS_Intensity);
#ifdef THIS_EXPOSE_lightdir
THIS_lightdir = normalize(light.pos - p);
diff --git a/src/operators/light/pointLight.md b/src/operators/light/pointLight.md
index 47c9b5f26..1ad3d0fa6 100644
--- a/src/operators/light/pointLight.md
+++ b/src/operators/light/pointLight.md
@@ -1,9 +1,9 @@
-Light eminating from a single point in space, with optional distance attentuation.
+Light that emits from a single point in space.
## Parameters
-* `Position`: The point from which the light eminates.
-* `Intensity`: Brightness of the light.
+* `Position`: The point from which the light emits.
+* `Intensity`: Brightness that is applied to the `Color`.
* `Color`: Color of the light.
* `Enableattenuation`: Whether to limit the light range.
* `Attenuationstart`: The distance at which the light starts to dim.
@@ -11,5 +11,5 @@ Light eminating from a single point in space, with optional distance attentuatio
## Inputs
-* `color_field_definition_in`: Optional field that can control the color of the light based on the position of surface hits where it is being applied. The resulting color is multiplied by the `Color` parameter and `Intensity`.
-* `attenutation_field_definition_in`: Optional field/function that controls the slope and coloration of the attentuation rolloff is shaped. It can be used to make the light shift from one color to another, or to control the sharpness of the rolloff.
\ No newline at end of file
+* `colorField`: Field controls the color of the light based on the position of surface hits where it is being applied. The resulting color is multiplied by the `Color` parameter and `Intensity`.
+* `attenuationField`: Field/function that controls the slope and coloration of the attenuation rolloff is shaped. It can be used to make the light shift from one color to another, or to control the sharpness of the rolloff.
diff --git a/src/operators/light/pointLight.tox b/src/operators/light/pointLight.tox
index 75a2d0f3e..3ca66210e 100644
Binary files a/src/operators/light/pointLight.tox and b/src/operators/light/pointLight.tox differ
diff --git a/src/operators/light/pointLight.yaml b/src/operators/light/pointLight.yaml
index 76cf68f1d..7360aeb85 100644
--- a/src/operators/light/pointLight.yaml
+++ b/src/operators/light/pointLight.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.light.pointLight
- opVersion: '15'
+ opVersion: '16'
opStatus: default
opDef: !def
enable: true
diff --git a/src/operators/light/ringLight.glsl b/src/operators/light/ringLight.glsl
index 031cf93b4..d8d1da19d 100644
--- a/src/operators/light/ringLight.glsl
+++ b/src/operators/light/ringLight.glsl
@@ -1,7 +1,9 @@
ReturnT thismap(CoordT p, ContextT ctx) {
CoordT p0 = p;
CoordT c = THIS_Position;
+ c += ctx.posOffset;
p -= c;
+ pRotateOnXYZ(p, ctx.rotation);
switch (int(THIS_Axis)) {
case THISTYPE_Axis_x: p = p.yxz; break;
case THISTYPE_Axis_y: break;
diff --git a/src/operators/light/ringLight.md b/src/operators/light/ringLight.md
new file mode 100644
index 000000000..c018eecdb
--- /dev/null
+++ b/src/operators/light/ringLight.md
@@ -0,0 +1,20 @@
+Light that emits from a torus or ring shape.
+
+## Parameters
+
+* `Intensity`: Brightness that is applied to the `Color`.
+* `Color`: Color of the light.
+* `Axis`: The axis which the ring faces.
+ * `x`
+ * `y`
+ * `z`
+* `Position`: Center position of the ring.
+* `Radius`: Radius of the ring.
+* `Enableattenuation`: Whether to limit the light range.
+* `Attenuationstart`: The distance at which the light starts to dim.
+* `Attenuationend`: The distance at which the light is fully dimmed.
+* `Enableshadow`: Whether the light should produce shadows.
+
+## Inputs
+
+* `colorField`: Field controls the color of the light based on the position of surface hits where it is being applied. The resulting color is multiplied by the `Color` parameter and `Intensity`.
diff --git a/src/operators/light/ringLight.tox b/src/operators/light/ringLight.tox
index c0850d95b..05a0a3344 100644
Binary files a/src/operators/light/ringLight.tox and b/src/operators/light/ringLight.tox differ
diff --git a/src/operators/light/ringLight.yaml b/src/operators/light/ringLight.yaml
index 7f84e8c68..bff5d4f13 100644
--- a/src/operators/light/ringLight.yaml
+++ b/src/operators/light/ringLight.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.light.ringLight
- opVersion: '3'
+ opVersion: '5'
opStatus: default
opDef: !def
enable: true
@@ -16,6 +16,9 @@ opDef: !def
file: src/operators/light/ringLight.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/light/ringLight.md
+ name: help
inputs:
- !input
Localalias: colorField
diff --git a/src/operators/light/spotLight.glsl b/src/operators/light/spotLight.glsl
index 17d598b01..faed0ee12 100644
--- a/src/operators/light/spotLight.glsl
+++ b/src/operators/light/spotLight.glsl
@@ -3,13 +3,20 @@
ReturnT thismap(CoordT p, ContextT ctx) {
Light light = createLight(THIS_Position, THIS_Color * THIS_Intensity);
+ light.pos += ctx.posOffset;
light.supportShadow = IS_TRUE(THIS_Enableshadow);
#ifdef THIS_HAS_INPUT_colorField
light.color *= fillToVec3(inputOp_colorField(p, ctx));
#endif
{
vec3 spotDir = normalize(THIS_Direction);
- pRotateOnXYZ(spotDir, THIS_Rotate);
+ if (IS_TRUE(THIS_Enablelookat)) {
+ vec3 lookPos = THIS_Lookatpos;
+ lookPos += ctx.lookAtOffset;
+ mat4 m = lookAtViewMatrix(light.pos, lookPos, THIS_Upvec);
+ spotDir = (m * vec4(spotDir, 0.0)).xyz;
+ }
+ pRotateOnXYZ(spotDir, THIS_Rotate + ctx.rotation);
float innerCutoffCos = cos(radians(THIS_Coneangle));
float outerCutoffCos = cos(radians(THIS_Coneangle + THIS_Conedelta));
vec3 lightDir = light.pos - p;
diff --git a/src/operators/light/spotLight.md b/src/operators/light/spotLight.md
index 753db1769..f1fddf2a3 100644
--- a/src/operators/light/spotLight.md
+++ b/src/operators/light/spotLight.md
@@ -4,17 +4,23 @@ This is similar to the Light COMP in spotlight mode.
## Parameters
-* `Intensity`
-* `Color`
+* `Intensity`: Brightness that is applied to the `Color`.
+* `Color`: Color of the light.
* `Position`: The position of the tip of the light cone.
* `Direction`: The direction which the cone faces, as a vector.
* `Coneangle`: The width of the cone.
-* `Conedelta`: The amount of blending between the inside and outside of the cone.
-* `Enableattenuation`: Whether to adjust the amount of light depending on distance.
-* `Attenuationstart`: The start of the blending range, inside which the light will be at full intensity.
-* `Attenuationend`: The end of the blending range, outside which the light will be at zero intensity.
+* `Conedelta`: The amount of blending between the inside and the outside of the cone.
+* `Enableattenuation`: Whether to limit the light range.
+* `Attenuationstart`: The distance at which the light starts to dim.
+* `Attenuationend`: The distance at which the light is fully dimmed.
+* `Rotate`: Rotation for the direction that the light faces.
+* `Enablelookat`: Whether the light should face a specific position.
+* `Lookatpos`: Coordinates that the light should face.
+* `Upvec`: Up vector used to orient the light.
+* `Enableshadow`: Whether the light should produce shadows.
## Inputs
-* `color_field_definition_in`: Optional field that controls the color of the light.
-* `attenutation_field_definition_in`: Optional function that controls the color/intensity of the light based on the attenuation distance.
\ No newline at end of file
+* `colorField`: Optional field that controls the color of the light.
+* `colorField`: Field controls the color of the light based on the position of surface hits where it is being applied. The resulting color is multiplied by the `Color` parameter and `Intensity`.
+* `attenuationField`: Field/function that controls the slope and coloration of the attenuation rolloff is shaped. It can be used to make the light shift from one color to another, or to control the sharpness of the rolloff.
diff --git a/src/operators/light/spotLight.tox b/src/operators/light/spotLight.tox
index ac863c5a8..254592315 100644
Binary files a/src/operators/light/spotLight.tox and b/src/operators/light/spotLight.tox differ
diff --git a/src/operators/light/spotLight.yaml b/src/operators/light/spotLight.yaml
index c961599fa..7788291db 100644
--- a/src/operators/light/spotLight.yaml
+++ b/src/operators/light/spotLight.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.light.spotLight
- opVersion: '12'
+ opVersion: '14'
opStatus: default
opDef: !def
enable: true
diff --git a/src/operators/light/spotLight_params.txt b/src/operators/light/spotLight_params.txt
index 380662676..234fe8783 100644
--- a/src/operators/light/spotLight_params.txt
+++ b/src/operators/light/spotLight_params.txt
@@ -1,4 +1,4 @@
names source handling readOnlyHandling conversion enable
-Position[xyz] Direction[xyz] Color[rgb] Intensity Coneangle Conedelta Attenuationstart Attenuationend param runtime macro 1
-Enableattenuation Enableshadow param runtime constant 1
+Position[xyz] Direction[xyz] Color[rgb] Intensity Coneangle Conedelta Attenuationstart Attenuationend Lookatpos[xyz] Upvec[xyz] param runtime macro 1
+Enableattenuation Enableshadow Enablelookat param runtime constant 1
Rotate[xyz] param runtime macro angle 1
diff --git a/src/operators/material/basicMat.glsl b/src/operators/material/basicMat.glsl
index 949b45b0c..9fc4d2b06 100644
--- a/src/operators/material/basicMat.glsl
+++ b/src/operators/material/basicMat.glsl
@@ -21,19 +21,46 @@ ReturnT thismap(CoordT p, ContextT ctx) {
return res;
}
+vec3 THIS_getColorForLight(
+ CoordT p, MaterialContext matCtx,
+ Light light, int lightIndex, float shadedLevel,
+ vec3 baseColor) {
+ if (light.absent) { return vec3(0.); }
+
+ #ifdef THIS_EXPOSE_lightcolor
+ THIS_lightcolor = light.color;
+ #endif
+ #ifdef THIS_EXPOSE_lightpos
+ THIS_lightpos = light.pos;
+ #endif
+
+ matCtx.light = light;
+ matCtx.lightIndex = lightIndex;
+ matCtx.shadedLevel = shadedLevel;
+
+ vec3 sunDir = normalize(light.pos);
+ vec3 mate = baseColor;
+ vec3 sunColor = light.color;
+ vec3 skyColor = THIS_Skycolor;
+ float sunDiffuse = clamp(dot(matCtx.normal, sunDir), 0, 1.);
+ float sunShadow = 1.;
+ #if defined(THIS_Enableshadow) && defined(RAYTK_USE_SHADOW)
+ sunShadow = shadedLevel;
+ #endif
+ float skyDiffuse = clamp(0.5+0.5*dot(matCtx.normal, THIS_Skydir), 0, 1);
+ float sunSpec = pow(max(dot(-matCtx.ray.dir, matCtx.normal), 0.), THIS_Specularexp) * THIS_Specularamount;
+ vec3 col = mate * sunColor * sunDiffuse * sunShadow;
+ col += mate * skyColor * skyDiffuse;
+ col += mate * sunColor * sunSpec;
+ return col;
+}
+
vec3 THIS_getColor(vec3 p, MaterialContext matCtx) {
restoreIterationFromMaterial(matCtx, THIS_iterationCapture);
- vec3 sunDir = normalize(matCtx.light.pos);
vec3 baseColor = THIS_Basecolor;
#ifdef THIS_EXPOSE_normal
THIS_normal = matCtx.normal;
#endif
- #ifdef THIS_EXPOSE_lightcolor
- THIS_lightcolor = matCtx.light.color;
- #endif
- #ifdef THIS_EXPOSE_lightpos
- THIS_lightpos = matCtx.light.pos;
- #endif
#if defined(THIS_Usesurfacecolor) && defined(RAYTK_USE_SURFACE_COLOR)
if (matCtx.result.color.w > 0.) {
baseColor *= matCtx.result.color.rgb;
@@ -69,19 +96,14 @@ vec3 THIS_getColor(vec3 p, MaterialContext matCtx) {
#endif
}
#endif
- vec3 mate = baseColor;
- vec3 sunColor = matCtx.light.color;
- vec3 skyColor = THIS_Skycolor;
- float sunDiffuse = clamp(dot(matCtx.normal, sunDir), 0, 1.);
- float sunShadow = 1.;
- #if defined(THIS_Enableshadow) && defined(RAYTK_USE_SHADOW)
- sunShadow = matCtx.shadedLevel;
+ vec3 col = baseColor;
+ #if RAYTK_LIGHT_COUNT > 1
+ for (int i = 0; i < RAYTK_LIGHT_COUNT; i++) {
+ col = THIS_getColorForLight(p, matCtx, matCtx.allLights[i], i, matCtx.allShadedLevels[i], col);
+ }
+ #else
+ col = THIS_getColorForLight(p, matCtx, matCtx.light, 0, matCtx.shadedLevel, col);
#endif
- float skyDiffuse = clamp(0.5+0.5*dot(matCtx.normal, THIS_Skydir), 0, 1);
- float sunSpec = pow(max(dot(-matCtx.ray.dir, matCtx.normal), 0.), THIS_Specularexp) * THIS_Specularamount;
- vec3 col = mate * sunColor * sunDiffuse * sunShadow;
- col += mate * skyColor * skyDiffuse;
- col += mate * sunColor * sunSpec;
float occ = matCtx.ao;
col *= mix(vec3(0.5), vec3(1.5), occ);
return col;
diff --git a/src/operators/material/basicMat.tox b/src/operators/material/basicMat.tox
index 8945dbcab..2be3aa648 100644
Binary files a/src/operators/material/basicMat.tox and b/src/operators/material/basicMat.tox differ
diff --git a/src/operators/material/basicMat.yaml b/src/operators/material/basicMat.yaml
index 6f541b411..16b21bca1 100644
--- a/src/operators/material/basicMat.yaml
+++ b/src/operators/material/basicMat.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.material.basicMat
- opVersion: '31'
+ opVersion: '33'
opStatus: default
opDef: !def
enable: !expr
diff --git a/src/operators/material/diffuseContrib.glsl b/src/operators/material/diffuseContrib.glsl
index 169270582..13340957c 100644
--- a/src/operators/material/diffuseContrib.glsl
+++ b/src/operators/material/diffuseContrib.glsl
@@ -1,9 +1,36 @@
-ReturnT thismap(CoordT p, ContextT ctx) {
- if (IS_FALSE(THIS_Enable)) return ReturnT(0.);
-
+ReturnT THIS_calc(
+ CoordT p, ContextT ctx,
+ float roughness, float albedo
+) {
+ if (ctx.light.absent) {return ReturnT(0);}
vec3 lightDir = normalize(p - ctx.light.pos);
vec3 viewDir = normalize(-ctx.ray.dir);
vec3 norm = normalize(ctx.normal);
+
+ float amount;
+ BODY();
+
+ ReturnT res;
+ #if defined(THIS_RETURN_TYPE_float)
+ res = ReturnT(amount);
+ #elif defined(THIS_RETURN_TYPE_vec4)
+ res = vec4(vec3(amount), 0.0);
+ if (THIS_Uselightcolor) {
+ res.rgb *= ctx.light.color;
+ }
+ #else
+ #error invalidReturnType
+ #endif
+
+ #if defined(THIS_Enableshadow) && defined(RAYTK_USE_SHADOW)
+ res *= ctx.shadedLevel;
+ #endif
+ return res;
+}
+
+ReturnT thismap(CoordT p, ContextT ctx) {
+ if (IS_FALSE(THIS_Enable)) return ReturnT(0.);
+
#ifdef THIS_HAS_INPUT_roughnessField
float roughness = inputOp_roughnessField(p, ctx);
#else
@@ -14,32 +41,21 @@ ReturnT thismap(CoordT p, ContextT ctx) {
#else
float albedo = THIS_Albedo;
#endif
- float amount;
- BODY();
- amount *= THIS_Level;
- ReturnT res;
- #if defined(THIS_RETURN_TYPE_float)
- res = ReturnT(amount);
- #elif defined(THIS_RETURN_TYPE_vec4)
+ ReturnT res = ReturnT(0);
+ res = THIS_calc(p, ctx, roughness, albedo);
+ #if defined(THIS_RETURN_TYPE_vec4)
{
- res = vec4(amount * THIS_Color, 0.0);
+ res.rgb *= THIS_Color;
#ifdef THIS_HAS_INPUT_colorField
res.rgb *= fillToVec3(inputOp_colorField(p, ctx));
#endif
- if (THIS_Uselightcolor) {
- res.rgb *= ctx.light.color;
- }
#ifdef RAYTK_USE_SURFACE_COLOR
if (THIS_Usesurfacecolor) {
res.rgb *= mix(vec3(1.), ctx.result.color.rgb, ctx.result.color.a);
}
#endif
}
- #else
- #error invalidReturnType
- #endif
- #if defined(THIS_Enableshadow) && defined(RAYTK_USE_SHADOW)
- res *= ctx.shadedLevel;
#endif
+ res *= THIS_Level;
return res;
}
\ No newline at end of file
diff --git a/src/operators/material/diffuseContrib.tox b/src/operators/material/diffuseContrib.tox
index bf2732ae6..1de9d31a4 100644
Binary files a/src/operators/material/diffuseContrib.tox and b/src/operators/material/diffuseContrib.tox differ
diff --git a/src/operators/material/diffuseContrib.yaml b/src/operators/material/diffuseContrib.yaml
index b5b3dafe3..3a2b6f1d6 100644
--- a/src/operators/material/diffuseContrib.yaml
+++ b/src/operators/material/diffuseContrib.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.material.diffuseContrib
- opVersion: '28'
+ opVersion: '30'
opStatus: default
opDef: !def
enable: !expr
diff --git a/src/operators/material/matCapContrib.md b/src/operators/material/matCapContrib.md
new file mode 100644
index 000000000..465b59f79
--- /dev/null
+++ b/src/operators/material/matCapContrib.md
@@ -0,0 +1,20 @@
+Shading using a MatCap (Material Capture) image to fake lighting and reflections.
+
+MatCap images are available on [github](https://github.com/nidorx/matcaps).
+
+Note that this shading does not use actual lights or reflections, it's a shortcut that fakes those things which are pre-computed and baked into the images that the shading is based on.
+
+This approach is commonly used in sculpting tools like zBrush.
+
+## Parameters
+
+* `Enable`
+* `Level`
+* `Rotate`
+* `Texturetop`
+* `Texturefile`
+* `Enableshadow`
+
+## Inputs
+
+* `rotateField`:
\ No newline at end of file
diff --git a/src/operators/material/matCapContrib.tox b/src/operators/material/matCapContrib.tox
index ddb5a3105..ffa55d1fa 100644
Binary files a/src/operators/material/matCapContrib.tox and b/src/operators/material/matCapContrib.tox differ
diff --git a/src/operators/material/matCapContrib.yaml b/src/operators/material/matCapContrib.yaml
index a2586780e..bffcac0f5 100644
--- a/src/operators/material/matCapContrib.yaml
+++ b/src/operators/material/matCapContrib.yaml
@@ -32,6 +32,9 @@ opDef: !def
evalOpts: !evalOpts
excludeFirstRow: true
cols: enable
+ help: !text
+ file: src/operators/material/matCapContrib.md
+ name: help
displayCategory: Material Element
inputs:
- !input
diff --git a/src/operators/material/modularMat.glsl b/src/operators/material/modularMat.glsl
index c3d61958d..40b0ec10d 100644
--- a/src/operators/material/modularMat.glsl
+++ b/src/operators/material/modularMat.glsl
@@ -29,6 +29,43 @@ ReturnT thismap(CoordT p, ContextT ctx) {
return res;
}
+vec3 THIS_getColorForLight(
+ CoordT p, MaterialContext matCtx,
+ Light light, int lightIndex, float shadedLevel) {
+ vec3 col = vec3(0.);
+
+ if (light.absent && lightIndex > 0) { return vec3(0.); }
+
+ #ifdef THIS_EXPOSE_shadedlevel
+ {
+ THIS_shadedlevel = 1.;
+ #ifdef RAYTK_USE_SHADOW
+ if (matCtx.result.useShadow) {
+ THIS_shadedlevel = shadedLevel;
+ }
+ #endif
+ }
+ #endif
+ #ifdef THIS_EXPOSE_lightcolor
+ THIS_lightcolor = light.color;
+ #endif
+ #ifdef THIS_EXPOSE_lightpos
+ THIS_lightpos = light.pos;
+ #endif
+
+ matCtx.light = light;
+ matCtx.lightIndex = lightIndex;
+ matCtx.shadedLevel = shadedLevel;
+
+ AGGREGATE_BODY();
+
+ #ifdef THIS_Uselightcolor
+ col *= light.color;
+ #endif
+
+ return col;
+}
+
vec3 THIS_getColor(CoordT p, MaterialContext matCtx) {
restoreIterationFromMaterial(matCtx, THIS_iterationCapture);
CoordT mp = THIS_asCoordT(getPosForMaterial(adaptAsVec3(p), matCtx));
@@ -44,22 +81,6 @@ vec3 THIS_getColor(CoordT p, MaterialContext matCtx) {
#ifdef THIS_EXPOSE_normal
THIS_normal = matCtx.normal;
#endif
- #ifdef THIS_EXPOSE_shadedlevel
- {
- THIS_shadedlevel = 1.;
- #ifdef RAYTK_USE_SHADOW
- if (matCtx.result.useShadow) {
- THIS_shadedlevel = matCtx.shadedLevel;
- }
- #endif
- }
- #endif
- #ifdef THIS_EXPOSE_lightcolor
- THIS_lightcolor = matCtx.light.color;
- #endif
- #ifdef THIS_EXPOSE_lightpos
- THIS_lightpos = matCtx.light.pos;
- #endif
#ifdef THIS_EXPOSE_sdf
THIS_sdf = matCtx.result;
#endif
@@ -93,30 +114,15 @@ vec3 THIS_getColor(CoordT p, MaterialContext matCtx) {
}
#endif
vec3 col = THIS_Basecolor;
- #ifdef THIS_Uselightcolor
- col *= matCtx.light.color;
- #endif
- #ifdef THIS_HAS_INPUT_shading1
- col += fillToVec3(inputOp_shading1(mp, matCtx));
- #endif
- #ifdef THIS_HAS_INPUT_shading2
- col += fillToVec3(inputOp_shading2(mp, matCtx));
- #endif
- #ifdef THIS_HAS_INPUT_shading3
- col += fillToVec3(inputOp_shading3(mp, matCtx));
- #endif
- #ifdef THIS_HAS_INPUT_shading4
- col += fillToVec3(inputOp_shading4(mp, matCtx));
- #endif
- #ifdef THIS_HAS_INPUT_shading5
- col += fillToVec3(inputOp_shading5(mp, matCtx));
- #endif
- #ifdef THIS_HAS_INPUT_shading6
- col += fillToVec3(inputOp_shading6(mp, matCtx));
- #endif
- #ifdef THIS_HAS_INPUT_shading7
- col += fillToVec3(inputOp_shading7(mp, matCtx));
+
+ #if RAYTK_LIGHT_COUNT > 1
+ for (int i = 0; i < RAYTK_LIGHT_COUNT; i++) {
+ col += THIS_getColorForLight(mp, matCtx, matCtx.allLights[i], i, matCtx.allShadedLevels[i]);
+ }
+ #else
+ col += THIS_getColorForLight(mp, matCtx, matCtx.light, 0, matCtx.shadedLevel);
#endif
+
#ifdef THIS_Enableao
col *= sqrt(ao);
#endif
diff --git a/src/operators/material/modularMat.tox b/src/operators/material/modularMat.tox
index ff0c16e69..971eb1f42 100644
Binary files a/src/operators/material/modularMat.tox and b/src/operators/material/modularMat.tox differ
diff --git a/src/operators/material/modularMat.yaml b/src/operators/material/modularMat.yaml
index 1bbbce161..349bbddc2 100644
--- a/src/operators/material/modularMat.yaml
+++ b/src/operators/material/modularMat.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.material.modularMat
- opVersion: '29'
+ opVersion: '30'
opStatus: default
opDef: !def
enable: !expr
@@ -136,6 +136,21 @@ multiInput: !multiInput
Returntypefloat: true
Returntypevec4: true
elements:
+- !opElement
+ name: aggregateCodeGenerator
+ elementType: aggregateCodeGenerator
+ params:
+ Startindex: 0
+ Exprindexoffset: 0
+ Reverseorder: false
+ Initmode: separate
+ Numberingmode: available
+ Startstmt: ''
+ Defaultstmt: ''
+ Firststepstmt: ''
+ Stepstmt: !expr
+ expr: op('stepTemplate').text
+ Bodycodeplaceholder: AGGREGATE_BODY();
- !opElement
name: codeSwitcher_Condition
elementType: codeSwitcher
diff --git a/src/operators/material/modularMat_stepTemplate.glsl b/src/operators/material/modularMat_stepTemplate.glsl
new file mode 100644
index 000000000..d64e670ac
--- /dev/null
+++ b/src/operators/material/modularMat_stepTemplate.glsl
@@ -0,0 +1,9 @@
+#ifdef THIS_HAS_INPUT_shading$
+if (false) {}
+#if !defined(inputOp_shading$_HAS_TAG_uselight) && !defined(inputOp_shading$_HAS_TAG_useshadow)
+else if (light.absent && lightIndex > 0) {}
+#endif
+else {
+ col += fillToVec3(inputOp_shading$(p, matCtx));
+}
+#endif
\ No newline at end of file
diff --git a/src/operators/material/pbrMat.glsl b/src/operators/material/pbrMat.glsl
index 4b64f89c6..8fe8a98ef 100644
--- a/src/operators/material/pbrMat.glsl
+++ b/src/operators/material/pbrMat.glsl
@@ -53,6 +53,24 @@ vec3 THIS_reflectanceMap(vec3 p, MaterialContext matCtx, vec3 refl, float roughn
return mix(reflectMap, blurMap, roughness);
}
+//vec3 THIS_getColorForLight(
+// CoordT p, MaterialContext matCtx,
+// Light light, int lightIndex, float shadedLevel,
+// float roughness, float metallic,
+// vec3 baseColor
+//) {
+// vec3 lightDir = normalize(p - light.pos);
+// vec3 viewDir = normalize(-matCtx.ray.dir);
+//
+// float roughness = THIS_Roughness;
+// float metallic = THIS_Metallic;
+// matCtx.light = light;
+// matCtx.lightIndex = lightIndex;
+// matCtx.shadedLevel = shadedLevel;
+//
+// return vec3(0);
+//}
+
vec3 THIS_getColor(vec3 p, MaterialContext matCtx) {
restoreIterationFromMaterial(matCtx, THIS_iterationCapture);
vec3 mp = getPosForMaterial(p, matCtx);
diff --git a/src/operators/material/pbrMat.tox b/src/operators/material/pbrMat.tox
index b97151717..664f0006c 100644
Binary files a/src/operators/material/pbrMat.tox and b/src/operators/material/pbrMat.tox differ
diff --git a/src/operators/material/pbrMat.yaml b/src/operators/material/pbrMat.yaml
index 9e8b95e41..46ed5d8b7 100644
--- a/src/operators/material/pbrMat.yaml
+++ b/src/operators/material/pbrMat.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.material.pbrMat
- opVersion: '18'
+ opVersion: '19'
opStatus: beta
opDef: !def
enable: !expr
diff --git a/src/operators/material/reflectMat.glsl b/src/operators/material/reflectMat.glsl
index e3dc53d7f..c64fffbdd 100644
--- a/src/operators/material/reflectMat.glsl
+++ b/src/operators/material/reflectMat.glsl
@@ -17,17 +17,15 @@ ReturnT thismap(CoordT p, ContextT ctx) {
return res;
}
-vec3 THIS_getColor(vec3 p, MaterialContext matCtx) {
- restoreIterationFromMaterial(matCtx, THIS_iterationCapture);
- float sunShadow = 1.;
- #if defined(THIS_Enableshadow) && defined(RAYTK_USE_SHADOW)
- sunShadow = matCtx.shadedLevel;
- #endif
- vec3 col = THIS_Color;
+vec3 THIS_getColorForLight(
+ CoordT p, MaterialContext matCtx,
+ Light light, float shadedLevel,
+ vec3 col) {
+ if (light.absent) return col;
float ks = THIS_Ks;
float sky = 0.5 + 0.5 * matCtx.normal.y;
float fre = clamp(1.0 + dot(matCtx.normal, matCtx.ray.dir), 0.0, 1.0);
- vec3 lightDir = normalize(matCtx.light.pos - p);
+ vec3 lightDir = normalize(light.pos - p);
float spe = pow(max(dot(matCtx.ray.dir, reflect(lightDir, matCtx.normal)), 0), THIS_Shine);
float occ = matCtx.ao;
vec3 lin = 3.0*vec3(0.7,0.80,1.00)*sky*occ;
@@ -35,7 +33,26 @@ vec3 THIS_getColor(vec3 p, MaterialContext matCtx) {
col += 0.3*ks*4.0*vec3(0.7,0.8,1.00)*smoothstep(0.0,0.2,matCtx.reflectColor.y)*(0.05+0.95*pow(fre,5.0))*(0.5+0.5*matCtx.normal.y)*occ;
col += 4.0*ks*1.5*spe*occ*col.r;
col += 2.0*ks*1.0*pow(spe,8.0)*occ*col.r;
- col *= lin * matCtx.light.color;
+ col *= lin * light.color;
+
+ return col;
+}
+
+vec3 THIS_getColor(vec3 p, MaterialContext matCtx) {
+ restoreIterationFromMaterial(matCtx, THIS_iterationCapture);
+ float sunShadow = 1.;
+ #if defined(THIS_Enableshadow) && defined(RAYTK_USE_SHADOW)
+ sunShadow = matCtx.shadedLevel;
+ #endif
+ vec3 col = THIS_Color;
+
+ #if RAYTK_LIGHT_COUNT > 1
+ for (int i = 0; i < RAYTK_LIGHT_COUNT; i++) {
+ col += THIS_getColorForLight(p, matCtx, matCtx.allLights[i], matCtx.allShadedLevels[i], col);
+ }
+ #else
+ col += THIS_getColorForLight(p, matCtx, matCtx.light, matCtx.shadedLevel, col);
+ #endif
vec3 reflContrib = matCtx.reflectColor*THIS_Reflectionamount*((1-THIS_Fresnel)+(THIS_Fresnel*clamp(1-dot(-matCtx.ray.dir,matCtx.normal),0,1)));
col += reflContrib;
diff --git a/src/operators/material/reflectMat.tox b/src/operators/material/reflectMat.tox
index 6019729c1..3ce15e661 100644
Binary files a/src/operators/material/reflectMat.tox and b/src/operators/material/reflectMat.tox differ
diff --git a/src/operators/material/reflectMat.yaml b/src/operators/material/reflectMat.yaml
index 834536bec..712b56919 100644
--- a/src/operators/material/reflectMat.yaml
+++ b/src/operators/material/reflectMat.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.material.reflectMat
- opVersion: '17'
+ opVersion: '18'
opStatus: beta
opDef: !def
enable: !expr
diff --git a/src/operators/material/rimContrib.md b/src/operators/material/rimContrib.md
new file mode 100644
index 000000000..f5fadbca8
--- /dev/null
+++ b/src/operators/material/rimContrib.md
@@ -0,0 +1,26 @@
+Shading that is applied to the edges of a surface relative to where it's viewed from.
+
+This is similar to the Rim Light feature in a standard Phong MAT.
+
+Using rim shading can result in aliasing issues, since it's essentially highlighting the areas that are most likely to have aliasing.
+
+## Parameters
+
+* `Enable`: When off, this shading will produce values of 0, meaning no contribution to shading.
+* `Level`: Brightness of the shading, which is used as a multiplier for the Color.
+* `Usecolor`: Whether to produce color or just a brightness value.
+* `Color`: Color of the shading.
+* `Usesurfacecolor`: Whether this shading should take into account the surface color attribute on the SDF (if present).
+* `Enableshadow`: Whether to apply the shadow to the color/level produced by this element.
+* `Thickness`: Width of the highlight area on the sides.
+* `Blending`: Amount of fading between highlighted and not highlighted areas.
+
+## Inputs
+
+* `thicknessField`:
+* `blendingField`:
+* `colorField`:
+
+## Variables
+
+* `normangle`:
\ No newline at end of file
diff --git a/src/operators/material/rimContrib.tox b/src/operators/material/rimContrib.tox
index 173aa065f..e3bb3ea63 100644
Binary files a/src/operators/material/rimContrib.tox and b/src/operators/material/rimContrib.tox differ
diff --git a/src/operators/material/rimContrib.yaml b/src/operators/material/rimContrib.yaml
index fa607ebbd..e2493bd9c 100644
--- a/src/operators/material/rimContrib.yaml
+++ b/src/operators/material/rimContrib.yaml
@@ -35,6 +35,9 @@ opDef: !def
evalOpts: !evalOpts
excludeFirstRow: true
cols: enable
+ help: !text
+ file: src/operators/material/rimContrib.md
+ name: help
displayCategory: Material Element
inputs:
- !input
diff --git a/src/operators/material/sampledPointMat.glsl b/src/operators/material/sampledPointMat.glsl
index 7fff8cf95..c4861eadb 100644
--- a/src/operators/material/sampledPointMat.glsl
+++ b/src/operators/material/sampledPointMat.glsl
@@ -56,7 +56,17 @@ vec3 THIS_getColor(CoordT p, MaterialContext matCtx) {
THIS_sdf = matCtx.result;
#endif
vec3 col = vec3(0.);
- float d = matCtx.result.x - THIS_Offset;
+ #ifdef THIS_HAS_INPUT_offsetField
+ float o = inputOp_offsetField(mp, matCtx);
+ #else
+ float o = THIS_Offset;
+ #endif
+ #ifdef THIS_HAS_INPUT_blendingField
+ float b = max(0., inputOp_blendingField(mp, matCtx));
+ #else
+ float b = THIS_Blending;
+ #endif
+ float d = matCtx.result.x - o;
if (IS_TRUE(THIS_Enablefill)) {
vec3 fillColor = THIS_Fillcolor;
#ifdef THIS_HAS_INPUT_fillColorField
@@ -69,7 +79,7 @@ vec3 THIS_getColor(CoordT p, MaterialContext matCtx) {
fillColor *= fillToVec3(inputOp_fillColorField(q, matCtx));
}
#endif
- col += fillColor * (1.0 - smoothstep(0, THIS_Blending, max(d, 0.)));
+ col += fillColor * (1.0 - smoothstep(0, b, max(d, 0.)));
}
if (IS_TRUE(THIS_Enableedge)) {
vec3 edgeColor = THIS_Edgecolor;
@@ -83,7 +93,7 @@ vec3 THIS_getColor(CoordT p, MaterialContext matCtx) {
edgeColor *= fillToVec3(inputOp_edgeColorField(q, matCtx));
}
#endif
- col += edgeColor * (1.0 - smoothstep(THIS_Edgethickness - THIS_Blending / 2., THIS_Edgethickness + THIS_Blending/2., abs(d)));
+ col += edgeColor * (1.0 - smoothstep(THIS_Edgethickness - b / 2., THIS_Edgethickness + b/2., abs(d)));
}
#ifdef RAYTK_USE_SURFACE_COLOR
if (IS_TRUE(THIS_Usesurfacecolor) && matCtx.result.color.w > 0.) {
diff --git a/src/operators/material/sampledPointMat.tox b/src/operators/material/sampledPointMat.tox
index 1842d310b..61c973d31 100644
Binary files a/src/operators/material/sampledPointMat.tox and b/src/operators/material/sampledPointMat.tox differ
diff --git a/src/operators/material/sampledPointMat.yaml b/src/operators/material/sampledPointMat.yaml
index 71a441584..9b7bc533e 100644
--- a/src/operators/material/sampledPointMat.yaml
+++ b/src/operators/material/sampledPointMat.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.material.sampledPointMat
- opVersion: '27'
+ opVersion: '28'
opStatus: default
opDef: !def
enable: !expr
@@ -50,9 +50,33 @@ inputs:
Contexttypecontext: true
returnType: !returnT
Returntypesdf: true
+- !input
+ Localalias: offsetField
+ Variables: '*'
+ coordType: !coordT
+ Coordtypefloat: true
+ Coordtypevec2: true
+ Coordtypevec3: true
+ contextType: !contextT
+ Contexttypematerialcontext: true
+ returnType: !returnT
+ Returntypefloat: true
+- !input
+ Localalias: blendingField
+ Variables: '*'
+ Variableinputs: offsetField
+ coordType: !coordT
+ Coordtypefloat: true
+ Coordtypevec2: true
+ Coordtypevec3: true
+ contextType: !contextT
+ Contexttypematerialcontext: true
+ returnType: !returnT
+ Returntypefloat: true
- !input
Localalias: fillColorField
Variables: '*'
+ Variableinputs: offsetField blendingField
coordType: !coordT
Coordtypefloat: true
Coordtypevec2: true
@@ -65,7 +89,7 @@ inputs:
- !input
Localalias: edgeColorField
Variables: '*'
- Variableinputs: fillColorField
+ Variableinputs: offsetField blendingField fillColorField
coordType: !coordT
Coordtypefloat: true
Coordtypevec2: true
diff --git a/src/operators/material/sampledPointMat_params.txt b/src/operators/material/sampledPointMat_params.txt
index 44017d5e3..01e20f630 100644
--- a/src/operators/material/sampledPointMat_params.txt
+++ b/src/operators/material/sampledPointMat_params.txt
@@ -1,4 +1,6 @@
names source handling readOnlyHandling conversion enable
Uselocalpos param macro 1
Enablefill Enableedge Usesurfacecolor param runtime constant 1
-Fillcolor[rgb] Blending Edgecolor[rgb] Edgethickness Offset param runtime macro 1
+Fillcolor[rgb] Edgecolor[rgb] Edgethickness param runtime macro 1
+Offset param runtime macro op('offset_definition').numRows < 2
+Blending param runtime macro op('blending_definition').numRows < 2
diff --git a/src/operators/material/specularContrib.glsl b/src/operators/material/specularContrib.glsl
index 7f81ddb05..f1a999603 100644
--- a/src/operators/material/specularContrib.glsl
+++ b/src/operators/material/specularContrib.glsl
@@ -1,3 +1,33 @@
+ReturnT THIS_calc(
+ CoordT p, ContextT ctx,
+ float shininess, float roughness, float fresnel
+) {
+ if (ctx.light.absent) {return ReturnT(0);}
+ vec3 lightDir = normalize(p - ctx.light.pos);
+ vec3 viewDir = normalize(-ctx.ray.dir);
+ vec3 norm = normalize(ctx.normal);
+
+ float amount;
+ BODY();
+
+ ReturnT res;
+ #if defined(THIS_RETURN_TYPE_float)
+ res = ReturnT(amount);
+ #elif defined(THIS_RETURN_TYPE_vec4)
+ res = vec4(vec3(amount), 0.0);
+ if (THIS_Uselightcolor) {
+ res.rgb *= ctx.light.color;
+ }
+ #else
+ #error invalidReturnType
+ #endif
+
+ #if defined(THIS_Enableshadow) && defined(RAYTK_USE_SHADOW)
+ res *= ctx.shadedLevel;
+ #endif
+ return res;
+}
+
ReturnT thismap(CoordT p, ContextT ctx) {
if (IS_FALSE(THIS_Enable)) return ReturnT(0.);
@@ -19,32 +49,21 @@ ReturnT thismap(CoordT p, ContextT ctx) {
#else
float fresnel = THIS_Fresnel;
#endif
- float amount;
- BODY();
- amount *= THIS_Level;
- ReturnT res;
- #if defined(THIS_RETURN_TYPE_float)
- res = ReturnT(amount);
- #elif defined(THIS_RETURN_TYPE_vec4)
+ ReturnT res = ReturnT(0);
+ res = THIS_calc(p, ctx, shininess, roughness, fresnel);
+ #if defined(THIS_RETURN_TYPE_vec4)
{
- res = vec4(amount * THIS_Color, 0.0);
+ res.rgb *= THIS_Color;
#ifdef THIS_HAS_INPUT_colorField
res.rgb *= fillToVec3(inputOp_colorField(p, ctx));
#endif
- if (THIS_Uselightcolor) {
- res.rgb *= ctx.light.color;
- }
#ifdef RAYTK_USE_SURFACE_COLOR
if (THIS_Usesurfacecolor) {
res.rgb *= mix(vec3(1.), ctx.result.color.rgb, ctx.result.color.a);
}
#endif
}
- #else
- #error invalidReturnType
- #endif
- #if defined(THIS_Enableshadow) && defined(RAYTK_USE_SHADOW)
- res *= ctx.shadedLevel;
#endif
+ res *= THIS_Level;
return res;
}
\ No newline at end of file
diff --git a/src/operators/material/specularContrib.tox b/src/operators/material/specularContrib.tox
index 63f23d3f7..11e81647e 100644
Binary files a/src/operators/material/specularContrib.tox and b/src/operators/material/specularContrib.tox differ
diff --git a/src/operators/material/specularContrib.yaml b/src/operators/material/specularContrib.yaml
index 855e71cb9..8405d2202 100644
--- a/src/operators/material/specularContrib.yaml
+++ b/src/operators/material/specularContrib.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.material.specularContrib
- opVersion: '26'
+ opVersion: '28'
opStatus: default
opDef: !def
enable: !expr
@@ -95,6 +95,6 @@ elements:
Autoupdateparams: true
Manageparamstates: true
Alwaysincludeallparams: true
- Switchmode: autoconst
+ Switchmode: auto
Indexexpr: ''
Placeholder: BODY();
diff --git a/src/operators/opChips.txt b/src/operators/opChips.txt
index 2ff0c9c20..615d24dac 100644
--- a/src/operators/opChips.txt
+++ b/src/operators/opChips.txt
@@ -1,9 +1,14 @@
name chip
-arrange updated
-combine updated
-moduloToroidal new
+assignUV updated
+adjustColor updated
+assignUV updated
+cameraTransform updated
+instanceLight new
+lightTransform new
+limitLight updated
+magnet updated
+mixFields new
+moduloToroidal updated
radialClone updated
-rangeTransform updated
-sphereGridSdf updated
-torusGridSdf new
-terrainNoiseField new
+restrictTypes new
+sampledPointMat updated
diff --git a/src/operators/output/customRender.tox b/src/operators/output/customRender.tox
index 3e5d03845..d29766f8c 100644
Binary files a/src/operators/output/customRender.tox and b/src/operators/output/customRender.tox differ
diff --git a/src/operators/output/customRender.yaml b/src/operators/output/customRender.yaml
index c79fdda37..6880ae4a5 100644
--- a/src/operators/output/customRender.yaml
+++ b/src/operators/output/customRender.yaml
@@ -183,14 +183,14 @@ opDef: !def
enable: true
typeSpec: !ropTypes
coordType: !coordT
- Coordtypevec3: true
+ Allcoordtype: true
contextType: !contextT
- Contexttypecontext: true
+ Allcontexttype: true
returnType: !returnT
- Returntypesdf: true
+ Allreturntype: true
function: !text
+ file: src/operators/output/customRender_function.glsl
name: functionTemplate
- text: '#define thismap inputOp1'
displayCategory: Render
inputs:
- !input
diff --git a/src/operators/output/customRender_function.glsl b/src/operators/output/customRender_function.glsl
new file mode 100644
index 000000000..12a24cb71
--- /dev/null
+++ b/src/operators/output/customRender_function.glsl
@@ -0,0 +1,3 @@
+ReturnT thismap(CoordT p, ContextT ctx) {
+ return inputOp1(p, ctx);
+}
\ No newline at end of file
diff --git a/src/operators/output/experimentalRaymarchRender3D.tox b/src/operators/output/experimentalRaymarchRender3D.tox
index c4758fa90..87f70b05a 100644
Binary files a/src/operators/output/experimentalRaymarchRender3D.tox and b/src/operators/output/experimentalRaymarchRender3D.tox differ
diff --git a/src/operators/output/experimentalRaymarchRender3D.yaml b/src/operators/output/experimentalRaymarchRender3D.yaml
index 39cf18b09..b944fefb4 100644
--- a/src/operators/output/experimentalRaymarchRender3D.yaml
+++ b/src/operators/output/experimentalRaymarchRender3D.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.output.experimentalRaymarchRender3D
- opVersion: '11'
+ opVersion: '12'
opStatus: alpha
opDef: !def
enable: true
diff --git a/src/operators/output/experimentalRaymarchRender3D_func.glsl b/src/operators/output/experimentalRaymarchRender3D_func.glsl
index 19bdaf112..7d80135c3 100644
--- a/src/operators/output/experimentalRaymarchRender3D_func.glsl
+++ b/src/operators/output/experimentalRaymarchRender3D_func.glsl
@@ -31,8 +31,7 @@ Ray evaluateCamera(vec2 p, CameraContext ctx) {
Ray getViewRay(vec2 shift) {
vec2 resolution = uTDOutputInfo.res.zw;
vec2 fragCoord = vUV.st*resolution + shift;
- CameraContext ctx;
- ctx.resolution = resolution;
+ CameraContext ctx = createCameraContext(resolution);
return evaluateCamera(fragCoord, ctx);
}
@@ -43,6 +42,7 @@ Light getLight(vec3 p, LightContext ctx) {
#else
light = createLight(vec3(0.), vec3(5.8, 4., 3.5));
#endif
+ light.color = max(light.color, 0);
return light;
}
diff --git a/src/operators/output/pointMapRender_func.glsl b/src/operators/output/pointMapRender_func.glsl
index 263767e8c..c40ae0acb 100644
--- a/src/operators/output/pointMapRender_func.glsl
+++ b/src/operators/output/pointMapRender_func.glsl
@@ -11,8 +11,7 @@ Light getLight(vec3 p, LightContext ctx) {
Ray getViewRay(vec2 shift) {
vec2 resolution = uTDOutputInfo.res.zw;
vec2 p = vUV.st*resolution + shift;
- CameraContext ctx;
- ctx.resolution = resolution;
+ CameraContext ctx = createCameraContext(resolution);
Ray res;
#if defined(THIS_HAS_INPUT_camera) && defined(THIS_HAS_TAG_useray)
res = inputOp_camera(p, ctx);
diff --git a/src/operators/output/raymarchRender3D.tox b/src/operators/output/raymarchRender3D.tox
index cc23e682d..dd1aada5b 100644
Binary files a/src/operators/output/raymarchRender3D.tox and b/src/operators/output/raymarchRender3D.tox differ
diff --git a/src/operators/output/raymarchRender3D.yaml b/src/operators/output/raymarchRender3D.yaml
index 11442a397..6b6139a27 100644
--- a/src/operators/output/raymarchRender3D.yaml
+++ b/src/operators/output/raymarchRender3D.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.output.raymarchRender3D
- opVersion: '143'
+ opVersion: '147'
opStatus: default
opDef: !def
enable: true
diff --git a/src/operators/output/raymarchRender3D_body.glsl b/src/operators/output/raymarchRender3D_body.glsl
index 47d109653..9973ad162 100644
--- a/src/operators/output/raymarchRender3D_body.glsl
+++ b/src/operators/output/raymarchRender3D_body.glsl
@@ -175,44 +175,61 @@ float calcAO( in vec3 pos, in vec3 nor )
return clamp( 1.0 - 3.0*occ, 0.0, 1.0 );
}
-vec3 getColorDefault(vec3 p, MaterialContext matCtx) {
- vec3 sunDir = normalize(matCtx.light.pos);
- vec3 mate = vec3(0.28);
- #ifdef RAYTK_USE_SURFACE_COLOR
- mate = mix(mate, matCtx.result.color.rgb, matCtx.result.color.w);
- #endif
- vec3 sunColor = matCtx.light.color;
+vec3 defaultMatGetColorForLight(
+ vec3 p, MaterialContext matCtx, Light light, int lightIndex, float shadedLevel,
+ vec3 baseColor) {
+ if (light.absent) { return baseColor; }
+
+ matCtx.light = light;
+ matCtx.lightIndex = lightIndex;
+ matCtx.shadedLevel = shadedLevel;
+
+ vec3 sunDir = normalize(light.pos);
+ vec3 mate = baseColor;
+ vec3 sunColor = light.color;
vec3 skyColor = vec3(0.5, 0.8, 0.9);
float sunDiffuse = clamp(dot(matCtx.normal, sunDir), 0, 1.);
float skyDiffuse = clamp(0.5+0.5*dot(matCtx.normal, vec3(0, 1, 0)), 0, 1);
float sunSpec = pow(max(dot(-matCtx.ray.dir, matCtx.normal), 0.), 5) * 0.5;
vec3 col = mate * sunColor * sunDiffuse;
#if defined(THIS_Enableshadow) && defined(RAYTK_USE_SHADOW)
- col *= matCtx.shadedLevel;
+ col *= shadedLevel;
#endif
col += mate * skyColor * skyDiffuse;
col += mate * sunColor * sunSpec;
+ return col;
+}
+
+vec3 defaultMatGetColor(vec3 p, MaterialContext matCtx) {
+ vec3 col = vec3(0.28);
+ #ifdef RAYTK_USE_SURFACE_COLOR
+ col = mix(col, matCtx.result.color.rgb, matCtx.result.color.w);
+ #endif
+
+ #if RAYTK_LIGHT_COUNT > 1
+ for (int i = 0; i < RAYTK_LIGHT_COUNT; i++) {
+ col = defaultMatGetColorForLight(p, matCtx, matCtx.allLights[i], i, matCtx.allShadedLevels[i], col);
+ }
+ #else
+ col = defaultMatGetColorForLight(p, matCtx, matCtx.light, 0, matCtx.shadedLevel, col);
+ #endif
+
float occ = matCtx.ao;
col *= mix(vec3(0.5), vec3(1.5), occ);
return col;
}
-vec3 getColorInner(vec3 p, MaterialContext matCtx, int m) {
+vec3 getColorFromSingleMat(vec3 p, MaterialContext matCtx, int m) {
vec3 col = vec3(0);
-// #ifdef OUTPUT_DEBUG
-// debugOut.x = m;
-// #endif
-
if (false) {}
// #include
-
else {
- col = getColorDefault(p, matCtx);
+ col = defaultMatGetColor(p, matCtx);
}
return col;
}
-vec4 getColor(vec3 p, MaterialContext matCtx) {
+vec4 getColorFromMats(vec3 p, MaterialContext matCtx) {
vec3 col = vec3(0);
float ratio = resultMaterialInterp(matCtx.result);
int m1 = resultMaterial1(matCtx.result);
@@ -232,13 +249,6 @@ vec4 getColor(vec3 p, MaterialContext matCtx) {
vec4 uv2;
resolveUV(matCtx, uv1, uv2);
#endif
- #if defined(THIS_Enableshadow) && defined(RAYTK_USE_SHADOW)
- if (matCtx.result.useShadow && matCtx.light.supportShadow) {
- int priorStage = pushStage(RAYTK_STAGE_SHADOW);
- matCtx.shadedLevel = calcShadedLevel(p, matCtx);
- popStage(priorStage);
- }
- #endif
#ifdef RAYTK_USE_AO
if (matCtx.result.useAO) {
matCtx.ao = calcAO(p, matCtx.normal);
@@ -252,7 +262,7 @@ vec4 getColor(vec3 p, MaterialContext matCtx) {
#ifdef RAYTK_USE_UV
matCtx.uv = uv1;
#endif
- col = getColorInner(p, matCtx, m1);
+ col = getColorFromSingleMat(p, matCtx, m1);
} else if (ratio >= 1) {
#ifdef RAYTK_USE_MATERIAL_POS
matCtx.materialPos = p2;
@@ -260,7 +270,7 @@ vec4 getColor(vec3 p, MaterialContext matCtx) {
#ifdef RAYTK_USE_UV
matCtx.uv = uv2;
#endif
- col = getColorInner(p, matCtx, m2);
+ col = getColorFromSingleMat(p, matCtx, m2);
} else {
#ifdef RAYTK_USE_MATERIAL_POS
matCtx.materialPos = p1;
@@ -268,14 +278,14 @@ vec4 getColor(vec3 p, MaterialContext matCtx) {
#ifdef RAYTK_USE_UV
matCtx.uv = uv1;
#endif
- vec3 col1 = getColorInner(p, matCtx, m1);
+ vec3 col1 = getColorFromSingleMat(p, matCtx, m1);
#ifdef RAYTK_USE_MATERIAL_POS
matCtx.materialPos = p2;
#endif
#ifdef RAYTK_USE_UV
matCtx.uv = uv2;
#endif
- vec3 col2 = getColorInner(p, matCtx, m2);
+ vec3 col2 = getColorFromSingleMat(p, matCtx, m2);
col = mix(col1, col2, ratio);
}
popStage(priorStage);
@@ -303,7 +313,7 @@ vec3 getReflectionColor(MaterialContext matCtx, vec3 p) {
}
p = matCtx.ray.pos + matCtx.normal * matCtx.result.x;
matCtx.normal = calcNormal(p);
- matCtx.reflectColor += getColor(p, matCtx).rgb;
+ matCtx.reflectColor += getColorFromMats(p, matCtx).rgb;
}
popStage(priorStage);
@@ -363,7 +373,7 @@ vec3 getReflectionColor(MaterialContext matCtx, vec3 p) {
// debugOut.r = 0.2;
// debugOut.a = 1.;
// #endif
-// vec3 col = getColor(matCtx.ray.pos, matCtx).rgb;
+// vec3 col = getColorFromMats(matCtx.ray.pos, matCtx).rgb;
// matCtx.refractColor = col;
// }
//
@@ -372,23 +382,53 @@ vec3 getReflectionColor(MaterialContext matCtx, vec3 p) {
//}
//#endif
-vec4 getColorWithLight(vec3 p, MaterialContext matCtx) {
- if (matCtx.light.absent) {
- return vec4(0.);
+void prepareLights(vec3 p, inout MaterialContext matCtx) {
+ LightContext lightCtx = createLightContext(matCtx.result, matCtx.normal);
+ #ifdef RAYTK_GLOBAL_POS_IN_CONTEXT
+ lightCtx.globalPos = matCtx.globalPos;
+ #endif
+
+ bool useShadow = false;
+ #if defined(THIS_Enableshadow) && defined(RAYTK_USE_SHADOW)
+ if (matCtx.result.useShadow) {
+ useShadow = true;
}
- #if defined(RAYTK_USE_REFLECTION) && defined(THIS_Enablereflection)
- matCtx.reflectColor = getReflectionColor(matCtx, p);
- #else
- matCtx.reflectColor = vec3(0);
#endif
- #if defined(RAYTK_USE_REFRACTION) && defined(THIS_Enablerefraction)
- matCtx.refractColor = getRefractionColor(p, matCtx);
+ #if RAYTK_LIGHT_COUNT > 1
+ {
+ for (int i = 0; i < RAYTK_LIGHT_COUNT; i++) {
+ lightCtx.index = i;
+ Light light = getLight(p, lightCtx);
+ matCtx.allLights[i] = light;
+ matCtx.allShadedLevels[i] = 1.0;
+ #ifdef RAYTK_USE_SHADOW
+ if (useShadow && light.supportShadow && !light.absent) {
+ int priorStage = pushStage(RAYTK_STAGE_SHADOW);
+ matCtx.light = light;
+ matCtx.lightIndex = i;
+ matCtx.allShadedLevels[i] = calcShadedLevel(p, matCtx);
+ popStage(priorStage);
+ }
+ #endif
+ }
+ matCtx.light = matCtx.allLights[0];
+ matCtx.shadedLevel = matCtx.allShadedLevels[0];
+ }
#else
- matCtx.refractColor = vec3(0);
+ {
+ lightCtx.index = 0;
+ matCtx.light = getLight(p, lightCtx);
+ matCtx.lightIndex = 0;
+ #ifdef RAYTK_USE_SHADOW
+ if (useShadow && matCtx.light.supportShadow && !matCtx.light.absent) {
+ int priorStage = pushStage(RAYTK_STAGE_SHADOW);
+ matCtx.shadedLevel = calcShadedLevel(p, matCtx);
+ popStage(priorStage);
+ }
+ #endif
+ }
#endif
- vec4 col = getColor(p, matCtx);
- return col;
}
void main()
@@ -474,22 +514,24 @@ void main()
#ifdef OUTPUT_COLOR
{
+ prepareLights(p, matCtx);
LightContext lightCtx = createLightContext(res, matCtx.normal);
#ifdef RAYTK_GLOBAL_POS_IN_CONTEXT
lightCtx.globalPos = matCtx.globalPos;
#endif
vec4 col;
- #if !defined(RAYTK_LIGHT_COUNT) || RAYTK_LIGHT_COUNT == 1
- matCtx.light = getLight(p, lightCtx);
- col = getColorWithLight(p, matCtx);
+ #if defined(RAYTK_USE_REFLECTION) && defined(THIS_Enablereflection)
+ matCtx.reflectColor = getReflectionColor(matCtx, p);
+ #else
+ matCtx.reflectColor = vec3(0);
+ #endif
+
+ #if defined(RAYTK_USE_REFRACTION) && defined(THIS_Enablerefraction)
+ matCtx.refractColor = getRefractionColor(p, matCtx);
#else
- col = vec4(0., 0., 0., 1.);
- for (int i = 0; i < RAYTK_LIGHT_COUNT; i++) {
- lightCtx.index = i;
- matCtx.light = getLight(p, lightCtx);
- col.rgb += getColorWithLight(p, matCtx).rgb;
- }
+ matCtx.refractColor = vec3(0);
#endif
+ col = getColorFromMats(p, matCtx);
vec2 fragCoord = vUV.st*uTDOutputInfo.res.zw;
col.rgb += (1.0/255.0)*hash1(fragCoord);
diff --git a/src/operators/output/raymarchRender3D_func.glsl b/src/operators/output/raymarchRender3D_func.glsl
index baf4b3e54..dbf21316f 100644
--- a/src/operators/output/raymarchRender3D_func.glsl
+++ b/src/operators/output/raymarchRender3D_func.glsl
@@ -31,17 +31,18 @@ Ray evaluateCamera(vec2 p, CameraContext ctx) {
Ray getViewRay(vec2 shift) {
vec2 resolution = uTDOutputInfo.res.zw;
vec2 fragCoord = vUV.st*resolution + shift;
- CameraContext ctx;
- ctx.resolution = resolution;
+ CameraContext ctx = createCameraContext(resolution);
return evaluateCamera(fragCoord, ctx);
}
Light getLight(vec3 p, LightContext ctx) {
#ifdef THIS_USE_LIGHT_FUNC
- return inputOp3(p, ctx);
+ Light light = inputOp3(p, ctx);
#else
- return createLight(vec3(0.), vec3(5.8, 4., 3.5));
+ Light light = createLight(vec3(0.), vec3(5.8, 4., 3.5));
#endif
+ light.color = max(light.color, 0);
+ return light;
}
#ifdef THIS_USE_LIMIT_BOX
diff --git a/src/operators/pattern/brickPattern.md b/src/operators/pattern/brickPattern.md
new file mode 100644
index 000000000..5e19fc073
--- /dev/null
+++ b/src/operators/pattern/brickPattern.md
@@ -0,0 +1,20 @@
+Pattern of stacked rectangular bricks.
+
+This pattern produces just float values not colors. To apply color to it, pass it into a `colorRampField`.
+
+The bricks themselves produce values of 0 (or black) and the spaces between them produce values of 1 (or white).
+
+## Parameters
+
+* `Shift`: Offsets every other row of bricks. A value of 0 means a regular grid, and 0.5 is a standard staggered brick layout.
+* `Translate`: Moves the entire pattern.
+* `Size`: Scales the pattern.
+* `Thickness`: Thickness of the spacing between the bricks.
+* `Blending`: Amount of blending between bricks and spacing.
+
+## Inputs
+
+* `coordField`: Field that produces vectors that the pattern uses as coordinates instead of regular spatial position. Only the X and Y parts are used.
+* `thicknessField`: Field that controls the thickness of the spacing between bricks.
+* `blendingField`: Field that controls the amount of blending between bricks and spacing.
+* `shiftField`: Field that controls how much alternating rows are shifted.
\ No newline at end of file
diff --git a/src/operators/pattern/brickPattern.tox b/src/operators/pattern/brickPattern.tox
index f4c313f56..78d88772a 100644
Binary files a/src/operators/pattern/brickPattern.tox and b/src/operators/pattern/brickPattern.tox differ
diff --git a/src/operators/pattern/brickPattern.yaml b/src/operators/pattern/brickPattern.yaml
index a2e370aca..4e3605330 100644
--- a/src/operators/pattern/brickPattern.yaml
+++ b/src/operators/pattern/brickPattern.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.pattern.brickPattern
- opVersion: '7'
+ opVersion: '8'
opStatus: default
opDef: !def
enable: true
@@ -17,6 +17,9 @@ opDef: !def
file: src/operators/pattern/brickPattern.glsl
name: functionTemplate
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/pattern/brickPattern.md
+ name: help
inputs:
- !input
Localalias: coordField
diff --git a/src/operators/pattern/checkerPattern.md b/src/operators/pattern/checkerPattern.md
index f7afd16fe..82d1006c7 100644
--- a/src/operators/pattern/checkerPattern.md
+++ b/src/operators/pattern/checkerPattern.md
@@ -1,10 +1,12 @@
Checkerboard pattern with alternating black and white rectangles.
+This pattern produces just float values not colors. To apply color to it, pass it into a `colorRampField`.
+
## Parameters
-* `Translate`
-* `Size`
+* `Translate`: Moves the entire pattern.
+* `Size`: Scales the pattern.
## Inputs
-* `coordField`: Optional field that can provide alternative coordinates instead of using the raw X/Y position.
\ No newline at end of file
+* `coordField`: Field that produces vectors that the pattern uses as coordinates instead of regular spatial position. Only the X and Y parts are used.
diff --git a/src/operators/pattern/gridPattern.md b/src/operators/pattern/gridPattern.md
index 215a53ead..dac9b5c64 100644
--- a/src/operators/pattern/gridPattern.md
+++ b/src/operators/pattern/gridPattern.md
@@ -1,24 +1,26 @@
Rectangular grid pattern.
+This operator produces different types of values from the grid depending on the selected Format.
+
## Parameters
-* `Format`
- * `edge`
- * `dist`
- * `normdist`
- * `color`
-* `Translate`
-* `Spacing`
-* `Thickness`
-* `Blending`
-* `Fillcolor`
-* `Edgecolor`
+* `Format`: What type of values to produce from the pattern.
+ * `edge`: Produces float values, with 0 for the grid cells and 1 for the edges between cells.
+ * `dist`: Produces float values with the raw distance from the edge, like an SDF.
+ * `normdist`: Produces float values with the distance scaled so that edges are 0 and cell centers are 1.
+ * `color`: Produces vectors with the chosen color for the cells and the edges.
+* `Translate`: Moves the entire pattern.
+* `Size`: Scales the pattern.
+* `Thickness`: Thickness of the edges between the cells.
+* `Blending`: Amount of blending between cells and edges.
+* `Fillcolor`: Color to use for the cells (when applicable).
+* `Edgecolor`: Color to use for the edges (when applicable).
## Inputs
-* `coordField`:
-* `spacingField`:
-* `thicknessField`:
-* `blendingField`:
-* `fillColorField`:
-* `edgeColorField`:
\ No newline at end of file
+* `coordField`: Field that produces vectors that the pattern uses as coordinates instead of regular spatial position. Only the X and Y parts are used.
+* `spacingField`: Field that controls the sizing of the grid cells.
+* `thicknessField`: Field that controls the thickness of the edges between cells.
+* `blendingField`: Field that controls the amount of blending between cells and edges.
+* `fillColorField`: Field that provides colors for the cells.
+* `edgeColorField`: Field that provides colors for the edges.
\ No newline at end of file
diff --git a/src/operators/pattern/hexagonalGridPattern.md b/src/operators/pattern/hexagonalGridPattern.md
new file mode 100644
index 000000000..49aa731c3
--- /dev/null
+++ b/src/operators/pattern/hexagonalGridPattern.md
@@ -0,0 +1,27 @@
+Hexagonal grid pattern.
+
+This operator produces different types of values from the grid depending on the selected Pattern.
+
+## Parameters
+
+* `Pattern`: What type of values to produce from the grid.
+ * `hexgrid`: Produces float values, with 1 for the grid cells, and 0 for the edges between cells.
+ * `hexdist`: Produces float values with the distance scaled so that edges are 0 and cell centers are 1.
+ * `hex3`: Produces float values which mark each cell with either 0, 0.5, or 1, such that no two adjacent cells are the same.
+ * `hex3color`: Produces vectors with colors where 3 chosen colors are applied to cells, such that no two adjacent cells are the same.
+* `Translate`: Moves the entire pattern.
+* `Size`: Scales the pattern.
+* `Thickness`: Thickness of the edges between the cells.
+* `Blending`: Amount of blending between cells and edges.
+* `Polycolor1`: Color 1 to use for cells (when applicable).
+* `Polycolor2`: Color 2 to use for cells (when applicable).
+* `Polycolor3`: Color 3 to use for cells (when applicable).
+
+## Inputs
+
+* `coordField`: Field that produces vectors that the pattern uses as coordinates instead of regular spatial position. Only the X and Y parts are used.
+* `thicknessField`: Field that controls the thickness of the edges between cells.
+* `blendingField`: Field that controls the amount of blending between cells and edges.
+* `polyColor1Field`: Field to provide cell color 1.
+* `polyColor2Field`: Field to provide cell color 2.
+* `polyColor3Field`: Field to provide cell color 3.
\ No newline at end of file
diff --git a/src/operators/pattern/hexagonalGridPattern.tox b/src/operators/pattern/hexagonalGridPattern.tox
index 723beeaae..c47c943ec 100644
Binary files a/src/operators/pattern/hexagonalGridPattern.tox and b/src/operators/pattern/hexagonalGridPattern.tox differ
diff --git a/src/operators/pattern/hexagonalGridPattern.yaml b/src/operators/pattern/hexagonalGridPattern.yaml
index f79bf6362..7207cc0dd 100644
--- a/src/operators/pattern/hexagonalGridPattern.yaml
+++ b/src/operators/pattern/hexagonalGridPattern.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.pattern.hexagonalGridPattern
- opVersion: '10'
+ opVersion: '11'
opStatus: default
opDef: !def
enable: true
@@ -21,6 +21,9 @@ opDef: !def
paramGroupTable: eval_params
libraryNames: !expr
expr: op('hexagonalGridPattern_lib')
+ help: !text
+ file: src/operators/pattern/hexagonalGridPattern.md
+ name: help
inputs:
- !input
Localalias: coordField
diff --git a/src/operators/pattern/hexagonalTruchetPattern.md b/src/operators/pattern/hexagonalTruchetPattern.md
new file mode 100644
index 000000000..a96147218
--- /dev/null
+++ b/src/operators/pattern/hexagonalTruchetPattern.md
@@ -0,0 +1,23 @@
+Pattern using truchet tiling in a hexagonal arrangement.
+
+This operator produces different types of values from the grid depending on the selected Pattern.
+
+Truchet patterns involve a curving path through a grid (in this case hexagonal), where the path is always uninterrupted, but may sometimes form closed loops.
+
+Based on [hexagonal truchet by FabriceNeyret2](https://www.shadertoy.com/view/Xdt3D8).
+
+See details about [Truchet tiles](https://en.wikipedia.org/wiki/Truchet_tiles).
+
+## Parameters
+
+* `Pattern`: What type of values to produce from the grid.
+ * `default`: Produces float values with 1 for the path and 0 for the space around the path.
+ * `variant1`: Produces float values with multiple stripes going through the path.
+ * `variant2`: Produces vectors with colors using stripes along the path. Currently these colors are fixed and unchangeable.
+* `Seed`: Seed number used to control the randomization of the path.
+* `Translate`: Moves the entire pattern.
+* `Size`: Scales the pattern.
+
+## Inputs
+
+* `coordField`: Field that produces vectors that the pattern uses as coordinates instead of regular spatial position. Only the X and Y parts are used.
diff --git a/src/operators/pattern/hexagonalTruchetPattern.tox b/src/operators/pattern/hexagonalTruchetPattern.tox
index 95af2eb0f..78396a748 100644
Binary files a/src/operators/pattern/hexagonalTruchetPattern.tox and b/src/operators/pattern/hexagonalTruchetPattern.tox differ
diff --git a/src/operators/pattern/hexagonalTruchetPattern.yaml b/src/operators/pattern/hexagonalTruchetPattern.yaml
index bba019277..2d1d988d4 100644
--- a/src/operators/pattern/hexagonalTruchetPattern.yaml
+++ b/src/operators/pattern/hexagonalTruchetPattern.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.pattern.hexagonalTruchetPattern
- opVersion: '7'
+ opVersion: '8'
opStatus: default
opDef: !def
enable: true
@@ -19,6 +19,9 @@ opDef: !def
file: src/operators/pattern/hexagonalTruchetPattern.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/pattern/hexagonalTruchetPattern.md
+ name: help
inputs:
- !input
Localalias: coordField
diff --git a/src/operators/pattern/hexagonalWeavePattern.md b/src/operators/pattern/hexagonalWeavePattern.md
new file mode 100644
index 000000000..8f05a9462
--- /dev/null
+++ b/src/operators/pattern/hexagonalWeavePattern.md
@@ -0,0 +1,34 @@
+Pattern with two layers with gaps in a hexagonal layout.
+
+This pattern always produces colors (vectors), but the Format parameter controls how those colors are produced.
+
+## Parameters
+
+* `Pattern`
+ * `twolayer`
+* `Translate`: Moves the entire pattern.
+* `Size`: Scales the pattern.
+* `Thickness`: Thickness of each layer, where larger values produce smaller gaps.
+* `Blending`: Amount of blending between layers and edges.
+* `Randomize`: Whether to weave the two layers together in a random arrangement, or always put one layer in front of the other.
+* `Seed`: Seed number used to control randomization.
+* `Format`: What type of values are produced.
+ * `color`: Uses the color parameters to color layer 1, layer 2, and background.
+ * `customcolor`: Uses the Color 1 field input for everything, relying on that field to use variables to differentiate between the different parts of the pattern.
+* `Color1`: The color to use for layer 1.
+* `Color2`: The color to use for layer 2.
+* `Bgcolor`: The color to use for the background behind both layers.
+
+## Inputs
+
+* `coordField`: Field that produces vectors that the pattern uses as coordinates instead of regular spatial position. Only the X and Y parts are used.
+* `thicknessField`: Field that controls the thickness of the edges between layers.
+* `blendingField`: Field that controls the amount of blending between layers and edges.
+* `color1Field`: Field providing either the color for layer 1 or the custom color for everywhere, depending on the selected Format.
+* `color2Field`: Field providing the color for layer 2.
+* `bgColorField`: Field providing the color for the background.
+
+## Variables
+
+* `axialdist`:
+* `mask`:
\ No newline at end of file
diff --git a/src/operators/pattern/hexagonalWeavePattern.tox b/src/operators/pattern/hexagonalWeavePattern.tox
index 3846cc4a2..07dce0c5d 100644
Binary files a/src/operators/pattern/hexagonalWeavePattern.tox and b/src/operators/pattern/hexagonalWeavePattern.tox differ
diff --git a/src/operators/pattern/hexagonalWeavePattern.yaml b/src/operators/pattern/hexagonalWeavePattern.yaml
index e110939a7..a372854b1 100644
--- a/src/operators/pattern/hexagonalWeavePattern.yaml
+++ b/src/operators/pattern/hexagonalWeavePattern.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.pattern.hexagonalWeavePattern
- opVersion: '10'
+ opVersion: '11'
opStatus: default
opDef: !def
enable: true
@@ -23,6 +23,9 @@ opDef: !def
evalOpts: !evalOpts
excludeFirstRow: true
cols: enable
+ help: !text
+ file: src/operators/pattern/hexagonalWeavePattern.md
+ name: help
inputs:
- !input
Localalias: coordField
diff --git a/src/operators/pattern/knitPattern.md b/src/operators/pattern/knitPattern.md
new file mode 100644
index 000000000..dcaec2d43
--- /dev/null
+++ b/src/operators/pattern/knitPattern.md
@@ -0,0 +1,14 @@
+Woven yarn pattern.
+
+Note that this pattern has a lot of fine detail which does not work well for things like offsetting SDF surfaces, unless the Texture Amount is set to 0.
+
+## Parameters
+
+* `Translate`: Moves the entire pattern.
+* `Size`: Scales the pattern.
+* `Texamount`: Amount of roughness in the pattern.
+* `Texdensity`: Tightness of the roughness.
+
+## Inputs
+
+* `coordField`: Field that produces vectors that the pattern uses as coordinates instead of regular spatial position. Only the X and Y parts are used.
diff --git a/src/operators/pattern/knitPattern.tox b/src/operators/pattern/knitPattern.tox
index 03da4167d..da663cec8 100644
Binary files a/src/operators/pattern/knitPattern.tox and b/src/operators/pattern/knitPattern.tox differ
diff --git a/src/operators/pattern/knitPattern.yaml b/src/operators/pattern/knitPattern.yaml
index 587530b79..7f8237658 100644
--- a/src/operators/pattern/knitPattern.yaml
+++ b/src/operators/pattern/knitPattern.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.pattern.knitPattern
- opVersion: '0'
+ opVersion: '1'
opStatus: beta
opDef: !def
enable: true
@@ -16,6 +16,9 @@ opDef: !def
file: src/operators/pattern/knitPattern.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/pattern/knitPattern.md
+ name: help
inputs:
- !input
Localalias: coordField
diff --git a/src/operators/pattern/rosettePattern.md b/src/operators/pattern/rosettePattern.md
new file mode 100644
index 000000000..46bb2d8ae
--- /dev/null
+++ b/src/operators/pattern/rosettePattern.md
@@ -0,0 +1,20 @@
+Pattern with overlapping circles in a hexagonal arrangement.
+
+This pattern produces just float values not colors. To apply color to it, pass it into a `colorRampField`.
+
+The edges of the circles produce values of 1 and the background produces values of 0.
+
+## Parameters
+
+* `Translate`: Moves the entire pattern.
+* `Size`: Scales the pattern.
+* `Glow`: The amount of glow, or blending between the circle edges and the background.
+* `Radius`: The radius of the circles. A value of 1 makes the circles overlap perfectly at the center of their neighbors, 0.5 causes them to touch the edges of the neighbors, and 0 makes the circles dots. Values larger than 1 will cut off parts of the circles.
+* `Spread`: How much the arrangement of circles should be spread out along each axis.
+
+## Inputs
+
+* `coordField`: Field that produces vectors that the pattern uses as coordinates instead of regular spatial position. Only the X and Y parts are used.
+* `glowField`: Field that controls the amount of glow or blending.
+* `radiusField`: Field that controls the radii of the circles.
+* `spreadField`: Field that controls how much the circles are spread apart.
\ No newline at end of file
diff --git a/src/operators/pattern/rosettePattern.tox b/src/operators/pattern/rosettePattern.tox
index 494615e44..cae0a551b 100644
Binary files a/src/operators/pattern/rosettePattern.tox and b/src/operators/pattern/rosettePattern.tox differ
diff --git a/src/operators/pattern/rosettePattern.yaml b/src/operators/pattern/rosettePattern.yaml
index 85b2a20ca..df4fc3672 100644
--- a/src/operators/pattern/rosettePattern.yaml
+++ b/src/operators/pattern/rosettePattern.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.pattern.rosettePattern
- opVersion: '7'
+ opVersion: '8'
opStatus: default
opDef: !def
enable: true
@@ -16,6 +16,9 @@ opDef: !def
file: src/operators/pattern/rosettePattern.glsl
name: functionTemplate
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/pattern/rosettePattern.md
+ name: help
inputs:
- !input
Localalias: coordField
diff --git a/src/operators/pattern/triangleCheckerPattern.md b/src/operators/pattern/triangleCheckerPattern.md
new file mode 100644
index 000000000..08f03def7
--- /dev/null
+++ b/src/operators/pattern/triangleCheckerPattern.md
@@ -0,0 +1,12 @@
+Triangular grid checkerboard pattern.
+
+This pattern produces just float values not colors. To apply color to it, pass it into a `colorRampField`.
+
+## Parameters
+
+* `Translate`: Moves the entire pattern.
+* `Size`: Scales the pattern.
+
+## Inputs
+
+* `coordField`: Field that produces vectors that the pattern uses as coordinates instead of regular spatial position. Only the X and Y parts are used.
diff --git a/src/operators/pattern/triangleCheckerPattern.tox b/src/operators/pattern/triangleCheckerPattern.tox
index ced0cefde..d23a0c33e 100644
Binary files a/src/operators/pattern/triangleCheckerPattern.tox and b/src/operators/pattern/triangleCheckerPattern.tox differ
diff --git a/src/operators/pattern/triangleCheckerPattern.yaml b/src/operators/pattern/triangleCheckerPattern.yaml
index e43a22d8b..0e006c9e2 100644
--- a/src/operators/pattern/triangleCheckerPattern.yaml
+++ b/src/operators/pattern/triangleCheckerPattern.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.pattern.triangleCheckerPattern
- opVersion: '4'
+ opVersion: '5'
opStatus: default
opDef: !def
enable: true
@@ -16,6 +16,9 @@ opDef: !def
file: src/operators/pattern/triangleCheckerPattern.glsl
name: functionTemplate
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/pattern/triangleCheckerPattern.md
+ name: help
inputs:
- !input
Localalias: coordField
diff --git a/src/operators/post/index.md b/src/operators/post/index.md
new file mode 100644
index 000000000..e948ef122
--- /dev/null
+++ b/src/operators/post/index.md
@@ -0,0 +1,5 @@
+# Post-processing operators
+
+Post processing operators are components that take information from a renderer and process it to produce images that can be used for post-processing.
+
+Most or all of these are not standard RayTK operators that get connected into a renderer and add to the generated shader.
\ No newline at end of file
diff --git a/src/operators/post/index.tox b/src/operators/post/index.tox
index 3426154fb..5fb58f5cd 100644
Binary files a/src/operators/post/index.tox and b/src/operators/post/index.tox differ
diff --git a/src/operators/sdf/apollonianSdf.glsl b/src/operators/sdf/apollonianSdf.glsl
index 5ea73699a..b326540df 100644
--- a/src/operators/sdf/apollonianSdf.glsl
+++ b/src/operators/sdf/apollonianSdf.glsl
@@ -1,4 +1,4 @@
-// https://www.shadertoy.com/view/4ds3zn
+// https://www.shadertoy.com/view/XlSfzW
ReturnT thismap(CoordT p, ContextT ctx) {
vec4 orb = vec4(1000.0);
const vec3 offset = vec3(-1, -1, 0);
diff --git a/src/operators/sdf/apollonianSdf.md b/src/operators/sdf/apollonianSdf.md
new file mode 100644
index 000000000..76598e4a3
--- /dev/null
+++ b/src/operators/sdf/apollonianSdf.md
@@ -0,0 +1,10 @@
+Apollonian gasket fractal.
+
+Based on [Apollonian Statue2](https://www.shadertoy.com/view/XlSfzW) by EvilRyu.
+
+## Parameters
+
+* `Translate`
+* `Scale`
+* `S`
+* `Iterations`
\ No newline at end of file
diff --git a/src/operators/sdf/apollonianSdf.tox b/src/operators/sdf/apollonianSdf.tox
index 651e4d840..fa1d957cb 100644
Binary files a/src/operators/sdf/apollonianSdf.tox and b/src/operators/sdf/apollonianSdf.tox differ
diff --git a/src/operators/sdf/apollonianSdf.yaml b/src/operators/sdf/apollonianSdf.yaml
index a84c4fd61..3fa62d2cd 100644
--- a/src/operators/sdf/apollonianSdf.yaml
+++ b/src/operators/sdf/apollonianSdf.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf.apollonianSdf
- opVersion: '11'
+ opVersion: '12'
opStatus: default
opDef: !def
enable: true
@@ -16,6 +16,9 @@ opDef: !def
file: src/operators/sdf/apollonianSdf.glsl
name: functionTemplate
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/sdf/apollonianSdf.md
+ name: help
keywords:
- apollonian
- fractal
diff --git a/src/operators/sdf/archSdf.md b/src/operators/sdf/archSdf.md
new file mode 100644
index 000000000..6b825f773
--- /dev/null
+++ b/src/operators/sdf/archSdf.md
@@ -0,0 +1,27 @@
+Arch / doorway.
+
+This SDF combines a few parts, which can be toggled on/off.
+
+The panel is the flat inner surface that fills the center of the arch.
+The frame is the outer border of the arch.
+
+## Parameters
+
+* `Height`
+* `Width`
+* `Rounding`: Size of the curves on the top corners. Smaller values produce more of a rectangle and larger values produce a curved peak.
+* `Enablepanel`: Whether to show the flat shape filling the center of the arch.
+* `Paneldepth`: Thickness of the center part.
+* `Enableframe`: Whether to show the outer part of the arch.
+* `Framethickness`: Thickness of the frame (width/height).
+* `Framedepth`: Depth of the frame.
+* `Hideframebottom`: Whether to include a bottom section to the frame or leave it empty.
+
+## Inputs
+
+* `heightField`:
+* `widthField`:
+* `roundingField`:
+* `frameThicknessField`:
+* `frameDepthField`:
+* `panelDepthField`:
\ No newline at end of file
diff --git a/src/operators/sdf/archSdf.tox b/src/operators/sdf/archSdf.tox
index d2eb27383..466d4cd93 100644
Binary files a/src/operators/sdf/archSdf.tox and b/src/operators/sdf/archSdf.tox differ
diff --git a/src/operators/sdf/archSdf.yaml b/src/operators/sdf/archSdf.yaml
index 757c6a3a9..8a941cf90 100644
--- a/src/operators/sdf/archSdf.yaml
+++ b/src/operators/sdf/archSdf.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf.archSdf
- opVersion: '10'
+ opVersion: '11'
opStatus: default
opDef: !def
enable: true
@@ -18,6 +18,9 @@ opDef: !def
paramGroupTable: eval_params
libraryNames: !expr
expr: op('roundedRectangleSdf2d_lib')
+ help: !text
+ file: src/operators/sdf/archSdf.md
+ name: help
inputs:
- !input
Localalias: heightField
diff --git a/src/operators/sdf/capsuleSdf.md b/src/operators/sdf/capsuleSdf.md
index 91585d1a1..8dfdfc7c4 100644
--- a/src/operators/sdf/capsuleSdf.md
+++ b/src/operators/sdf/capsuleSdf.md
@@ -1,4 +1,4 @@
-A cylinder with rounded ends, between two points.
+A line or cylinder with rounded ends, between two points.
With a small `Radius`, this can be used to create a line segment.
diff --git a/src/operators/sdf/chainSdf.md b/src/operators/sdf/chainSdf.md
new file mode 100644
index 000000000..0caa59d19
--- /dev/null
+++ b/src/operators/sdf/chainSdf.md
@@ -0,0 +1,15 @@
+Chain made of links, with infinite length.
+
+Based on [Link - distance](https://www.shadertoy.com/view/wlXSD7) by iq.
+
+## Parameters
+
+* `Length`: Length of each chain link.
+* `Radius`: Width / rounding radius of the chain links.
+* `Thickness`: Thickness of each link.
+
+## Inputs
+
+* `lengthField`:
+* `radiusField`:
+* `thicknessField`:
\ No newline at end of file
diff --git a/src/operators/sdf/chainSdf.tox b/src/operators/sdf/chainSdf.tox
index 0b8983e22..7cd026331 100644
Binary files a/src/operators/sdf/chainSdf.tox and b/src/operators/sdf/chainSdf.tox differ
diff --git a/src/operators/sdf/chainSdf.yaml b/src/operators/sdf/chainSdf.yaml
index 92e761067..6b53f534b 100644
--- a/src/operators/sdf/chainSdf.yaml
+++ b/src/operators/sdf/chainSdf.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf.chainSdf
- opVersion: '5'
+ opVersion: '6'
opStatus: default
opDef: !def
enable: true
@@ -16,6 +16,9 @@ opDef: !def
file: src/operators/sdf/chainSdf.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/sdf/chainSdf.md
+ name: help
inputs:
- !input
Localalias: lengthField
diff --git a/src/operators/sdf/chamferBoxSdf.md b/src/operators/sdf/chamferBoxSdf.md
index 11a03e0c8..35888cf8d 100644
--- a/src/operators/sdf/chamferBoxSdf.md
+++ b/src/operators/sdf/chamferBoxSdf.md
@@ -1,12 +1,14 @@
A box with cropped corners at 45 degree angles.
+Based on [ChamferBox Super Primitive](https://www.shadertoy.com/view/3lBGzt) by TLC123
+
## Parameters
* `Translate`
* `Scale`
* `Uniformscale`
-* `Chamfer`
-* `Round`
+* `Chamfer`: Width of cropping on edges/corners.
+* `Round`: Rounding that smooths out the edges of the crops.
## Inputs
diff --git a/src/operators/sdf/crescentSdf.md b/src/operators/sdf/crescentSdf.md
new file mode 100644
index 000000000..926700836
--- /dev/null
+++ b/src/operators/sdf/crescentSdf.md
@@ -0,0 +1,14 @@
+Rounded crescent shape.
+
+Based on [Croissant SDF](https://www.shadertoy.com/view/NdlBD4) by erratac.
+
+## Parameters
+
+* `Radius`: Radius of the main curve of the crescent.
+* `Thickness`: Thickness of the crescent.
+* `Rotate`: Rotates the crescent around the axis that it's curving around.
+
+## Inputs
+
+* `radiusField`:
+* `thicknessField`:
\ No newline at end of file
diff --git a/src/operators/sdf/crescentSdf.tox b/src/operators/sdf/crescentSdf.tox
index 50d1b02b5..2f0ca339c 100644
Binary files a/src/operators/sdf/crescentSdf.tox and b/src/operators/sdf/crescentSdf.tox differ
diff --git a/src/operators/sdf/crescentSdf.yaml b/src/operators/sdf/crescentSdf.yaml
index 02591d5f8..8f0d43772 100644
--- a/src/operators/sdf/crescentSdf.yaml
+++ b/src/operators/sdf/crescentSdf.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf.crescentSdf
- opVersion: '3'
+ opVersion: '4'
opStatus: default
opDef: !def
enable: true
@@ -16,6 +16,9 @@ opDef: !def
file: src/operators/sdf/crescentSdf.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/sdf/crescentSdf.md
+ name: help
inputs:
- !input
Localalias: radiusField
diff --git a/src/operators/sdf/crossSdf.md b/src/operators/sdf/crossSdf.md
index 49b81c3c0..f646d0230 100644
--- a/src/operators/sdf/crossSdf.md
+++ b/src/operators/sdf/crossSdf.md
@@ -1,8 +1,22 @@
-An SDF for a 3D cross of infinite length along each axis.
+An SDF for a 3D cross along each axis, with either infinite or limited length.
## Parameters
* `Translate`: Moves the center of the cross.
* `Size`: The width of the arms of the cross.
* `Smoothradius`: Smoothing applied to the intersections of the arms.
-* `Inspect`
\ No newline at end of file
+* `Axes`: Which axes to include in the cross.
+ * `xyz`
+ * `xy`
+ * `yz`
+ * `zx`
+* `Shape`: Whether to make the cross have infinite length or limited lengths.
+ * `infinite`
+ * `limitxyz`
+* `Length`: Length of the cross on each axis.
+
+## Inputs
+
+* `sizeField`:
+* `smoothRadiusField`:
+* `lengthField`:
\ No newline at end of file
diff --git a/src/operators/sdf/cutSphereSdf.md b/src/operators/sdf/cutSphereSdf.md
new file mode 100644
index 000000000..cfe0e6d58
--- /dev/null
+++ b/src/operators/sdf/cutSphereSdf.md
@@ -0,0 +1,20 @@
+Sphere with part of it cut off, either solid or hollow.
+
+Based on [CutSphere - distance 3D](https://www.shadertoy.com/view/stKSzc) by iq.
+
+## Parameters
+
+* `Shape`: Whether the sphere should be solid or a hollow shell.
+ * `solid`
+ * `hollow`
+* `Radius`: Radius of the sphere.
+* `Offset`: How far across the sphere the cut plane should be.
+* `Thickness`: Thickness of the shape if using hollow mode.
+* `Rotate`
+
+## Inputs
+
+* `radiusField`:
+* `thicknessField`:
+* `offsetField`:
+* `rotateField`:
\ No newline at end of file
diff --git a/src/operators/sdf/cutSphereSdf.tox b/src/operators/sdf/cutSphereSdf.tox
index ba4c1ff70..d9eedfe0e 100644
Binary files a/src/operators/sdf/cutSphereSdf.tox and b/src/operators/sdf/cutSphereSdf.tox differ
diff --git a/src/operators/sdf/cutSphereSdf.yaml b/src/operators/sdf/cutSphereSdf.yaml
index 2769ffb71..f9a0925e9 100644
--- a/src/operators/sdf/cutSphereSdf.yaml
+++ b/src/operators/sdf/cutSphereSdf.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf.cutSphereSdf
- opVersion: '7'
+ opVersion: '8'
opStatus: default
paramPages:
- !page
@@ -69,6 +69,9 @@ opDef: !def
paramGroupTable: eval_params
libraryNames: !expr
expr: op('cutSphereSdf_lib')
+ help: !text
+ file: src/operators/sdf/cutSphereSdf.md
+ name: help
inputs:
- !input
Localalias: radiusField
diff --git a/src/operators/sdf/cylinderSdf.md b/src/operators/sdf/cylinderSdf.md
index bbfcef523..ae75c15e5 100644
--- a/src/operators/sdf/cylinderSdf.md
+++ b/src/operators/sdf/cylinderSdf.md
@@ -1,4 +1,4 @@
-SDF for a cylinder.
+Cylinder, either solid or a hollow tube.
## Parameters
@@ -9,12 +9,15 @@ SDF for a cylinder.
* `x`
* `y`
* `z`
-* `Infiniteheight`
+* `Infiniteheight`: Whether to extend infinitely along the chosen axis or have a limited height.
+* `Hollow`: Whether to make the cylinder a hollow tube instead of a solid cylinder.
+* `Thickness`: Thickness of the walls of the tube when using hollow mode.
## Inputs
-* `radiusField`: Optional field used to control the radius of the cylinder. If it uses 1D coordinates, it is given the position along the axis. For 3D coordinates, it is given the raw position.
-* `heightField`:
+* `heightField`: Optional field used to control the radius of the cylinder. If it uses 1D coordinates, it is given the position along the axis. For 3D coordinates, it is given the raw position.
+* `radiusField`:
+* `thicknessField`:
## Variables
diff --git a/src/operators/sdf/ellipsoidSdf.md b/src/operators/sdf/ellipsoidSdf.md
new file mode 100644
index 000000000..b4cb26bb5
--- /dev/null
+++ b/src/operators/sdf/ellipsoidSdf.md
@@ -0,0 +1,11 @@
+Ellipsoid (sphere with different sizes on each axis).
+
+Based on [Ellipsoid bound](https://www.shadertoy.com/view/tdS3DG) by iq.
+
+## Parameters
+
+* `Scale`: Size of the ellipsoid on each axis.
+
+## Inputs
+
+* `scaleField`:
\ No newline at end of file
diff --git a/src/operators/sdf/ellipsoidSdf.tox b/src/operators/sdf/ellipsoidSdf.tox
index 753fc1949..6a592fbae 100644
Binary files a/src/operators/sdf/ellipsoidSdf.tox and b/src/operators/sdf/ellipsoidSdf.tox differ
diff --git a/src/operators/sdf/ellipsoidSdf.yaml b/src/operators/sdf/ellipsoidSdf.yaml
index a62ffb528..68127beaf 100644
--- a/src/operators/sdf/ellipsoidSdf.yaml
+++ b/src/operators/sdf/ellipsoidSdf.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf.ellipsoidSdf
- opVersion: '5'
+ opVersion: '6'
opStatus: default
opDef: !def
enable: true
@@ -16,6 +16,9 @@ opDef: !def
file: src/operators/sdf/ellipsoidSdf.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/sdf/ellipsoidSdf.md
+ name: help
keywords:
- circle
- oval
diff --git a/src/operators/sdf/helixSdf.glsl b/src/operators/sdf/helixSdf.glsl
index 584314f1e..fb8c3b5ed 100644
--- a/src/operators/sdf/helixSdf.glsl
+++ b/src/operators/sdf/helixSdf.glsl
@@ -1,3 +1,25 @@
+Sdf THIS_dualHelix(CoordT p, ContextT ctx, float radius, float spread, float dualSpread, float thickness) {
+ vec2 q = hx_prepDualHelixCoords(p, radius, spread, dualSpread);
+ Sdf res;
+ #ifdef THIS_HAS_INPUT_crossSection
+ res = adaptAsSdf(inputOp_crossSection(q, ctx));
+ #else
+ res = createSdf(length(q) - thickness);
+ #endif
+ return res;
+}
+
+Sdf THIS_singleHelix(CoordT p, float radius, float spread, float thickness) {
+ p = p.yxz;
+ vec3 helix = hx_closestHelix(p, spread, radius);
+ float d = length(p - helix) - thickness;
+ vec3 hp = hx_helixCoords(p, helix, spread, radius);
+ vec2 uv = vec2(hp.x, atan(hp.y, hp.z) / PI / 2.);
+ Sdf res = createSdf(d);
+ assignUV(res, vec3(uv, 0));
+ return res;
+}
+
ReturnT thismap(CoordT p, ContextT ctx) {
ReturnT res;
CoordT p0 = p;
@@ -10,8 +32,6 @@ ReturnT thismap(CoordT p, ContextT ctx) {
if (IS_TRUE(THIS_Reverse)) {
p.x *= -1;
}
- float thickness = THIS_Thickness;
- float radius = THIS_Radius;
#ifdef THIS_EXPOSE_axisoffset
THIS_axisoffset = p.y;
#endif
@@ -21,29 +41,13 @@ ReturnT thismap(CoordT p, ContextT ctx) {
#ifdef THIS_EXPOSE_normangle
THIS_normangle = (atan(p.z, p.x) / TAU) + .5;
#endif
+ float thickness = THIS_Thickness;
#ifdef THIS_HAS_INPUT_thicknessField
- {
- #if defined(inputOp_thicknessField_COORD_TYPE_float)
- thickness *= inputOp_thicknessField(p.y, ctx);
- #elif defined(inputOp_thicknessField_COORD_TYPE_vec2)
- thickness *= inputOp_thicknessField(vec2(p.y, atan(p.z, p.x)), ctx);
- #elif defined(inputOp_thicknessField_COORD_TYPE_vec3)
thickness *= inputOp_thicknessField(p0, ctx);
- #else
- #error invalidThicknessCoordType
- #endif
- }
#endif
+ float radius = THIS_Radius;
#ifdef THIS_HAS_INPUT_radiusField
- {
- #if defined(inputOp_radiusField_COORD_TYPE_float)
- radius *= inputOp_radiusField(p.y, ctx);
- #elif defined(inputOp_radiusField_COORD_TYPE_vec3)
radius *= inputOp_radiusField(p0, ctx);
- #else
- #error invalidRadiusCoordType
- #endif
- }
#endif
#ifdef THIS_HAS_INPUT_spreadField
float m = inputOp_spreadField(p0, ctx);
@@ -51,18 +55,6 @@ ReturnT thismap(CoordT p, ContextT ctx) {
float m = THIS_Spread;
#endif
float dualSpread = THIS_Dualspread * radius;
- float halfm = m*.5,
- b = mod(p.y, PI*m) - PI*halfm,
- a = abs(atan(p.x, p.z) * halfm - b);
- if (a > PI*halfm) a = PI*m - a;
- //optimisation from Shane
- p.xy = vec2(length(p.xz) - radius, a);
- p.x = abs(p.x) - dualSpread;
- vec2 q = p.xy;
- #ifdef THIS_HAS_INPUT_crossSection
- res = adaptAsSdf(inputOp_crossSection(q, ctx));
- #else
- res = createSdf(length(q) - thickness);
- #endif
+ BODY();
return res;
}
\ No newline at end of file
diff --git a/src/operators/sdf/helixSdf.md b/src/operators/sdf/helixSdf.md
index 8a6716e9f..b819da83d 100644
--- a/src/operators/sdf/helixSdf.md
+++ b/src/operators/sdf/helixSdf.md
@@ -1,5 +1,11 @@
SDF for a helix (an elongated spiral).
+There are two variations of the helix: dual and single.
+The dual variation can do two parallel rails, and supports using a 2D cross-section SDF, but no UV coordinates.
+The single variation is just one part, and does not support cross-sections, but does have UV coordinates.
+
+The single variation is based on [Helix Distance](https://www.shadertoy.com/view/MstcWs) by tdhooper.
+
## Parameters
* `Enable`
@@ -12,8 +18,20 @@ SDF for a helix (an elongated spiral).
* `Thickness`
* `Spread`
* `Dualspread`
+* `Helixtype`
+ * `dual`
+ * `single`
+* `Reverse`
## Inputs
-* `radius_field_definition_in` *Radius Field*: Field used to multiply the `Radius` parameter. If it uses 1D coordinates, it is provided the position along the axis. If it uses 3D coordinates, it uses the absolute position.
-* `thickness_field_definition_in` *Thickness Field*: Field used to multiply the `Thickness` parameter. If it uses 1D coordinates, it is provided the position along the axis. If it uses 3D coordinates, it uses the absolute position.
\ No newline at end of file
+* `thicknessField`: Field used to multiply the `Radius` parameter. If it uses 1D coordinates, it is provided the position along the axis. If it uses 3D coordinates, it uses the absolute position.
+* `radiusField`: Field used to multiply the `Thickness` parameter. If it uses 1D coordinates, it is provided the position along the axis. If it uses 3D coordinates, it uses the absolute position.
+* `spreadField`:
+* `crossSection`:
+
+## Variables
+
+* `axisoffset`:
+* `angle`:
+* `normangle`:
\ No newline at end of file
diff --git a/src/operators/sdf/helixSdf.tox b/src/operators/sdf/helixSdf.tox
index 61cf1a4ae..64526ef03 100644
Binary files a/src/operators/sdf/helixSdf.tox and b/src/operators/sdf/helixSdf.tox differ
diff --git a/src/operators/sdf/helixSdf.yaml b/src/operators/sdf/helixSdf.yaml
index d9967f1de..59042fcf1 100644
--- a/src/operators/sdf/helixSdf.yaml
+++ b/src/operators/sdf/helixSdf.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf.helixSdf
- opVersion: '18'
+ opVersion: '20'
opStatus: default
opDef: !def
enable: true
@@ -16,6 +16,8 @@ opDef: !def
file: src/operators/sdf/helixSdf.glsl
name: functionTemplate
paramGroupTable: eval_params
+ libraryNames: !expr
+ expr: op('helixSdf_lib')
variableTable: !table
file: src/operators/sdf/helixSdf_variables.txt
name: variable_exprs
@@ -34,8 +36,6 @@ inputs:
Localalias: thicknessField
Variables: axisoffset angle normangle
coordType: !coordT
- Coordtypefloat: true
- Coordtypevec2: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
@@ -46,7 +46,6 @@ inputs:
Variables: axisoffset angle normangle
Variableinputs: thicknessField
coordType: !coordT
- Coordtypefloat: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
@@ -57,7 +56,6 @@ inputs:
Variables: axisoffset angle normangle
Variableinputs: thicknessField radiusField
coordType: !coordT
- Coordtypefloat: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
@@ -67,6 +65,8 @@ inputs:
Localalias: crossSection
Variables: axisoffset angle normangle
Variableinputs: thicknessField radiusField spreadField
+ Prohibited: !expr
+ expr: parent().par.Helixtype != 'dual'
coordType: !coordT
Coordtypevec2: true
contextType: !contextT
@@ -74,3 +74,17 @@ inputs:
returnType: !returnT
Returntypesdf: true
Returntypefloat: true
+elements:
+- !opElement
+ name: codeSwitcher_Helixtype
+ elementType: codeSwitcher
+ params:
+ Elementroot: ''
+ Table: helixTypes
+ Param: Helixtype
+ Autoupdateparams: true
+ Manageparamstates: true
+ Alwaysincludeallparams: false
+ Switchmode: autoconst
+ Indexexpr: ''
+ Placeholder: BODY();
diff --git a/src/operators/sdf/helixSdf_helixTypes.txt b/src/operators/sdf/helixSdf_helixTypes.txt
new file mode 100644
index 000000000..fd8640305
--- /dev/null
+++ b/src/operators/sdf/helixSdf_helixTypes.txt
@@ -0,0 +1,3 @@
+name label code params
+dual Dual res = THIS_dualHelix(p, ctx, radius, m, dualSpread, thickness); Dualspread
+single Single res = THIS_singleHelix(p, radius, m, thickness);
diff --git a/src/operators/sdf/helixSdf_lib.glsl b/src/operators/sdf/helixSdf_lib.glsl
new file mode 100644
index 000000000..0b964df0e
--- /dev/null
+++ b/src/operators/sdf/helixSdf_lib.glsl
@@ -0,0 +1,85 @@
+vec2 hx_prepDualHelixCoords(vec3 p, float radius, float spread, float dualSpread) {
+ float halfm = spread*.5,
+ b = mod(p.y, PI*spread) - PI*halfm,
+ a = abs(atan(p.x, p.z) * halfm - b);
+ if (a > PI*halfm) a = PI*spread - a;
+ //optimisation from Shane
+ p.xy = vec2(length(p.xz) - radius, a);
+ p.x = abs(p.x) - dualSpread;
+ return p.xy;
+}
+
+// Helix Distance by tdhooper
+// https://www.shadertoy.com/view/MstcWs
+
+
+// Cartesian to polar coordinates
+vec3 hx_cartToPolar(vec3 p) {
+ float x = p.x; // distance from the plane it lies on
+ float a = atan(p.y, p.z); // angle around center
+ float r = length(p.zy); // distance from center
+ return vec3(x, a, r);
+}
+
+// Polar to cartesian coordinates
+vec3 hx_polarToCart(vec3 p) {
+ return vec3(
+ p.x,
+ sin(p.y) * p.z,
+ cos(p.y) * p.z
+ );
+}
+
+vec2 hx_closestPointOnRepeatedLine(vec2 line, vec2 point){
+ // Angle of the line
+ float a = atan(line.x, line.y);
+
+ // Rotate space so we can easily repeat along
+ // one dimension
+ pR(point, -a);
+
+ // Repeat to create parallel lines at the corners
+ // of the vec2(lead, radius) polar bounding area
+ float repeatSize = sin(a) * line.y;
+ float cell = pMod1(point.x, repeatSize);
+
+ // Rotate space back to where it was
+ pR(point, a);
+
+ // Closest point on a line
+ line = normalize(line);
+ float d = dot(point, line);
+ vec2 closest = line * d;
+
+ // Part 2 of the repeat, move the line along it's
+ // perpendicular by the repeat cell
+ vec2 perpendicular = vec2(line.y, -line.x);
+ closest += cell * repeatSize * perpendicular;
+
+ return closest;
+}
+
+// Closest point on a helix
+vec3 hx_closestHelix(vec3 p, float spread, float radius) {
+ p = hx_cartToPolar(p);
+ p.y *= radius;
+
+ vec2 line = vec2(spread, radius * PI * 2.);
+ vec2 closest = hx_closestPointOnRepeatedLine(line, p.xy);
+
+ closest.y /= radius;
+ vec3 closestCart = hx_polarToCart(vec3(closest, radius));
+
+ return closestCart;
+}
+
+// Cartesian to helix coordinates
+vec3 hx_helixCoords(vec3 p, vec3 closest, float spread, float radius) {
+ float helixAngle = atan((2. * PI * radius) / spread);
+ vec3 normal = normalize(closest - vec3(closest.x,0,0));
+ vec3 tangent = vec3(1,0,0) * TDRotateOnAxis(helixAngle, normal);
+ float x = (closest.x / spread) * radius * PI * 2.;
+ float y = dot(p - closest, cross(tangent, normal));
+ float z = dot(p - closest, normal);
+ return vec3(x,y,z);
+}
\ No newline at end of file
diff --git a/src/operators/sdf/springSdf.tox b/src/operators/sdf/springSdf.tox
index e21b7e6cd..7bf4f7700 100644
Binary files a/src/operators/sdf/springSdf.tox and b/src/operators/sdf/springSdf.tox differ
diff --git a/src/operators/sdf/springSdf.yaml b/src/operators/sdf/springSdf.yaml
index 1871e1077..37a09109e 100644
--- a/src/operators/sdf/springSdf.yaml
+++ b/src/operators/sdf/springSdf.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf.springSdf
- opVersion: '3'
+ opVersion: '4'
opStatus: default
opDef: !def
enable: true
@@ -31,7 +31,6 @@ inputs:
Localalias: heightField
Variables: axisoffset angle normangle
coordType: !coordT
- Coordtypefloat: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
@@ -42,7 +41,6 @@ inputs:
Variables: axisoffset normoffset angle normangle
Variableinputs: heightField
coordType: !coordT
- Coordtypefloat: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
@@ -53,7 +51,6 @@ inputs:
Variables: axisoffset normoffset angle normangle
Variableinputs: heightField radiusField
coordType: !coordT
- Coordtypefloat: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
@@ -64,8 +61,6 @@ inputs:
Variables: axisoffset normoffset angle normangle
Variableinputs: heightField radiusField coilsField
coordType: !coordT
- Coordtypefloat: true
- Coordtypevec2: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
diff --git a/src/operators/sdf2d/arbitraryPolygonSdf2d.md b/src/operators/sdf2d/arbitraryPolygonSdf2d.md
new file mode 100644
index 000000000..1a621d29c
--- /dev/null
+++ b/src/operators/sdf2d/arbitraryPolygonSdf2d.md
@@ -0,0 +1,22 @@
+Polygonal area with arbitrarily positioned points.
+
+Points can either be specified with parameters or by passing in a CHOP.
+
+If a CHOP is used, only the first N samples are used where N is the Max Points parameter. The first two channels of the CHOP are used for the X and Y, regardless of their names.
+
+## Parameters
+
+* `Source`: Whether to specify points using parameters or a CHOP input.
+ * `params`
+ * `chop`
+* `Pointcount`: Number of points.
+* `Pointschop`: CHOP used for point positions.
+* `Maxpointcount`: Maximum number of points allowed in the provided CHOP.
+* `Point1`
+* `Point2`
+* `Point3`
+* `Point4`
+* `Point5`
+* `Point6`
+* `Point7`
+* `Point8`
\ No newline at end of file
diff --git a/src/operators/sdf2d/arbitraryPolygonSdf2d.tox b/src/operators/sdf2d/arbitraryPolygonSdf2d.tox
index 50ab50c4e..e5811d8e6 100644
Binary files a/src/operators/sdf2d/arbitraryPolygonSdf2d.tox and b/src/operators/sdf2d/arbitraryPolygonSdf2d.tox differ
diff --git a/src/operators/sdf2d/arbitraryPolygonSdf2d.yaml b/src/operators/sdf2d/arbitraryPolygonSdf2d.yaml
index 591fe6f40..dac50672b 100644
--- a/src/operators/sdf2d/arbitraryPolygonSdf2d.yaml
+++ b/src/operators/sdf2d/arbitraryPolygonSdf2d.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf2d.arbitraryPolygonSdf2d
- opVersion: '3'
+ opVersion: '4'
opStatus: default
opDef: !def
enable: true
@@ -27,3 +27,6 @@ opDef: !def
name: macro_exprs
evaluate: true
evalOpts: !evalOpts {}
+ help: !text
+ file: src/operators/sdf2d/arbitraryPolygonSdf2d.md
+ name: help
diff --git a/src/operators/sdf2d/arcSdf2d.md b/src/operators/sdf2d/arcSdf2d.md
new file mode 100644
index 000000000..c3c6db5c5
--- /dev/null
+++ b/src/operators/sdf2d/arcSdf2d.md
@@ -0,0 +1,19 @@
+Radial arc, a segment of a circular path, with rounded ends.
+
+## Parameters
+
+* `Orientation`: Angle of the center of the arc in degrees.
+* `Aperture`: Range of the arc in degrees.
+* `Radius`: Radius of the circle which the arc is taken from.
+* `Thickness`: Thickness of the arc.
+
+## Inputs
+
+* `orientationField`: Field used to offset the orientation angle, in degrees.
+* `apertureField`: Field used to override the aperture angle, in degrees.
+* `radiusField`: Field used to multiply the circle radius.
+* `thicknessField`: Field used to multiply the thickness of the arc.
+
+## Variables
+
+* `normangle`: Angle from one end of the arc to the other, normalized to a 0..1 range.
\ No newline at end of file
diff --git a/src/operators/sdf2d/arcSdf2d.tox b/src/operators/sdf2d/arcSdf2d.tox
index 6d92a9ced..a72173afc 100644
Binary files a/src/operators/sdf2d/arcSdf2d.tox and b/src/operators/sdf2d/arcSdf2d.tox differ
diff --git a/src/operators/sdf2d/arcSdf2d.yaml b/src/operators/sdf2d/arcSdf2d.yaml
index 77f31b2d2..354183932 100644
--- a/src/operators/sdf2d/arcSdf2d.yaml
+++ b/src/operators/sdf2d/arcSdf2d.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf2d.arcSdf2d
- opVersion: '9'
+ opVersion: '10'
opStatus: default
opDef: !def
enable: true
@@ -22,6 +22,9 @@ opDef: !def
evaluate: true
evalOpts: !evalOpts
excludeFirstRow: true
+ help: !text
+ file: src/operators/sdf2d/arcSdf2d.md
+ name: help
inputs:
- !input
Localalias: orientationField
diff --git a/src/operators/sdf2d/archSdf2d.md b/src/operators/sdf2d/archSdf2d.md
new file mode 100644
index 000000000..75eb675c9
--- /dev/null
+++ b/src/operators/sdf2d/archSdf2d.md
@@ -0,0 +1,9 @@
+Arched doorway shape with a rounded top and rectangular bottom.
+
+## Parameters
+
+* `Scale`: Width and height of the shape. The width is also used as the radius of the top curve.
+
+## Inputs
+
+* `scaleField`: Field used to multiply the width and height of the shape.
\ No newline at end of file
diff --git a/src/operators/sdf2d/archSdf2d.tox b/src/operators/sdf2d/archSdf2d.tox
index 30a6c881a..8aab8aa2e 100644
Binary files a/src/operators/sdf2d/archSdf2d.tox and b/src/operators/sdf2d/archSdf2d.tox differ
diff --git a/src/operators/sdf2d/archSdf2d.yaml b/src/operators/sdf2d/archSdf2d.yaml
index 0a9ad74d1..eb630f631 100644
--- a/src/operators/sdf2d/archSdf2d.yaml
+++ b/src/operators/sdf2d/archSdf2d.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf2d.archSdf2d
- opVersion: '2'
+ opVersion: '3'
opStatus: default
opDef: !def
enable: true
@@ -16,6 +16,9 @@ opDef: !def
file: src/operators/sdf2d/archSdf2d.glsl
name: function
paramGroupTable: eval_params
+ help: !text
+ file: src/operators/sdf2d/archSdf2d.md
+ name: help
inputs:
- !input
Localalias: scaleField
diff --git a/src/operators/sdf2d/chamferRectangleSdf2d.md b/src/operators/sdf2d/chamferRectangleSdf2d.md
new file mode 100644
index 000000000..cac414984
--- /dev/null
+++ b/src/operators/sdf2d/chamferRectangleSdf2d.md
@@ -0,0 +1,11 @@
+Rectangle with corners cut off at angles.
+
+## Parameters
+
+* `Scale`: The size of the rectangle on the x and y axes.
+* `Chamfer`: The distance of the corner cuts on each axis. Keep these the same to have 45 degree cuts.
+
+## Inputs
+
+* `scaleField`: Field that multiplies the scale of the rectangle.
+* `chamferField`: Field that overrides the chamfer distances.
\ No newline at end of file
diff --git a/src/operators/sdf2d/chamferRectangleSdf2d.tox b/src/operators/sdf2d/chamferRectangleSdf2d.tox
index 495106dd7..cfa6bcb20 100644
Binary files a/src/operators/sdf2d/chamferRectangleSdf2d.tox and b/src/operators/sdf2d/chamferRectangleSdf2d.tox differ
diff --git a/src/operators/sdf2d/chamferRectangleSdf2d.yaml b/src/operators/sdf2d/chamferRectangleSdf2d.yaml
index dd880b372..5b382c6b1 100644
--- a/src/operators/sdf2d/chamferRectangleSdf2d.yaml
+++ b/src/operators/sdf2d/chamferRectangleSdf2d.yaml
@@ -1,7 +1,7 @@
!rop
meta: !meta
opType: raytk.operators.sdf2d.chamferRectangleSdf2d
- opVersion: '1'
+ opVersion: '2'
opStatus: default
opDef: !def
enable: true
@@ -18,6 +18,9 @@ opDef: !def
paramGroupTable: eval_params
libraryNames: !expr
expr: op('chamferRectangleSdf2d_lib')
+ help: !text
+ file: src/operators/sdf2d/chamferRectangleSdf2d.md
+ name: help
inputs:
- !input
Localalias: scaleField
diff --git a/src/operators/utility/index.tox b/src/operators/utility/index.tox
index 97b3d95cd..feb8564c3 100644
Binary files a/src/operators/utility/index.tox and b/src/operators/utility/index.tox differ
diff --git a/src/operators/utility/restrictTypes.glsl b/src/operators/utility/restrictTypes.glsl
new file mode 100644
index 000000000..12a24cb71
--- /dev/null
+++ b/src/operators/utility/restrictTypes.glsl
@@ -0,0 +1,3 @@
+ReturnT thismap(CoordT p, ContextT ctx) {
+ return inputOp1(p, ctx);
+}
\ No newline at end of file
diff --git a/src/operators/utility/restrictTypes.tox b/src/operators/utility/restrictTypes.tox
new file mode 100644
index 000000000..184e01722
Binary files /dev/null and b/src/operators/utility/restrictTypes.tox differ
diff --git a/src/operators/utility/restrictTypes.yaml b/src/operators/utility/restrictTypes.yaml
new file mode 100644
index 000000000..071f100a9
--- /dev/null
+++ b/src/operators/utility/restrictTypes.yaml
@@ -0,0 +1,61 @@
+!rop
+meta: !meta
+ opType: raytk.operators.utility.restrictTypes
+ opVersion: '0'
+ opStatus: beta
+opDef: !def
+ enable: !expr
+ expr: op('..').par.Enable
+ typeSpec: !ropTypes
+ coordType: !coordT
+ Allcoordtype: true
+ contextType: !contextT
+ Allcontexttype: true
+ returnType: !returnT
+ Allreturntype: true
+ function: !text
+ file: src/operators/utility/restrictTypes.glsl
+ name: function
+ flags: hidden
+inputs:
+- !input
+ Required: true
+ coordType: !coordT
+ Coordtypefloat: !expr
+ expr: parent().par.Coordtype == 'float'
+ Coordtypevec2: !expr
+ expr: parent().par.Coordtype == 'vec2'
+ Coordtypevec3: !expr
+ expr: parent().par.Coordtype == 'vec3'
+ Coordtypevec4: !expr
+ expr: parent().par.Coordtype == 'vec4'
+ contextType: !contextT
+ Contexttypecontext: !expr
+ expr: parent().par.Contexttype == 'Context'
+ Contexttypematerialcontext: !expr
+ expr: parent().par.Contexttype == 'MaterialContext'
+ Contexttypecameracontext: !expr
+ expr: parent().par.Contexttype == 'CameraContext'
+ Contexttypelightcontext: !expr
+ expr: parent().par.Contexttype == 'LightContext'
+ Contexttyperaycontext: !expr
+ expr: parent().par.Contexttype == 'RayContext'
+ Contexttypeparticlecontext: !expr
+ expr: parent().par.Contexttype == 'ParticleContext'
+ Contexttypevertexcontext: !expr
+ expr: parent().par.Contexttype == 'VertexContext'
+ Contexttypepixelcontext: !expr
+ expr: parent().par.Contexttype == 'PixelContext'
+ returnType: !returnT
+ Returntypesdf: !expr
+ expr: parent().par.Returntype == 'Sdf'
+ Returntypefloat: !expr
+ expr: parent().par.Returntype == 'float'
+ Returntypevec4: !expr
+ expr: parent().par.Returntype == 'vec4'
+ Returntyperay: !expr
+ expr: parent().par.Returntype == 'Ray'
+ Returntypelight: !expr
+ expr: parent().par.Returntype == 'Light'
+ Returntypeparticle: !expr
+ expr: parent().par.Returntype == 'Particle'
diff --git a/src/raytk.tox b/src/raytk.tox
index c5db9c30e..b68174d52 100644
Binary files a/src/raytk.tox and b/src/raytk.tox differ
diff --git a/src/tools/editorTools/editorActions.py b/src/tools/editorTools/editorActions.py
index 3ccb10007..e91923540 100644
--- a/src/tools/editorTools/editorActions.py
+++ b/src/tools/editorTools/editorActions.py
@@ -1,5 +1,5 @@
import json
-from raytkUtil import ROPInfo
+from raytkUtil import ROPInfo, mergeDicts
from typing import Tuple
from editorToolsCommon import *
@@ -92,10 +92,9 @@ def _loadTypeFields():
def _createVarRefGroup(text: str):
def getVariableObjs(ctx: ActionContext):
- info = ROPInfo(ctx.primaryOp)
- if not info.isROP:
+ opState = EditorROPState(ctx.primaryOp).tryGetRopState()
+ if not opState:
return []
- opState = info.opDefExt.getRopState()
return opState.variables or []
def isValid(ctx: ActionContext) -> bool:
return bool(getVariableObjs(ctx))
@@ -129,7 +128,8 @@ def test(o: OP):
info = ROPInfo(o)
if not info.isROP or info.opType == _RopTypes.assignAttribute:
return False
- return bool(info.opDefExt.getRopState().attributes)
+ opState = EditorROPState(o).tryGetRopState()
+ return bool(opState and opState.attributes)
class _LockPars(OpInit):
def init(self, o: COMP, ctx: ActionContext):
o.par.Attributename.readOnly = True
@@ -137,7 +137,7 @@ def init(self, o: COMP, ctx: ActionContext):
select = RopSelect(test=test)
def getActions(ctx: ActionContext) -> List[Action]:
info = ROPInfo(ctx.primaryOp)
- if not info.isROP:
+ if not info.isROP or not info.opDefExt:
return []
opState = info.opDefExt.getRopState()
return [
@@ -403,6 +403,7 @@ def _createTableBasedGroup(
paramName: str,
select: 'RopSelect',
attach: 'OpAttach',
+ params: dict | None = None,
):
return GroupImpl(
text,
@@ -413,7 +414,7 @@ def _createTableBasedGroup(
ropType=ropType,
select=select,
attach=attach,
- params={paramName: str(table[i, 'name'])},
+ params=mergeDicts({paramName: str(table[i, 'name'])}, params),
)
for i in range(1, table.numRows)
])
@@ -691,9 +692,10 @@ def isValid(ctx: ActionContext):
# assume valid since group wouldn't create it otherwise
return True
def execute(ctx: ActionContext):
- par = ctx.primaryOp.par[parName]
- if par is not None:
- par.readOnly = lock
+ for o in ctx.selectedOps:
+ par = o.par[parName]
+ if par is not None:
+ par.readOnly = lock
return SimpleAction(text, isValid, execute)
def _createLockUnlockSwitcherActionGroup(text, lock: bool):
@@ -736,7 +738,7 @@ def createActionManager():
ActionImpl(
'Convert To Float',
'raytk.operators.field.sdfField',
- select=RopSelect(returnTypes=['Sdf']),
+ select=RopSelect(returnTypes=['Sdf'], excludeOutputOps=True),
attach=AttachOutFromExisting(),
),
ActionImpl(
@@ -786,24 +788,24 @@ def createActionManager():
_createSimplifyRescaleFloatAction('Simplify Rescale Float'),
_createTableBasedGroup(
'Project Plane', op('projectPlanes'), _RopTypes.projectPlane, 'Plane',
- select=RopSelect(coordTypes=['vec2']),
+ select=RopSelect(coordTypes=['vec2'], excludeOutputOps=True),
attach=AttachOutFromExisting(),
),
_createTableBasedGroup(
'Cross Section', op('crossSectionAxes'), _RopTypes.crossSection, 'Axes',
- select=RopSelect(coordTypes=['vec3']),
+ select=RopSelect(coordTypes=['vec3'], excludeOutputOps=True),
attach=AttachOutFromExisting(),
),
ActionImpl(
'Assign Color',
ropType='raytk.operators.filter.assignColor',
- select=RopSelect(returnTypes=['Sdf']),
+ select=RopSelect(returnTypes=['Sdf'], excludeOutputOps=True),
attach=AttachOutFromExisting(),
),
ActionImpl(
'Apply Modular Material',
ropType=_RopTypes.modularMat,
- select=RopSelect(returnTypes=['Sdf']),
+ select=RopSelect(returnTypes=['Sdf'], excludeOutputOps=True),
attach=AttachOutFromExisting(),
),
_createAddInputActionGroup(
@@ -842,22 +844,53 @@ def createActionManager():
select=RopSelect(ropTypes=[_RopTypes.raymarchRender3d, _RopTypes.pointMapRender]),
attach=AttachIntoExisting(inputIndex=2),
),
+ _createTypeListGroup(
+ 'Add Light',
+ typesAndLabels=[
+ ('raytk.operators.light.ambientLight', 'Ambient Light'),
+ ('raytk.operators.light.axisLight', 'Axis Light'),
+ ('raytk.operators.light.directionalLight', 'Directional Light'),
+ ('raytk.operators.light.linkedLight', 'Linked Light'),
+ ('raytk.operators.light.pointLight', 'Point Light'),
+ ('raytk.operators.light.spotLight', 'Spot Light'),
+ ],
+ select=RopSelect(ropTypes=['raytk.operators.light.multiLight']),
+ attach=AttachIntoExisting(useNextInput=True),
+ ),
+ ActionImpl(
+ 'Limit Light Range',
+ 'raytk.operators.filter.limitLight',
+ select=RopSelect(returnTypes=['Light']),
+ attach=AttachOutFromExisting(),
+ ),
+ ActionImpl(
+ 'Add Camera Transform',
+ 'raytk.operators.filter.cameraTransform',
+ select=RopSelect(returnTypes=['Ray']),
+ attach=AttachOutFromExisting(),
+ ),
+ ActionImpl(
+ 'Add Light Transform',
+ 'raytk.operators.filter.lightTransform',
+ select=RopSelect(returnTypes=['Light']),
+ attach=AttachOutFromExisting(),
+ ),
ActionImpl(
'Extrude',
'raytk.operators.convert.extrude',
- select=RopSelect(coordTypes=['vec2'], returnTypes=['Sdf']),
+ select=RopSelect(coordTypes=['vec2'], returnTypes=['Sdf'], excludeOutputOps=True),
attach=AttachOutFromExisting(),
),
ActionImpl(
'Revolve',
'raytk.operators.convert.revolve',
- select=RopSelect(coordTypes=['vec2'], returnTypes=['Sdf']),
+ select=RopSelect(coordTypes=['vec2'], returnTypes=['Sdf'], excludeOutputOps=True),
attach=AttachOutFromExisting(),
),
ActionImpl(
'Colorize 2D SDF',
'raytk.operators.material.colorizeSdf2d',
- select=RopSelect(coordTypes=['vec2'], returnTypes=['Sdf']),
+ select=RopSelect(coordTypes=['vec2'], returnTypes=['Sdf'], excludeOutputOps=True),
attach=AttachOutFromExisting(),
),
_createTableBasedGroup(
@@ -867,7 +900,7 @@ def createActionManager():
table=op('sdfCombineModes'),
select=RopSelect(
returnTypes=['Sdf'],
- multi=True, minCount=2, maxCount=2),
+ multi=True, minCount=2, maxCount=2, excludeOutputOps=True),
attach=AttachOutFromExisting()),
_createTableBasedGroup(
'Arrange SDFs',
@@ -876,17 +909,17 @@ def createActionManager():
table=op('sdfCombineModes'),
select=RopSelect(
returnTypes=['Sdf'],
- multi=True, minCount=2, maxCount=None),
+ multi=True, minCount=2, maxCount=None, excludeOutputOps=True),
attach=AttachOutFromExisting()),
ActionImpl(
'Switch OPs',
ropType='raytk.operators.combine.switch',
- select=RopSelect(multi=True, minCount=2, maxCount=None),
+ select=RopSelect(multi=True, minCount=2, maxCount=None, excludeOutputOps=True),
attach=AttachOutFromExisting()),
ActionImpl(
'Blend OPs',
ropType='raytk.operators.combine.switch',
- select=RopSelect(multi=True, minCount=2, maxCount=None),
+ select=RopSelect(multi=True, minCount=2, maxCount=None, excludeOutputOps=True),
attach=AttachOutFromExisting(),
params={'Blend': True}),
_createTableBasedGroup(
@@ -905,7 +938,27 @@ def createActionManager():
table=op('compositeModes'),
select=RopSelect(
returnTypes=['vec4'],
- multi=True, minCount=True, maxCount=None),
+ multi=True, minCount=2, maxCount=None),
+ attach=AttachOutFromExisting()),
+ _createTableBasedGroup(
+ 'Mix Fields',
+ ropType='raytk.operators.combine.mixFields',
+ paramName='Combinemode',
+ table=op('mixFieldsCombineModes'),
+ select=RopSelect(
+ returnTypes=['vec4'],
+ multi=True, minCount=2, maxCount=None),
+ params={'Returntype': 'vec4'},
+ attach=AttachOutFromExisting()),
+ _createTableBasedGroup(
+ 'Mix Fields',
+ ropType='raytk.operators.combine.mixFields',
+ paramName='Combinemode',
+ table=op('mixFieldsCombineModes'),
+ select=RopSelect(
+ returnTypes=['float'],
+ multi=True, minCount=2, maxCount=None),
+ params={'Returntype': 'float'},
attach=AttachOutFromExisting()),
ActionImpl(
'Merge to Vector',
@@ -942,19 +995,19 @@ def createActionManager():
ActionImpl(
'Add render2D',
ropType=_RopTypes.render2d,
- select=RopSelect(coordTypes=['vec2']),
+ select=RopSelect(coordTypes=['vec2'], excludeOutputOps=True),
attach=AttachOutFromExisting(),
),
ActionImpl(
'Add functionGraphRender',
ropType='raytk.operators.output.functionGraphRender',
- select=RopSelect(coordTypes=['float']),
+ select=RopSelect(coordTypes=['float'], excludeOutputOps=True),
attach=AttachOutFromExisting(),
),
ActionImpl(
'Add raymarchRender3d',
ropType=_RopTypes.raymarchRender3d,
- select=RopSelect(coordTypes=['vec3'], returnTypes=['Sdf']),
+ select=RopSelect(coordTypes=['vec3'], returnTypes=['Sdf'], excludeOutputOps=True),
attach=AttachOutFromExisting(),
),
_createGoToGroup('Go to'),
diff --git a/src/tools/editorTools/editorTools.tox b/src/tools/editorTools/editorTools.tox
index 202c210c1..5aaedb160 100644
Binary files a/src/tools/editorTools/editorTools.tox and b/src/tools/editorTools/editorTools.tox differ
diff --git a/src/tools/editorTools/editorToolsCommon.py b/src/tools/editorTools/editorToolsCommon.py
index 9efcd357e..7e9d9f0b3 100644
--- a/src/tools/editorTools/editorToolsCommon.py
+++ b/src/tools/editorTools/editorToolsCommon.py
@@ -376,6 +376,7 @@ class RopSelect(OpSelect):
ropTypes: Optional[List[str]] = None
coordTypes: Optional[List[str]] = None
returnTypes: Optional[List[str]] = None
+ excludeOutputOps: bool = False
def matches(self, o: OP) -> bool:
if not o:
@@ -391,6 +392,8 @@ def matches(self, o: OP) -> bool:
return False
if self.returnTypes and not opState.hasReturnType(*self.returnTypes):
return False
+ if self.excludeOutputOps and opState.info.isOutput:
+ return False
if self.test and not self.test(o):
return False
return True
diff --git a/src/tools/inspector/BUILD.py b/src/tools/inspector/BUILD.py
index fa40fa020..0922e0933 100644
--- a/src/tools/inspector/BUILD.py
+++ b/src/tools/inspector/BUILD.py
@@ -19,6 +19,7 @@ async def build(context: 'BuildContext'):
'fieldVisualizer',
'inspectorCore',
'bufferInspector',
+ 'outputBuffersPanel',
'opBasicInfoPanel',
'shaderBuilderConfig',
'shaderPanel',
diff --git a/src/tools/inspector/inspector.tox b/src/tools/inspector/inspector.tox
index 8cb3e3dd9..91d4a8853 100644
Binary files a/src/tools/inspector/inspector.tox and b/src/tools/inspector/inspector.tox differ
diff --git a/src/tools/libraryThumbs/BUILD.py b/src/tools/libraryThumbs/BUILD.py
index a2d6bb090..dd7611f16 100644
--- a/src/tools/libraryThumbs/BUILD.py
+++ b/src/tools/libraryThumbs/BUILD.py
@@ -6,11 +6,21 @@
async def build(context: 'BuildContext'):
context.detachTox(parent())
+ context.detachTox(op('thumbImages'))
+ thumbs = ops('thumbImages/thumb_*')
+ context.log(f'Before replicating, found {len(thumbs)} images')
context.log('Replicating thumbnail TOPs')
await context.yieldAsync()
repl = op('thumbFileReplicator')
repl.par.recreateall.pulse()
+ thumbs = ops('thumbImages/thumb_*')
+ context.log(f'After replicating, found {len(thumbs)} images')
+
+ await context.waitFrames(10)
+
+ thumbs = ops('thumbImages/thumb_*')
+ context.log(f'After wait, found {len(thumbs)} images')
context.log(f'Destroying replicator {repl}')
await context.yieldAsync()
diff --git a/tests/testCases/operators/combine/mixFields_test.png b/tests/testCases/operators/combine/mixFields_test.png
new file mode 100644
index 000000000..db390f991
Binary files /dev/null and b/tests/testCases/operators/combine/mixFields_test.png differ
diff --git a/tests/testCases/operators/combine/mixFields_test.tox b/tests/testCases/operators/combine/mixFields_test.tox
new file mode 100644
index 000000000..d9db7134b
Binary files /dev/null and b/tests/testCases/operators/combine/mixFields_test.tox differ
diff --git a/tests/testCases/operators/field/triPlanarTextureField_test.png b/tests/testCases/operators/field/triPlanarTextureField_test.png
index c0378b0e9..191244ef2 100644
Binary files a/tests/testCases/operators/field/triPlanarTextureField_test.png and b/tests/testCases/operators/field/triPlanarTextureField_test.png differ
diff --git a/tests/testCases/operators/filter/adjustColor_light_test.png b/tests/testCases/operators/filter/adjustColor_light_test.png
new file mode 100644
index 000000000..f82b19a8d
Binary files /dev/null and b/tests/testCases/operators/filter/adjustColor_light_test.png differ
diff --git a/tests/testCases/operators/filter/adjustColor_light_test.tox b/tests/testCases/operators/filter/adjustColor_light_test.tox
new file mode 100644
index 000000000..1276f57b9
Binary files /dev/null and b/tests/testCases/operators/filter/adjustColor_light_test.tox differ
diff --git a/tests/testCases/operators/filter/assignUV_test.png b/tests/testCases/operators/filter/assignUV_test.png
index e21c2e684..20f20bc24 100644
Binary files a/tests/testCases/operators/filter/assignUV_test.png and b/tests/testCases/operators/filter/assignUV_test.png differ
diff --git a/tests/testCases/operators/filter/assignUV_test.tox b/tests/testCases/operators/filter/assignUV_test.tox
index 8e56e8caa..dce0718b5 100644
Binary files a/tests/testCases/operators/filter/assignUV_test.tox and b/tests/testCases/operators/filter/assignUV_test.tox differ
diff --git a/tests/testCases/operators/filter/cameraTransform_test.png b/tests/testCases/operators/filter/cameraTransform_test.png
index 8edc39aa6..c581e4051 100644
Binary files a/tests/testCases/operators/filter/cameraTransform_test.png and b/tests/testCases/operators/filter/cameraTransform_test.png differ
diff --git a/tests/testCases/operators/filter/cameraTransform_test.tox b/tests/testCases/operators/filter/cameraTransform_test.tox
index b90ca8de4..e6ef72c6b 100644
Binary files a/tests/testCases/operators/filter/cameraTransform_test.tox and b/tests/testCases/operators/filter/cameraTransform_test.tox differ
diff --git a/tests/testCases/operators/filter/lightTransform_test.png b/tests/testCases/operators/filter/lightTransform_test.png
new file mode 100644
index 000000000..e07381985
Binary files /dev/null and b/tests/testCases/operators/filter/lightTransform_test.png differ
diff --git a/tests/testCases/operators/filter/lightTransform_test.tox b/tests/testCases/operators/filter/lightTransform_test.tox
new file mode 100644
index 000000000..51f137ac5
Binary files /dev/null and b/tests/testCases/operators/filter/lightTransform_test.tox differ
diff --git a/tests/testCases/operators/filter/limitLight_test.png b/tests/testCases/operators/filter/limitLight_test.png
new file mode 100644
index 000000000..51eb204bb
Binary files /dev/null and b/tests/testCases/operators/filter/limitLight_test.png differ
diff --git a/tests/testCases/operators/filter/limitLight_test.tox b/tests/testCases/operators/filter/limitLight_test.tox
new file mode 100644
index 000000000..5b4ad05d0
Binary files /dev/null and b/tests/testCases/operators/filter/limitLight_test.tox differ
diff --git a/tests/testCases/operators/filter/magnet_test.png b/tests/testCases/operators/filter/magnet_test.png
index 753baa9f5..74a64d752 100644
Binary files a/tests/testCases/operators/filter/magnet_test.png and b/tests/testCases/operators/filter/magnet_test.png differ
diff --git a/tests/testCases/operators/filter/magnet_test.tox b/tests/testCases/operators/filter/magnet_test.tox
index 59ccd459d..886a233fb 100644
Binary files a/tests/testCases/operators/filter/magnet_test.tox and b/tests/testCases/operators/filter/magnet_test.tox differ
diff --git a/tests/testCases/operators/filter/mirrorAxes_test.tox b/tests/testCases/operators/filter/mirrorAxes_test.tox
index ac03a332f..fbaca7c66 100644
Binary files a/tests/testCases/operators/filter/mirrorAxes_test.tox and b/tests/testCases/operators/filter/mirrorAxes_test.tox differ
diff --git a/tests/testCases/operators/filter/modulo1D_test.tox b/tests/testCases/operators/filter/modulo1D_test.tox
index bef4fbcc9..1c82c909b 100644
Binary files a/tests/testCases/operators/filter/modulo1D_test.tox and b/tests/testCases/operators/filter/modulo1D_test.tox differ
diff --git a/tests/testCases/operators/filter/modulo3D_test.tox b/tests/testCases/operators/filter/modulo3D_test.tox
index 0cdf4428a..506fd053d 100644
Binary files a/tests/testCases/operators/filter/modulo3D_test.tox and b/tests/testCases/operators/filter/modulo3D_test.tox differ
diff --git a/tests/testCases/operators/filter/moduloSpherical_test.png b/tests/testCases/operators/filter/moduloSpherical_test.png
index 4504f4eda..f28a8fa85 100644
Binary files a/tests/testCases/operators/filter/moduloSpherical_test.png and b/tests/testCases/operators/filter/moduloSpherical_test.png differ
diff --git a/tests/testCases/operators/filter/moduloSpherical_test.tox b/tests/testCases/operators/filter/moduloSpherical_test.tox
index 9f90c274d..b6892102f 100644
Binary files a/tests/testCases/operators/filter/moduloSpherical_test.tox and b/tests/testCases/operators/filter/moduloSpherical_test.tox differ
diff --git a/tests/testCases/operators/filter/moduloToroidal_test.png b/tests/testCases/operators/filter/moduloToroidal_test.png
index 8ea0f39e6..cdd3e51e1 100644
Binary files a/tests/testCases/operators/filter/moduloToroidal_test.png and b/tests/testCases/operators/filter/moduloToroidal_test.png differ
diff --git a/tests/testCases/operators/filter/moduloToroidal_test.tox b/tests/testCases/operators/filter/moduloToroidal_test.tox
index 3555bba87..2c7181f58 100644
Binary files a/tests/testCases/operators/filter/moduloToroidal_test.tox and b/tests/testCases/operators/filter/moduloToroidal_test.tox differ
diff --git a/tests/testCases/operators/filter/radialClone_test.png b/tests/testCases/operators/filter/radialClone_test.png
index 4609fbbc7..29eed8dd6 100644
Binary files a/tests/testCases/operators/filter/radialClone_test.png and b/tests/testCases/operators/filter/radialClone_test.png differ
diff --git a/tests/testCases/operators/filter/radialClone_test.tox b/tests/testCases/operators/filter/radialClone_test.tox
index 5dbe8e5eb..6e6211152 100644
Binary files a/tests/testCases/operators/filter/radialClone_test.tox and b/tests/testCases/operators/filter/radialClone_test.tox differ
diff --git a/tests/testCases/operators/filter/rotateNormals_test.tox b/tests/testCases/operators/filter/rotateNormals_test.tox
index 5c735a16b..26499bf89 100644
Binary files a/tests/testCases/operators/filter/rotateNormals_test.tox and b/tests/testCases/operators/filter/rotateNormals_test.tox differ
diff --git a/tests/testCases/operators/light/axisLight_test.tox b/tests/testCases/operators/light/axisLight_test.tox
index ad39e4560..52b96d7ab 100644
Binary files a/tests/testCases/operators/light/axisLight_test.tox and b/tests/testCases/operators/light/axisLight_test.tox differ
diff --git a/tests/testCases/operators/light/directionalLight_test.png b/tests/testCases/operators/light/directionalLight_test.png
index e852983d8..7f8c3cf46 100644
Binary files a/tests/testCases/operators/light/directionalLight_test.png and b/tests/testCases/operators/light/directionalLight_test.png differ
diff --git a/tests/testCases/operators/light/directionalLight_test.tox b/tests/testCases/operators/light/directionalLight_test.tox
index e578c6a48..bb278f941 100644
Binary files a/tests/testCases/operators/light/directionalLight_test.tox and b/tests/testCases/operators/light/directionalLight_test.tox differ
diff --git a/tests/testCases/operators/light/instanceLight_test.png b/tests/testCases/operators/light/instanceLight_test.png
new file mode 100644
index 000000000..84dd45515
Binary files /dev/null and b/tests/testCases/operators/light/instanceLight_test.png differ
diff --git a/tests/testCases/operators/light/instanceLight_test.tox b/tests/testCases/operators/light/instanceLight_test.tox
new file mode 100644
index 000000000..4d07d701c
Binary files /dev/null and b/tests/testCases/operators/light/instanceLight_test.tox differ
diff --git a/tests/testCases/operators/light/multiLight_test.png b/tests/testCases/operators/light/multiLight_test.png
index 17f633585..6d5022676 100644
Binary files a/tests/testCases/operators/light/multiLight_test.png and b/tests/testCases/operators/light/multiLight_test.png differ
diff --git a/tests/testCases/operators/light/multiLight_test.tox b/tests/testCases/operators/light/multiLight_test.tox
index f47623c5d..67a8b4127 100644
Binary files a/tests/testCases/operators/light/multiLight_test.tox and b/tests/testCases/operators/light/multiLight_test.tox differ
diff --git a/tests/testCases/operators/light/spotLight_test.png b/tests/testCases/operators/light/spotLight_test.png
index 7b12fda07..f134fbcab 100644
Binary files a/tests/testCases/operators/light/spotLight_test.png and b/tests/testCases/operators/light/spotLight_test.png differ
diff --git a/tests/testCases/operators/light/spotLight_test.tox b/tests/testCases/operators/light/spotLight_test.tox
index 67a5d9728..499ef4627 100644
Binary files a/tests/testCases/operators/light/spotLight_test.tox and b/tests/testCases/operators/light/spotLight_test.tox differ
diff --git a/tests/testCases/operators/material/basicMat_test.png b/tests/testCases/operators/material/basicMat_test.png
index b28725ef0..9be7450d8 100644
Binary files a/tests/testCases/operators/material/basicMat_test.png and b/tests/testCases/operators/material/basicMat_test.png differ
diff --git a/tests/testCases/operators/material/basicMat_test.tox b/tests/testCases/operators/material/basicMat_test.tox
index 0a98b7e30..873bb6a03 100644
Binary files a/tests/testCases/operators/material/basicMat_test.tox and b/tests/testCases/operators/material/basicMat_test.tox differ
diff --git a/tests/testCases/operators/material/diffuseContrib_test.png b/tests/testCases/operators/material/diffuseContrib_test.png
index 03fae7fcc..538eb9089 100644
Binary files a/tests/testCases/operators/material/diffuseContrib_test.png and b/tests/testCases/operators/material/diffuseContrib_test.png differ
diff --git a/tests/testCases/operators/material/diffuseContrib_test.tox b/tests/testCases/operators/material/diffuseContrib_test.tox
index d4e26f6eb..48acdf117 100644
Binary files a/tests/testCases/operators/material/diffuseContrib_test.tox and b/tests/testCases/operators/material/diffuseContrib_test.tox differ
diff --git a/tests/testCases/operators/material/iridescenceContrib_test.png b/tests/testCases/operators/material/iridescenceContrib_test.png
index 3720ae4a5..08a691b3d 100644
Binary files a/tests/testCases/operators/material/iridescenceContrib_test.png and b/tests/testCases/operators/material/iridescenceContrib_test.png differ
diff --git a/tests/testCases/operators/material/modularMat_test.png b/tests/testCases/operators/material/modularMat_test.png
index e4252b207..68f3783e1 100644
Binary files a/tests/testCases/operators/material/modularMat_test.png and b/tests/testCases/operators/material/modularMat_test.png differ
diff --git a/tests/testCases/operators/material/modularMat_test.tox b/tests/testCases/operators/material/modularMat_test.tox
index 357311348..9a19b44ab 100644
Binary files a/tests/testCases/operators/material/modularMat_test.tox and b/tests/testCases/operators/material/modularMat_test.tox differ
diff --git a/tests/testCases/operators/material/modularMat_variables_test.tox b/tests/testCases/operators/material/modularMat_variables_test.tox
index 1003e912f..dba6a8d9e 100644
Binary files a/tests/testCases/operators/material/modularMat_variables_test.tox and b/tests/testCases/operators/material/modularMat_variables_test.tox differ
diff --git a/tests/testCases/operators/material/pbrMat_fields_test.tox b/tests/testCases/operators/material/pbrMat_fields_test.tox
index e4abb642b..d98526954 100644
Binary files a/tests/testCases/operators/material/pbrMat_fields_test.tox and b/tests/testCases/operators/material/pbrMat_fields_test.tox differ
diff --git a/tests/testCases/operators/material/pbrMat_test.tox b/tests/testCases/operators/material/pbrMat_test.tox
index 2f7099ccc..b76de917a 100644
Binary files a/tests/testCases/operators/material/pbrMat_test.tox and b/tests/testCases/operators/material/pbrMat_test.tox differ
diff --git a/tests/testCases/operators/material/reflectContrib_test.png b/tests/testCases/operators/material/reflectContrib_test.png
index 7be832c95..8424a6a81 100644
Binary files a/tests/testCases/operators/material/reflectContrib_test.png and b/tests/testCases/operators/material/reflectContrib_test.png differ
diff --git a/tests/testCases/operators/material/reflectContrib_test.tox b/tests/testCases/operators/material/reflectContrib_test.tox
index 9597bb756..d925068d4 100644
Binary files a/tests/testCases/operators/material/reflectContrib_test.tox and b/tests/testCases/operators/material/reflectContrib_test.tox differ
diff --git a/tests/testCases/operators/material/reflectMat_2_test.png b/tests/testCases/operators/material/reflectMat_2_test.png
index 9328f59eb..6971f6e47 100644
Binary files a/tests/testCases/operators/material/reflectMat_2_test.png and b/tests/testCases/operators/material/reflectMat_2_test.png differ
diff --git a/tests/testCases/operators/material/reflectMat_2_test.tox b/tests/testCases/operators/material/reflectMat_2_test.tox
index b12397794..9cf577c09 100644
Binary files a/tests/testCases/operators/material/reflectMat_2_test.tox and b/tests/testCases/operators/material/reflectMat_2_test.tox differ
diff --git a/tests/testCases/operators/material/reflectMat_test.png b/tests/testCases/operators/material/reflectMat_test.png
index ea78a40ab..20e28dfcd 100644
Binary files a/tests/testCases/operators/material/reflectMat_test.png and b/tests/testCases/operators/material/reflectMat_test.png differ
diff --git a/tests/testCases/operators/material/reflectMat_test.tox b/tests/testCases/operators/material/reflectMat_test.tox
index e8d63a3b0..772393936 100644
Binary files a/tests/testCases/operators/material/reflectMat_test.tox and b/tests/testCases/operators/material/reflectMat_test.tox differ
diff --git a/tests/testCases/operators/material/sampledPointMat_test.png b/tests/testCases/operators/material/sampledPointMat_test.png
index c35b74b6e..ba6adadc9 100644
Binary files a/tests/testCases/operators/material/sampledPointMat_test.png and b/tests/testCases/operators/material/sampledPointMat_test.png differ
diff --git a/tests/testCases/operators/material/sampledPointMat_test.tox b/tests/testCases/operators/material/sampledPointMat_test.tox
index 4a54245be..547ab76ba 100644
Binary files a/tests/testCases/operators/material/sampledPointMat_test.tox and b/tests/testCases/operators/material/sampledPointMat_test.tox differ
diff --git a/tests/testCases/operators/material/specularContrib_test.tox b/tests/testCases/operators/material/specularContrib_test.tox
index 982ae4f4d..7d87d0934 100644
Binary files a/tests/testCases/operators/material/specularContrib_test.tox and b/tests/testCases/operators/material/specularContrib_test.tox differ
diff --git a/tests/testCases/operators/output/pointMapRender_field_test.png b/tests/testCases/operators/output/pointMapRender_field_test.png
index a202343f1..ae0e7784a 100644
Binary files a/tests/testCases/operators/output/pointMapRender_field_test.png and b/tests/testCases/operators/output/pointMapRender_field_test.png differ
diff --git a/tests/testCases/operators/output/pointMapRender_field_test.tox b/tests/testCases/operators/output/pointMapRender_field_test.tox
index 9ac4f9657..de75a1134 100644
Binary files a/tests/testCases/operators/output/pointMapRender_field_test.tox and b/tests/testCases/operators/output/pointMapRender_field_test.tox differ
diff --git a/tests/testCases/operators/output/raymarchRender3D_background_test.png b/tests/testCases/operators/output/raymarchRender3D_background_test.png
index e784351cc..d6972635f 100644
Binary files a/tests/testCases/operators/output/raymarchRender3D_background_test.png and b/tests/testCases/operators/output/raymarchRender3D_background_test.png differ
diff --git a/tests/testCases/operators/output/raymarchRender3D_renderComposite_test.tox b/tests/testCases/operators/output/raymarchRender3D_renderComposite_test.tox
index 289b2b520..5737c6f3a 100644
Binary files a/tests/testCases/operators/output/raymarchRender3D_renderComposite_test.tox and b/tests/testCases/operators/output/raymarchRender3D_renderComposite_test.tox differ
diff --git a/tests/testCases/operators/sdf/helixSdf_test.png b/tests/testCases/operators/sdf/helixSdf_test.png
index 56ed20348..a59520743 100644
Binary files a/tests/testCases/operators/sdf/helixSdf_test.png and b/tests/testCases/operators/sdf/helixSdf_test.png differ
diff --git a/tests/testCases/operators/sdf/helixSdf_test.tox b/tests/testCases/operators/sdf/helixSdf_test.tox
index 1b61542ea..54707df4f 100644
Binary files a/tests/testCases/operators/sdf/helixSdf_test.tox and b/tests/testCases/operators/sdf/helixSdf_test.tox differ
diff --git a/tests/testCases/operators/sdf2d/chamferRectangleSdf2d_test.tox b/tests/testCases/operators/sdf2d/chamferRectangleSdf2d_test.tox
index 00d42ab6b..f6c52133b 100644
Binary files a/tests/testCases/operators/sdf2d/chamferRectangleSdf2d_test.tox and b/tests/testCases/operators/sdf2d/chamferRectangleSdf2d_test.tox differ
diff --git a/tests/testCases/operators/utility/restrictTypes_test.png b/tests/testCases/operators/utility/restrictTypes_test.png
new file mode 100644
index 000000000..da65ec7b2
Binary files /dev/null and b/tests/testCases/operators/utility/restrictTypes_test.png differ
diff --git a/tests/testCases/operators/utility/restrictTypes_test.tox b/tests/testCases/operators/utility/restrictTypes_test.tox
new file mode 100644
index 000000000..c767688cb
Binary files /dev/null and b/tests/testCases/operators/utility/restrictTypes_test.tox differ
diff --git a/version.txt b/version.txt
index b7552477f..0f56a86c3 100644
--- a/version.txt
+++ b/version.txt
@@ -1,3 +1,3 @@
-toolkitVersion 0.40
+toolkitVersion 0.41
touchDesignerVersion 099
touchDesignerBuild 2023.11600