struct MAGES::MeshDeformations::Editor::AlbedoBaker::BakeInputs

Overview

Inputs for a single albedo transfer bake. More…

struct BakeInputs
{
    // fields

    float3[] SurfaceVertices;
    int[] SurfaceIndices;
    float2[] SurfaceUVs;
    Mesh OriginalMesh;
    Texture2D SourceAlbedo;
    int Resolution;
    Matrix4x4 SourceToSim;
    float Extrusion;
    float MaxRayDistance;
    int DilationTexels;
};

Detailed Documentation

Inputs for a single albedo transfer bake.

Fields

float3[] SurfaceVertices

Boundary-surface rest positions (sim space), fully split — one per emitted corner.

int[] SurfaceIndices

Boundary-surface trivial split indices (0,1,2,...).

float2[] SurfaceUVs

Generated per-vertex wedge UVs, one per SurfaceVertices entry.

Mesh OriginalMesh

The original (pre-tetrahedralization) mesh supplying geometry + UV0. Must be readable.

Texture2D SourceAlbedo

The read-enabled source albedo sampled by the bake.

int Resolution

Output square texture resolution (also the UV-space raster grid).

Matrix4x4 SourceToSim

Transform mapping original-mesh object space into simulation-mesh object space. Identity when the two share object space (the common case; the sim mesh was derived from the original).

float Extrusion

Outward push (sim-space units) applied to the ray origin along +normal before casting, so a ray does not start exactly on a coincident original surface. (Future hook: replace this computed offset with an explicit cage surface supplying per-texel ray origins.)

float MaxRayDistance

Max ray travel (sim-space units) past the surface in each ±normal direction. A ray that finds no original-surface hit within Extrusion + this falls back to a closest-point query.

int DilationTexels

Gutter dilation size in texels (resolution-scaled by the caller).