A lightweight editor for creating and manipulating Signed Distance Field (SDF) primitives using Python, GLSL, and OpenGL.
SDF Model Editor is an experimental, realβtime tool for designing 3D models using Signed Distance Fields (SDFs). Built with Python, GLSL, ImGui, GLFW, and PyOpenGL, it provides an accessible environment for exploring procedural modeling techniques without the complexity of traditional sculpting workflows.
The current version is a functional demo and a foundation for a more complete editor. The longβterm vision is to make SDFβbased modeling intuitive, playful, and powerful β enabling users to build stylized characters and objects from simple primitives.
![]() |
![]() |
![]() |
|---|---|---|
![]() |
![]() |
![]() |
- Realβtime SDF rendering using GLSL shaders
- Cycles Additional rendering mode (realistic rayβtracing algorithm)
- Smooth boolean operations (union, subtract, intersect, etc.)
- Multiple primitive types (sphere, box, cone, and more)
- ImGuiβbased UI for intuitive interaction
- Save & Load scenes (JSON)
- Export to 3D formats (OBJ via scikitβimage)
- Builtβin GLSL code editor (Tkinter)
- Undo/Redo support
This project is in lateβstage prototype development. The MVP is nearing completion, and the next phase will focus on expanding functionality, improving UX, and preparing for a broader public release.
Your feedback, ideas, and contributions can meaningfully shape the direction of the full editor.
- π Customization
- π§· UX improvements
- π Bug fixes
- π¨ GLSL code editor
- π Localization groundwork
- Free camera movement
- Realβtime transform controls (position, rotation, scale)
- Save/Load (JSON)
- Undo/Redo
- OBJ export
- Gizmoβbased manipulation
- Documentation
- Themes
- Full customization
- Localization (i18n)
- Performance optimizations
Contributions are warmly welcomed β whether you're fixing bugs, proposing features, or exploring SDFs for the first time.
You can help by:
- Reporting issues β Issues
- Suggesting features β Discussions
- Submitting code β Pull Requests
- Reaching out directly β DM on Bluesky
Preβbuilt executables are available in Releases
Linux builds are not yet supported.
git clone https://github.com/EmberNoGlow/SDF-Model-Editor-Demo.git
cd SDF-Model-Editor-Demo
python -m venv .venv
.venv/Scripts/Activate.ps1
pip install -r requirements.txt
python main.pyInstalling
imguirequires a C++ compiler.
Recommended: mingw or Visual Studio Build Tools.
- Navigate to the project directory
- Run:
.\build.ps1 - After message "BUILD COMPLETED SUCCESSFULLY!", the executable will appear in
ReleaseBuildfolder.
- Install PyInstaller
pip install pyinstaller
- Build
pyinstaller --onedir --name sdfeditor --windowed main.py
- Move the executable and required folders (
shaders, fonts,glfw3.dll) into a single directory:
root directory
βββ assets/fonts
β βββ *.ttf files
β
βββ shaders
β βββ fragment
β β βββ cycles.glsl
β β βββ template.glsl
β β
β βββ sdf_library.glsl
β βββ vertex_shader.glsl
β
βββ glfw3.dll
βββ sdfeditor.exe
This project began after exploring Inigo Quilezβs work on SDFs, especially the article on smooth minimum functions. The idea of building expressive 3D characters from just 10β20 primitives was too compelling to ignore.
- Phase 1: Rapid prototyping with AI tools.
- Phase 2: Hitting limitations β complexity, bugs, and tool constraints.
- Phase 3: Two months of refactoring, learning, and rebuilding.
- AI accelerates prototyping, but understanding the code matters.
- Refactoring is not a setback β itβs part of the craft.
- Small, consistent progress leads to real breakthroughs.
- SDF Wikipedia
- Inigo Quilezβs SDF Functions
- Shadertoy (for SDF inspiration)
- Cursor AI (the AI assistant that helped)
This project is licensed under the MIT License β see LICENSE for details.
- Inigo Quilez for best articles about math, sdf, computer graphics, etc.
- AI tools (ChatGPT, Copilot, Cursor) for assistance.
- Open-source community for inspiration and libraries.
This project is an evolving experiment β imperfect, ambitious, and full of potential. Whether you're here to learn, contribute, or build something new, Iβm excited to see where this journey leads.
Letβs create something amazing.
You can help by:
- Starring the repo
- Reporting bugs
- Suggesting ideas
- Sharing the project
Every bit of support helps the editor grow.






