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.






