All Projects → t3kt → raytk

t3kt / raytk

Licence: other
Raymarching shader toolkit for TouchDesigner

Programming Languages

python
139335 projects - #7 most used programming language
GLSL
2045 projects

Projects that are alternatives of or similar to raytk

raymarching
Code for my raymarching in GLSL workshop series
Stars: ✭ 17 (-82.65%)
Mutual labels:  glsl, raymarching
hypVR-Ray
Hyperbolic VR using Raymarching
Stars: ✭ 81 (-17.35%)
Mutual labels:  glsl, raymarching
TD-PostEffectShader
PostEffect Shaders(GLSL) for TouchDesigner
Stars: ✭ 12 (-87.76%)
Mutual labels:  glsl, touchdesigner
touchdesigner light volume
No description or website provided.
Stars: ✭ 21 (-78.57%)
Mutual labels:  glsl, touchdesigner
TD-Flow-ABS
Real-time Flow-based Image and Video Abstraction in TouchDesigner.
Stars: ✭ 72 (-26.53%)
Mutual labels:  glsl, touchdesigner
PhaserCHOP
A TouchDesigner channel operator for phase-staggered animations
Stars: ✭ 15 (-84.69%)
Mutual labels:  glsl, touchdesigner
PhaserCHOP-TD-Summit-Talk
Project files associated with http://github.com/dbraun/PhaserCHOP and David Braun's "Quantitative Easing" talk at the 2019 TouchDesigner Summit https://www.youtube.com/watch?v=S4PQW4f34c8
Stars: ✭ 36 (-63.27%)
Mutual labels:  glsl, touchdesigner
TD-Fancy-Frustum
TouchDesigner components
Stars: ✭ 26 (-73.47%)
Mutual labels:  touchdesigner
ClothTOP
GPU-accelerated Cloth TOP node for TouchDesigner using the NVIDIA Flex physics solver.
Stars: ✭ 33 (-66.33%)
Mutual labels:  touchdesigner
slibs
Single file libraries for C/C++
Stars: ✭ 80 (-18.37%)
Mutual labels:  glsl
BBearEditor-2.0
My own 3D engine & editor in order to learn graphics algorithms and game engine architecture.
Stars: ✭ 32 (-67.35%)
Mutual labels:  glsl
webvs
Audio Visualization rendering library for the browser
Stars: ✭ 87 (-11.22%)
Mutual labels:  glsl
ElectricSheep WebGL
WebGL Electric Sheep Renderer
Stars: ✭ 14 (-85.71%)
Mutual labels:  glsl
sparklemotion
Sparkle Motion
Stars: ✭ 24 (-75.51%)
Mutual labels:  glsl
SdfFontDesigner
Offline font tuning/bitmap generation via shaders
Stars: ✭ 56 (-42.86%)
Mutual labels:  glsl
ProcessingStuff
Various pretty-ish Processing sketches by Odditica. About 50% shaders.
Stars: ✭ 164 (+67.35%)
Mutual labels:  glsl
OpenTK-PathTracer
C# OpenGL Path Tracer, Real-Time GPU accelerated
Stars: ✭ 22 (-77.55%)
Mutual labels:  glsl
glsl-rotate
GLSL rotation functions with matrices: 2D and 3D (with X/Y/Z convenience functions).
Stars: ✭ 54 (-44.9%)
Mutual labels:  glsl
OptimisedCentresOfRotationSkinning
Library to Compute Centres of Rotation for Optimised Centres of Rotation Skinning by Le and Hodgins 2016 "Real-time Skeletal Skinning with Optimized Centers of Rotation"
Stars: ✭ 28 (-71.43%)
Mutual labels:  glsl
WebGL-Distance-Fields
⭐ Realtime Euclidean distance field generation and rendering
Stars: ✭ 50 (-48.98%)
Mutual labels:  glsl

RayTK

RayTK is a library of TouchDesigner components that construct raymarching shaders (and other types of shaders) with networks of COMPs using the TouchDesigner network editor.

RayTK consists of a set of operator (ROP) components, and a set of tools for working with them.

Getting Started

Check out the Getting Started guide on the documentation website.

Troubleshooting

Check out the Troubleshooting Guide.

How RayTK works

Output ROPs

An SDF on its own is just a chunk of data. It needs to be sent to a special "Output" ROP, such as raymarchRender3d. These special ROPs take in one or more ROP inputs, construct a shader based on those inputs, and runs it in a GLSL TOP, to produce various types of image outputs. As the name suggests, raymarchRender3d uses the ROP network to build a raymarching shader, producing a rendered view of your scene, from some sort of camera. It's analagous to a Render TOP, which takes in some Geometry COMPs and renders them to an image.

Regular ROPs and Definition Tables

Each regular (non-output) ROP produces a single output, a DAT containing a data table describing that ROP and all of its inputs. They are known as "Definitions". Unless you are developing the core of the RayTK library itself, you will never need to deal directly with the contents of the definitions. They should be treated as an opaque data type. They're just the "thing" that comes out of a ROP.

Data Types

There are several types of data that a ROP function can return, including:

  • Sdf: An SDF result, including surface distance, material settings, and other properties.
  • float: A single floating point value. These can be used to drive the parameters of other ROPs, such as applying different amounts of rotation for different points in space.
  • vec4: A 4-part vector value. These can be used to drive the parameters of other ROPs, such as applying colors based on position in space.
  • Ray: A position and direction. These are returned by camera ROPs, to determine what direction the ray should march for each pixel of the output.
  • Light: A point in space, and an amount of color. These are returned by light ROPs.

There are several types of coordinates that a ROP can use:

  • vec3: 3D coordinates, which are the main coordinate type for SDFs and raymarching.
  • vec2: 2D coordinates, which are used in 2D SDFs, texture lookups, and screen UV coordinates.
  • float: 1D coordinates, which can be used for 1D vector fields.

Execution Chain

The Output ROP at the end of a chain of ROPs generates a shader along with things like uniforms, textures, etc. It then runs that shader in a GLSL TOP and outputs the results.

Each type of Output ROP has a block of GLSL called the "body", which contains the main() function. The body code will call functions from input ROPs for various purposes.

In the case of render2d (when using a vector field input ROP), it calls the input function once per pixel, to determine the color of that pixel.

In the case of raymarchRender3d, the main scene input is executed once per each step of the rays. In addition to the scene input, raymarchRender3d has an input for a camera function, which called for each pixel of output to determine where the ray goes, and a light function that is called by materials to determine colors.

How and Why Was This Created

The goal of RayTK is to allow artists without a strong knowledge of GLSL to render raymarched scenes, using the familiar elements of the TouchDesigner network editor. Raymarching has been around for a long time, but it is very different from traditional rendering, and it requires a strong knowledge of GLSL and vector math.

RayTK is a ground-up rewrite of a previous similar project, which was based on Patrik Lechner's TDRaymarchToolkit, which was based on hg_sdf and the work of Inigo Quilez.

License

RayTK by tekt (Tommy Etkin) is licensed under CC BY 4.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].