Raymarcher Technical & APi Documentation
RM Volume Fractal
Namespace: Raymarcher.Toolkit
The Volume Fractal is a mono class that enables you to generate a fractal formula in a specific 3D render texture and represent the rendered pixels as 'voxels' in a specific tex3DVolumeBox.
The component can be automatically initialized by enabling the 'Auto Initialize' field and assigning a target tex3DVolumeBox with a valid 3D render texture.

Upon start or manual invocation, the fractal will be processed and painted to a dedicated 3D render texture, which can later be used in a specific tex3DVolumeBox or for custom purposes.
You can also manually generate the fractal in the editor by pressing the button at the very bottom, provided all required fields are assigned and properly set.


Properties & Fields
// If enabled, the component will be auto-initialized with the target tex3DVolumeBox upon start
public bool autoInitialize;

// Calculate the fractal every frame (less preferred)
public bool updateEveryFrame = false;
// If update every frame is enabled...
public bool rebuildOverTime = false;
public float rebuildOverTimeIntensity = 0.0005f;
public float rebuildOverTimeNoiseIntensity = 8f;

public float pointSmoothness;

// Fractal settings
public float fractalScale = 0.5f;
public float fractalProgression = 1.5f;
public float fractalSpread = 1.2f;
public Vector3 fractalCenterOffset = Vector3.zero;

// Properties
public bool IsInitialized { get; }
public RMSdf_Tex3DVolumeBox CurrentTargetTex3DVolumeBox { get; }
public RenderTexture WorkingRT3D { get; }
public int CurrentVolumeResolution { get; }
Methods
// Initialize the volume fractal with a target tex3DVolumeBox and a common volume resolution
public void InitializeForTargetTex3DVolumeBox(RMSdf_Tex3DVolumeBox targetTex3DVolumeBox, CommonVolumeResolution volumeResolution)
// Initialize the volume fractal with a target 3D render texture
public void InitializeForTargetRT3D(RenderTexture targetRenderTexture3D)

// Dispose the instance
public void Dispose()

// Dispatch the fractal volume with the current settings
public void DispatchWithCurrentSettings()