日本語

Development Notes

This page collects implementation and maintenance notes that are useful for contributors and release maintainers.

Architecture

QuickSDFTool/
|-- Content/
|   |-- Materials/        # Preview and toon materials
|   |-- Textures/         # Default textures
|   |-- Widget/           # UMG widget blueprints
|-- Shaders/
|   |-- Private/
|       |-- JumpFloodingCS.usf
|       |-- QuickSDFFastPreview.usf
|-- Source/
    |-- QuickSDFTool/              # Runtime module and UQuickSDFAsset
    |-- QuickSDFToolEditor/        # Editor Mode, paint tool, timeline, processor
    |-- QuickSDFToolShaders/       # Compute shader binding
Module Type Key Dependencies
QuickSDFTool Runtime Core, CoreUObject, Engine, RenderCore, RHI
QuickSDFToolEditor Editor InteractiveToolsFramework, EditorInteractiveToolsFramework, GeometryCore, DynamicMesh, MeshDescription, ModelingComponents, MeshConversion, EditorSubsystem, UMG, Slate, LevelEditor, PropertyEditor, MaterialBaking, DesktopPlatform, ImageWrapper, AssetRegistry
QuickSDFToolShaders Runtime / PostConfigInit Core, CoreUObject, Engine, RenderCore, RHI, Projects

Editor Code Layout

How It Works

  1. Paint: for each light angle, paint a binary mask on the mesh or 2D Canvas.
  2. SDF: convert each mask to a signed distance field.
  3. Interpolate: find transitions between neighboring masks and derive threshold value T.
  4. Composite: automatically choose Monopolar or Bipolar output and pack values into RGBA channels:
    • Monopolar: symmetric shadow behavior, or separate 0-90 / 90-180 values when the selected symmetry mode generates a second half.
    • Bipolar: asymmetric shadow enter/exit values are generated in the legacy combined field, then exported with an R/A/B/G swizzle so the final texture keeps the expected shader layout and the B channel remains the 0-90-side value.
    • UV Island Channel Flip: starts from the 0-90 combined field, fills the 90-180 channels by island-local mirrored sampling, and exports the result as the same RGBA16F / HDR texture format used by normal 0-180 maps.
  5. Export: save the final threshold map as a 16-bit half-float texture.

Live SDF is a preview-only branch: paint masks are downsampled to the selected transient preview resolution, GPU JFA produces an approximate threshold map, and the preview material consumes that render target. Final generation remains on the CPU path so saved textures keep the high-quality output behavior.

Windows pen input flow into QuickSDF

Development Verification

The current development target is UE 5.7.x. For local verification, build a C++ host project with the plugin enabled, then run the QuickSDFTool automation test group when test coverage is required.

Useful verification commands in the Unreal Editor command line or Session Frontend:

Automation RunTests QuickSDFTool
Automation RunTests QuickSDFTool.Core.Timeline
Automation RunTests QuickSDFTool.Core
Automation RunTests QuickSDFTool.MonotonicGuard

The v1.0 release candidate should be validated against sdfbuildEditor Win64 Development, focused timeline automation coverage, QuickSDFTool.Core, and the Monotonic Guard tests.

Manual input verification should include mouse painting plus Windows pen-display/tablet hover, pressure, stroke start/drag/release, 2D Canvas window move/resize behavior, Quick Stroke in 2D Canvas and 3D Paint, and Ctrl + F brush resizing.

Documentation Images

Generated concept diagrams live in docs/images/ and may be updated without a UE editor session:

Real UI screenshots must come from an actual UE editor session, because generated diagrams cannot prove widget state or pen alignment:

Repository Setup Checklist

For maintainers preparing the GitHub page: