Divooka Reference

Geometry Converters

10 nodes

On this page 10

Build Rpr Mesh Data

Function

This node carries no documentation.

Signature
BuildRprMeshData -> Streamed Vertex Mesh Data
    mesh: N-gon Geometry
    generateSmoothNormals: Truth
StreamedVertexMeshData BuildRprMeshData(
    NGonFaceIndexMesh mesh,
    bool generateSmoothNormals = false)

Parameters

nametypedefaultdescription
meshN-gon Geometry—
generateSmoothNormalsTruthFalseWhen true, missing normals are generated by averaging adjacent face normals at each shared position index. Explicit normals are preserved.

Returns

resultStreamed Vertex Mesh Data
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geometry Converters
Package
Procedural Generation

Build Triangle Mesh Indices

Function

Assume mostly it's triangle mesh already.

Signature
BuildTriangleMeshIndices(mesh: N-gon Geometry) -> Integer Array
int[] BuildTriangleMeshIndices(NGonFaceIndexMesh mesh)

Parameters

nametypedefaultdescription
meshN-gon Geometry—

Returns

resultInteger Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geometry Converters
Package
Procedural Generation

Build Vertex Buffer

Function

This node carries no documentation.

Signature
BuildVertexBuffer -> Low Accuracy Number Array
    mesh: N-gon Geometry
    flipCoordinatePosition: Truth
float[] BuildVertexBuffer(
    NGonFaceIndexMesh mesh,
    bool flipCoordinatePosition = true)

Parameters

nametypedefaultdescription
meshN-gon Geometry—
flipCoordinatePositionTruthTrueRudimentary coordinate handling.

Returns

resultLow Accuracy Number Array

Remarks

Divooka -> RPR: rprPosition = (sourceY, sourceZ, sourceX).
This is a cyclic axis permutation with positive determinant, so face winding is preserved.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geometry Converters
Package
Procedural Generation

Half Edge Mesh To N Gon

Function

Converts Representations.HalfEdgeMesh back to Representations.NGonFaceIndexMesh.
Produces 1-based face indices.
Face and vertex order are preserved by ID order as stored in the mesh collections.

Signature
HalfEdgeMeshToNGon -> N-gon Geometry
    source: Topology Mesh
    materialName: Text
    path: Text
NGonFaceIndexMesh HalfEdgeMeshToNGon(
    HalfEdgeMesh source,
    string materialName,
    string path = "/")

Parameters

nametypedefaultdescription
sourceTopology Mesh—
materialNameText—
pathText/

Returns

resultN-gon Geometry

Remarks

Edge IDs are not represented or preserved in Representations.NGonFaceIndexMesh.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geometry Converters
Package
Procedural Generation

N Gon To Half Edge Mesh

Function

Converts between editable half-edge topology and simple face-index mesh representation.

Signature
NGonToHalfEdgeMesh(source: N-gon Geometry) -> Topology Mesh
HalfEdgeMesh NGonToHalfEdgeMesh(NGonFaceIndexMesh source)

Parameters

nametypedefaultdescription
sourceN-gon Geometry—

Returns

resultTopology Mesh

Remarks

Converts Representations.NGonFaceIndexMesh to Representations.HalfEdgeMesh.
Assumes Representations.NGonFaceIndexMesh faces use 1-based indices.
Should be consistent with NGonFaceIndexMesh.BuildUniqueEdgeMap

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geometry Converters
Package
Procedural Generation

To Half Edge Mesh

Function

Converts streamed triangle or quad geometry into a half-edge mesh.

Signature
ToHalfEdgeMesh(source: Streamed Vertex Mesh Data) -> Topology Mesh
HalfEdgeMesh ToHalfEdgeMesh(StreamedVertexMeshData source)

Parameters

nametypedefaultdescription
sourceStreamed Vertex Mesh Data—

Returns

resultTopology Mesh

Remarks

Converts positions and face topology only. Normals, texture coordinates, and colors are not preserved.
Input faces must have consistent winding and valid manifold-compatible topology.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geometry Converters
Package
Procedural Generation

To Interleaved Mesh Data

