Skip to content

Conversation

Copy link

Copilot AI commented Nov 9, 2025

Node editor lacked options to match different engine coordinate systems and control iso surface density direction for 3D mesh previews.

Changes

UI Controls

  • Add "Up Axis" dropdown: Y-up (default), Z-up (Unreal style), X-up
  • Add "Invert Iso Surface" checkbox for Voxel 3D mode
  • Both persist across sessions via ImGui settings handlers

Coordinate Transformation

  • TransformCoordinates() remaps vertex positions based on selected axis:
    • Y-up: (x, y, z) (no-op)
    • Z-up: (x, -z, y)
    • X-up: (y, z, x)
  • Applied to both voxel and heightmap mesh generation

Iso Surface Logic

  • IsSolid() wraps density comparison with inversion support:
    • Normal: density <= isoSurface
    • Inverted: density >= isoSurface
  • Updated all voxel checks including early-exit optimizations and AO calculations

Implementation

// Before
if( densityValues[noiseIdx] <= buildData.isoSurface ) {
    AddQuadAO(..., Vector3( xf + 1, yf, zf ), ...);
}

// After  
if( IsSolid( densityValues[noiseIdx], buildData.isoSurface, buildData.invertIsoSurface ) ) {
    AddQuadAO(..., TransformCoordinates( xf + 1, yf, zf, buildData.upAxis ), ...);
}

Updated BuildData struct with upAxis and invertIsoSurface fields. Extended AddQuadAO() signature to accept inversion flag for ambient occlusion calculations.

Original prompt

the node editor needs some new configurable options

  • ability to change the up axis for 3d mesh previews, so that if the node trees can match outputs in engines with different up axis
  • ability to change the iso surface density direction for 3d mesh previews, IE is above or below zero solid

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add new configurable options to node editor Add configurable up axis and iso surface inversion for 3D mesh previews Nov 9, 2025
Copilot AI requested a review from Auburn November 9, 2025 13:20
Copilot finished work on behalf of Auburn November 9, 2025 13:20
Copy link
Owner

@Auburn Auburn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a checkbox have a drop down with a more descriptive text on ISO surface direction.
In the axis rotation add a hover popup with common engine configurations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants