Skip to content

Latest commit

 

History

History
136 lines (134 loc) · 5.62 KB

TODO

File metadata and controls

136 lines (134 loc) · 5.62 KB

-*- mode: org; mode: auto-fill -*-

Rename “transform” variables into “matrix”

Rename VECTOR-NOISE &co into VEC-NOISE, etc.

Need RAY-MIN in addition to RAY-EXTENT

Otherwise %FIND-INTERSECTION* can find intersections closer than it wants. This is probably also good for shadow rays, as the existing ray can be modified to walk it. Maybe rename RAY-START and RAY-END. Need to build a test-case, though!

Now that light groups are in place there is no need for SCENE to be a defstruct

Previously SCENE-COMPILED-SCENE needed to be fast. Well, it still does, since it is still used in a few places during rendering: those need to be changed to using the rendering representation, AKA COMPILED-SCENE.

Restructure geometry protocol

Separate out computation of intersection and normal functions

Provide INTERSECTION-LAMBDA

Provide NORMAL-LAMBDA

Check the derived types of computed functions as in shader protocol

Make callers of normal functions allocate a result object for the callee

Restructure CGS protocol

Separate out computation of all-intersections and inside-p functions

Provide INSIDE-P-LAMBDA

Provide ALL-INTERSECTIONS-LAMBDA

Check the derived types of the called functions

Make callers of all-intersections function allocate intersection vectors for the callee

ARCHITECTURE

Share stuff

To save memory

Cache pattern key vectors
Cache pattern function vectors when possible

COMPUTE-PATTERN-FUNCTION needs to return a secondary value that indicates if it can be cached for (a) all cases (b) cases with identical transforms.

Cache constantly functions
Cache matrices

At least IDENTITY-MATRIX should be shared – or maybe I should go back to punning it to NIL, so that a single test is enough for the common case?

Shared CSG shaders

It should be possible to specify a toplevel shader for an entire CGS.

Patterns

COMPOSITE should be COMPOSITE-PATTERN instead

But keys are not keys, weights! And the whole thing is not a pattern, really.

TURBULENCE-PATTERN
STRIPE-PATTERN
BOX-PATTERN

Interpolated: 0 at the edges of the box, 1 at the middle.

OBJECT-PATTERN

Indexed: 1 if point is inside the object, 0 if not. Also repeating!

SLOPE-PATTERN

This is tricky: it needs the surface normal! So need to reconsider things a bit…

Integrate pertubated normals into general shader framework

Automated tests

In addition to functional unit tests, test-scenes and reference images would be golden, along with some sort of timings.

Experiment with colors using generic functions

Prototype-style operations on scene components

Cloning with alterate transforms, etc.

Named scene components (from old)

CSG differences showing the cuttee-surface

This is kind of nice the way it now works, actually, but it should be possible to tell the system to use the either to cuttee or the cutter. (Currently cutter is always used.)

Manual bounding of objects

Light buffers in SHADOW-FUNCTION

CSG bounding

Automatic hierarchies

Deeps CSG should benefit from this

Antialiasing

Translucent shadows

Possibly just a shader?

Support for manual hierarchical bounding

Sometimes humans are better.

Path tracing

Multithreading

One worker-thread per core (configurable.) KD tree can be built in parallel. Raytracing itself is ridiculously parallel.

Ray attenuation in transparent objects

Simple homogenous mediums to start with.

Volumetric rendering

Vista buffer

Projected bounding boxes to make fast decisions. At least those pixels where there is only a single object that can contribute are probably worth dealing with, no matter how good the KD tree is. Saving a perfect vista buffer from previous rendering might also be cool (this requires scenes to know when their geometry has changed, though.)

Photon maps

Backwards raytracing

(Sampling the scene from light sources, collecting only those that hit the image plane.)

OpenGL preview.

Computing functions to shade a given pixel

(Symbolic raytracing.)

Real colors. (Wavelength based rendering.)

SCENE COMPONENTS

Pattern stuff

:wave, :frequency and :phase as a general keyword to interpolated patterns
warps

Area lights

Line-light needs :start and :end keywords
Circular area light
Square area light
All variants buildable with just AREA-LIGHT class

Fake area lights

AKA fake soft shadows, aka cheap soft shadows.

Fake IOR

Aka cheap caustics.

Turbulence shader

Variant reflection

Done as part of texture for metals, but should be available separately.

Fill lights

Make filling selective: shadowed by some objects, not all.

Cylinder

CSG

Torus

Height fields

Radiosity shader

Metallic shaders

Specifying the freshnel ratio

That is, interpolating between the light/reflection and local color.

CAMERAS

Fisheye camera

Focal blur

MISCELLANY

Shearing transformations

Nice constructor on SB-CGA needed.

Scene Description Language