Function

Overload 1 of 2

Signature
ToInterleavedMeshData(mesh: Vertex Data Triangle Mesh Builder) -> Interleaved Triangle Geometry
InterleavedTriangleGeometry ToInterleavedMeshData(VertexDataTriangleMeshBuilder mesh)

Converts Representations.VertexDataTriangleMeshBuilder into rendering-ready interleaved triangle geometry.
Output layout per vertex:
pos3 normal3 uv2 tangent4.

Parameters

nametypedefaultdescription
meshVertex Data Triangle Mesh Builder—

Returns

resultInterleaved Triangle Geometry

Remarks

- Triangles are assumed 0-indexed.
- VertexNormals.Count == 0 means normals are generated.
- VertexNormals.Count == Vertices.Count means normals are used and normalized.
- UVs.Count == 0 means zero UVs are written.
- UVs.Count == Vertices.Count means UVs are used.
- Tangents are generated from UVs when possible.

Overload 2 of 2

Signature
ToInterleavedMeshData(mesh: N-gon Geometry) -> Interleaved Triangle Geometry
InterleavedTriangleGeometry ToInterleavedMeshData(NGonFaceIndexMesh mesh)

Converts an NGonFaceIndexMesh into flat triangle index buffers.
Output layout per vertex:
pos3 normal3 uv2 tangent4.

Parameters

nametypedefaultdescription
meshN-gon Geometry—

Returns

resultInterleaved Triangle Geometry

Remarks

- Faces are assumed 1-indexed, per NGonFaceIndexMesh contract.
- Faces with 3+ vertices are triangulated using a fan: (0,1,2), (0,2,3), ...
- Face-corner UV/normal seams are preserved by splitting render vertices by (position, uv, normal).
- Missing normals are generated from triangle geometry.
- Tangents are generated from UVs when possible.
- Color data is intentionally ignored because InterleavedTriangleGeometry has no color channel.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geometry Converters
Package
Procedural Generation

To N Gon Face Index Mesh

Function

Converts InterleavedTriangleGeometry back into an NGonFaceIndexMesh.
Produces only triangle faces, since the source no longer preserves original polygon grouping.
Lossy for non-triangle topology, as the original n-gon grouping is gone after triangulation.
Tangents are ignored because NGonFaceIndexMesh has no tangent stream.

Signature
ToNGonFaceIndexMesh(meshData: Interleaved Triangle Geometry) -> N-gon Geometry
NGonFaceIndexMesh ToNGonFaceIndexMesh(InterleavedTriangleGeometry meshData)

Parameters

nametypedefaultdescription
meshDataInterleaved Triangle Geometry—

Returns

resultN-gon Geometry
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geometry Converters
Package
Procedural Generation

To Streamed Vertex Mesh Data

Function

Converts half-edge geometry into streamed indexed mesh data.

Signature
ToStreamedVertexMeshData(source: Topology Mesh) -> Streamed Vertex Mesh Data
StreamedVertexMeshData ToStreamedVertexMeshData(HalfEdgeMesh source)

Parameters

nametypedefaultdescription
sourceTopology Mesh—

Returns

resultStreamed Vertex Mesh Data

Remarks

Converts positions and face topology only. Normal, texture coordinate, and color streams are not generated.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geometry Converters
Package
Procedural Generation

To Yet Another Triangle Mesh

Function

Converts interleaved triangle geometry back into Representations.VertexDataTriangleMeshBuilder.
Produces one mesh vertex per interleaved render vertex, so previously split render vertices remain duplicated.
Tangents are ignored because Representations.VertexDataTriangleMeshBuilder has no tangent stream.

Signature
ToYetAnotherTriangleMesh(meshData: Interleaved Triangle Geometry) -> Vertex Data Triangle Mesh Builder
VertexDataTriangleMeshBuilder ToYetAnotherTriangleMesh(InterleavedTriangleGeometry meshData)

Parameters

nametypedefaultdescription
meshDataInterleaved Triangle Geometry—

Returns

resultVertex Data Triangle Mesh Builder
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Geometry Converters
Package
Procedural Generation