M7.1: Classic 3D renderer, cameras, lights, 3D views and camera-tool commands

- render/three_d: camera eval (one/two-node, DOF), default 50mm comp camera,
  orthographic Front/Left/Top/Back/Right/Bottom + perspective Custom Views,
  orbit/pan/dolly rig math; lights (parallel/spot/point/ambient, falloff,
  cone feather) and material shading; per-pixel depth-sorted compositor for
  3D runs (exact intersections, perspective-correct sampling, blend modes,
  track mattes, motion blur), ray-cast planar shadows with transmission and
  diffusion, per-layer DOF blur. RenderOpts.view camera override.
- project: camera iris/highlight props, aperture per comp width, light
  orientation/rotations, two-node auto-orient defaults.
- engine: layer.newCamera/newLight with presets & settings,
  layer.cameraSettings/lightSettings (Layer Settings dispatches),
  view.set3DView + View > Switch 3D View items (F10/F11/F12), last/reset view,
  camera.orbit/pan/dolly, view.get3D; EditorState.views3d.
- demo: "3D Showcase" comp (camera move, key spot + ambient fill, shadows,
  DOF, intersecting planes, gridded floor).
- tests: projection, depth order, intersections, lighting, shadows, DOF,
  views, rig math; command undo/redo. Fix a few pre-existing clippy lints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-01 21:09:21 -04:00
co-authored by Claude Opus 5.5
parent dee16181fe
commit 76ac3f74f7
21 changed files with 2657 additions and 67 deletions
+3 -1
View File
@@ -9,6 +9,7 @@ mod help;
mod layer;
mod prop;
mod query;
mod three_d;
mod time;
use std::sync::OnceLock;
@@ -68,6 +69,7 @@ pub fn command_specs() -> &'static [CommandSpec] {
v.extend(edit::specs());
v.extend(comp::specs());
v.extend(layer::specs());
v.extend(three_d::specs());
v.extend(prop::specs());
v.extend(effect::specs());
v.extend(time::specs());
@@ -182,6 +184,6 @@ pub(crate) fn time_p(s: &Session, p: &Value, comp: Option<&Comp>) -> Tick {
s.time()
}
pub(crate) fn layer_mut<'a>(p: &'a mut effectcraft_project::Project, cid: ItemId, lid: LayerId) -> Result<&'a mut Layer> {
pub(crate) fn layer_mut(p: &mut effectcraft_project::Project, cid: ItemId, lid: LayerId) -> Result<&mut Layer> {
p.comp_mut(cid).ok_or(EngineError::NoComp)?.layer_mut(lid).ok_or(EngineError::Project(effectcraft_project::ProjectError::NoLayer(lid)))
}