From 81fe477f786eb7333524fa33af36d28283dd5275 Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 2 Feb 2026 12:43:34 +0100 Subject: docs: Reorganize 3D.md and integrate tasks - Moved 3D.md into the doc/ directory to centralize documentation. - Updated README.md to reflect the new location of 3D.md. - Captured the action items from 3D.md (visual debug mode, Blender exporter) and added them as a new task (#18) in the PROJECT_CONTEXT.md roadmap. --- 3D.md | 50 -------------------------------------------------- PROJECT_CONTEXT.md | 3 +++ README.md | 1 + doc/3D.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 50 deletions(-) delete mode 100644 3D.md create mode 100644 doc/3D.md diff --git a/3D.md b/3D.md deleted file mode 100644 index e944cbe..0000000 --- a/3D.md +++ /dev/null @@ -1,50 +0,0 @@ -# 3D system and rendering pipeline - -This sub-project describe how the 3D worlds are going to be rendered. -We want a camera to move around moving and dynamic objects. -These objects can be need a physics and collision system. - -## the idea - -Each object has: - * a bounding box or capsule - * a BVH is maintained while these move around physically (or not) - * to render a frame we cull these bounding volumes - * at rendering time, the bounding box or sphere is turned into a quad or triangle - fan and a shader associated with the object is called (after proper world-object-camera transformations) - * each object can be queries for: - a) ray-object intersection ("return the distance from the object at this point P in this direction D") - b) Signed Distance Field ("what is the minimum distance to the object from this point P?") - -So in the end, we'll - a) move the camera and lights along paths - b) transform the bounding volumes and cull for visible boxes - c) project them - d) call the objects' respective shaders for rendering - -We want to use shadow maps, so multi-passes is expected. - -## debugging features - -The assist the visual debugging, we need a 'visual_debug' mode (code to be -removed with STRIP_ALL) that: - - a) draws a wireframe around the bounding volumes (box, etc.) - b) draw the trajectories (camera, objects, ...) - c) show the collision points - d) displays the ray/object intersection interactively - e) show the lights (direction, cone, ...), display their shadow-map in 3d and on-screen (2d). - -This must be captured and tracked as a sub-task - - -## future step - -Have an exporter from Blender modelling software. That would be a converter -from simple blender-exported files to our internal format (as an asset for -our AssetManager or as c++ code directly) - -## latter improvement - -How to handle transparency? Multi-Ray-casting? -We need to think about the lighting strategy. diff --git a/PROJECT_CONTEXT.md b/PROJECT_CONTEXT.md index d21d5d5..ee22a89 100644 --- a/PROJECT_CONTEXT.md +++ b/PROJECT_CONTEXT.md @@ -35,6 +35,9 @@ Style: - **Task #5: Implement Spectrogram Editor** - [ ] Develop a web-based tool (`tools/editor`) for creating and editing `.spec` files visually. - [ ] The tool should support generating `.spec` files from elementary shapes (lines, curves) for extreme compression. +- **Task #18: 3D System Enhancements** + - [ ] **Visual Debug Mode**: Implement a debug overlay (removable with `STRIP_ALL`) to render wireframe bounding volumes, object trajectories, and light source representations. + - [ ] **Blender Exporter**: Create a tool to convert simple Blender scenes into the demo's internal asset format. - **Phase 2: Advanced Size Optimization** - [x] PC+Windows (.exe binary) via MinGW - [ ] Task #4a: Linux Cross-Compilation diff --git a/README.md b/README.md index bfeaf6f..bd11057 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ This is a C++ project aiming to create a cross-platform (Windows, macOS, Linux) - `PROCEDURAL.md`: Details on the procedural texture generation system. - `PROJECT_CONTEXT.md`: A comprehensive overview of the project's architecture, features, and current state. - `SPEC_EDITOR.md`: Plans for a future web-based spectrogram editor tool. +- `3D.md`: Overview of the 3D rendering pipeline and future enhancements. - `TODO.md`: A list of immediate, small-scale tasks. ## Source Code Layout diff --git a/doc/3D.md b/doc/3D.md new file mode 100644 index 0000000..e944cbe --- /dev/null +++ b/doc/3D.md @@ -0,0 +1,50 @@ +# 3D system and rendering pipeline + +This sub-project describe how the 3D worlds are going to be rendered. +We want a camera to move around moving and dynamic objects. +These objects can be need a physics and collision system. + +## the idea + +Each object has: + * a bounding box or capsule + * a BVH is maintained while these move around physically (or not) + * to render a frame we cull these bounding volumes + * at rendering time, the bounding box or sphere is turned into a quad or triangle + fan and a shader associated with the object is called (after proper world-object-camera transformations) + * each object can be queries for: + a) ray-object intersection ("return the distance from the object at this point P in this direction D") + b) Signed Distance Field ("what is the minimum distance to the object from this point P?") + +So in the end, we'll + a) move the camera and lights along paths + b) transform the bounding volumes and cull for visible boxes + c) project them + d) call the objects' respective shaders for rendering + +We want to use shadow maps, so multi-passes is expected. + +## debugging features + +The assist the visual debugging, we need a 'visual_debug' mode (code to be +removed with STRIP_ALL) that: + + a) draws a wireframe around the bounding volumes (box, etc.) + b) draw the trajectories (camera, objects, ...) + c) show the collision points + d) displays the ray/object intersection interactively + e) show the lights (direction, cone, ...), display their shadow-map in 3d and on-screen (2d). + +This must be captured and tracked as a sub-task + + +## future step + +Have an exporter from Blender modelling software. That would be a converter +from simple blender-exported files to our internal format (as an asset for +our AssetManager or as c++ code directly) + +## latter improvement + +How to handle transparency? Multi-Ray-casting? +We need to think about the lighting strategy. -- cgit v1.2.3