volumetricRaymarchRender3D

beta
raytkVolumes
output
volumetricRaymarchRender3D
RayTK
v0.42

Renderer that uses raymarching with volumes instead of SDFs.

Note that this renderer is actively being developed, so it may have some bugs or limitations.

This renderer uses steps that have a constant size, rather than stepping different distances based on how far an SDF says they are from the surface. This makes it more suitable for volumes that are based on fields of density rather than SDFs.

There are two main modes: Solid and Cloud.

Solid mode behaves similarly to regular raymarching, where the rays stop once they hit an area with a density of 1 or more. Then it uses shading similar to a regular raymarchRender3D. This mode works best with volumes that are based on SDFs.

Cloud mode sends rays through the volume, and at each step, it checks the density of the volume. Rays don’t stop marching until they go through the bounding area. The density and color accumulate as the rays go through the volume to produce the final results.

Parameters

Name Description Regular Handling Read-Only Handling
March Mode

Raymarching approach to use.

Semi-Baked Semi-Baked
  • Solid Surface:
  • Cloud:
Step Size

The size of each marching step. Smaller steps will produce more accurate results but will be slower.

Runtime Baked
Area Mode

How to define the area that the rays will march through.

Semi-Baked Semi-Baked
  • Bounding Box: Uses a box defined by `Areacenter` and `Areasize`.
  • Distance Range: Uses a range of distances defined by `Distrange`, so that each ray has the same length, regardless of the direction.
Area Center

Center of the scene bounding box.

Area Size

Size of the scene bounding box.

Dist Range

Minimum and maximum distances where the rays start and end.

Max Distance

Maximum distance. Rays that don’t hit anything will stop at this distance. This is applied on top of the bounding area, so it can generally be fairly high.

Runtime Baked
Resolution

Rendering resolution

Pixel Format
  • Use Input:
  • 8-bit fixed (RGBA):
  • sRGB 8-bit fixed (RGBA):
  • 16-bit float (RGBA):
  • 32-bit float (RGBA):
  • _separator_:
  • 10-bit RGB, 2-bit Alpha, fixed (RGBA):
  • 16-bit fixed (RGBA):
  • 11-bit float (RGB), Positive Values Only:
  • 8-bit fixed (Mono):
  • 16-bit fixed (Mono):
  • 16-bit float (Mono):
  • 32-bit float (Mono):
  • 8-bit fixed (RG):
  • 16-bit fixed (RG):
  • 16-bit float (RG):
  • 32-bit float (RG):
  • 8-bit fixed (A):
  • 16-bit fixed (A):
  • 16-bit float (A):
  • 32-bit float (A):
  • 8-bit fixed (Mono+Alpha):
  • 16-bit fixed (Mono+Alpha):
  • 16-bit float (Mono+Alpha):
  • 32-bit float (Mono+Alpha):
Enable Normal Output

Enable producing normal vectors. For each point, this will produce a vector pointing in the direction that the nearest surface point is facing. These values can be accessed using a renderSelect operator.

Enable Object Id Output

Enable object ID output, which produces a TOP with values assigned with the injectObjectId operator for whichever shape each point is inside.

Enable Debug Output
Enable Custom Output 1
Enable Custom Output 2
Enable Depth Output

Enables the depth output buffer.

Enable World Pos Output

Enables the world xyz position output buffer.

Enable Ray Origin Output

Enables the ray origin (camera position) output buffer.

Enable Ray Direction Output

Enables the ray direction output buffer.

Ray Marching
Max Steps

Maximum number of marching steps. If this is too low, the rays may stop before they finish going through the scene area.

Semi-Baked Semi-Baked
Refinement Steps

Number of steps to take to refine the final position of the ray. This can help reduce artifacts for solid mode.

Semi-Baked Semi-Baked
Enable Normal Smoothing

Enable normal smoothing. This will average the normals of nearby points to produce a smoother result.

Baked Baked
Normal Smoothing

Distance to use for normal smoothing.

Runtime Baked
Time Reference Operator
Shader Builder Config
Customize Shader Config
Ray Offset Field
Ray Offset Amount Runtime Runtime

Inputs

  • Volume: (required) Volume that the rays will march through. This must be a Volume and not an SDF.
    • Coordinate Types: vec3
    • Context Types: Context
    • Return Types: Volume
  • Camera: (optional)
    • Coordinate Types: vec2
    • Context Types: CameraContext
    • Return Types: Ray
  • Light: (optional)
    • Coordinate Types: vec3
    • Context Types: LightContext
    • Return Types: Light
  • rayOffsetField: (optional)
    • From Parameter: Ray Offset Field
    • Coordinate Types: vec2
    • Context Types: Context
    • Return Types: float