Skip to content

Latest commit

 

History

History
150 lines (143 loc) · 9.57 KB

File metadata and controls

150 lines (143 loc) · 9.57 KB

Development Notes

This is where I prioritize my dev goals, and drop links, and whatever else during development.

To-Dos

  • Go through all files to clean them up.
  • Non-hierarchical ray-tracer
    • Objects are visible in rendered images (primary rays, intersection with spheres, generate PNG output)
    • Cubes and triangle mesh support.
    • Objects are correctly ordered, aka. depth testing.
    • Function for non-uniform background.
    • Phong illumnation model is implemented (diffuse, specular, and ambient illumination).
      • Diffuse colouring based on normals.
      • Specular highlights based on lights in the scene.
    • Objects cast shadows on other objects.
      • Prevent shadow acne.
  • Hierarchical ray-tracer
    • Hierarchical transformations perform correctly.
      • Support instancing.
      • Support non-axis-aligned cameras.
    • Bounding volumes (spheres or boxes) have been implemented for mesh objects.
  • Antialiasing with super-sampling.
    • Dippe: random stochastic sampling, aka. more than 1 sample per pixel.
    • Sample within sub-boxes so the distribution is better.
    • Painter: Adaptive-progressive refinement with Michelson contrast.
  • README.md description of extra feature.
    • Super-sampling comparison images.
  • nonhier.png, macho-cows.png, simple-cows.png
  • Bounding volume rendering (either nonhier-bb.png or macho-cows-bb.png).
  • Create a cool scene.
  • Add dependencies that previously came from shared folders
    • lodepng, lua, and exchange zlib for miniz.
    • Get MSYS2 and ensure building and running this repo works on my local machine.
  • Set up clang-format with my personal preferences and format everything.
  • Move all third-party C files into vendor/ and use StaticLib in premake4.lua like I did with lua.
  • Convert assets (.obj & .lua) and textures to a better folder structure.
  • Dynamically include hasAlpha for textures.
  • Prettier and more fine-grained progress bar printing.
  • Create a Scene that holds all 3D information and can be passed around more easily.
  • Convert ray architecture from passed-around Rays to independent Rays + PathStates.
  • Make the camera rendering parameters a struct, add cli arguments, extract one-time camera calculations.
    • Take as much business logic out of the lua processing file as possible (eg. Image.hpp).
  • Background sampled from image (.exr in celestial coordinates).
  • Efficiency by intensity thresholds.
    • NOTE: add -O3 flag to buildOptions for better performance.
    • Multithreading using the C++11 threading library.
  • Texture Mapping.
    • Map equirectangular projections onto spheres.
    • Map saturn's rings.
    • Map Alpha when reading .png files.
  • Transmission, basically refraction.
    • Make transmission a vec3 and support absorption colours.
  • DOF (Depth of Field).
  • Emissive property of materials.
  • Monte-Carlo Path Tracing!
  • Ray-marching that traces Schwarzchild geodesics.
  • Accretion disk simulation.
    • Generate a custom texture using perlin noise.
    • Use it!
  • EXR file loading with alpha support, so I can adjust the backgrounds.
  • Set up a basic animation engine.
    • Allow multiple images with different T to be rendered.
    • Convert the render into a .mp4 file via bash.
  • Adaptive step sizes, to speed up the engine and reduce artifacts.
  • Static bird model.
  • Marched intersections become true intersections: march everything!
  • Cubic splines for camera movement.
  • Support per-frame modulation of settings (eg. DOF).
  • Add scene-wide BVH.
  • Draw on paper the opening animation scene (including exclamation point with red light).
  • Draw on paper the infinite mirror / ring scene.
  • Support transformations of nodes (translation, rotation, scaling).
  • Implement opening scene (including clouds, bird movement, exclamation).
  • Implement black hole part of scene.
    • Fix bug where black hole DISINTEGRATES EVERYTHING. Cause: DOF issues.
    • Fix bug where black hole causes the camera to flip backwards. Cause: Black hole had negative mass.
    • Fix the elusive screen-flicker as black hole leaves screen. Cause: Not fast enough 0-scaling.
    • NOT DOING: Fix the elusive black-hole-horizon-mirror bug.
      • Spent 2 hours. No idea what's causing it; the rays are never inside the schwarzchild radius, so I guess it must be "correct."
  • Implement the infinite mirror platform and mirror positions.
  • Infinite mirror scene animation
    • Torus primitive.
    • Spiral mesh on torus.
    • Winged bird.
    • Camera & Bird movement.
  • Implement orange black hole at the end of the world (planets behind it).
  • Make shadow acne protection proportional to something reasonable.
  • Get rid of Material.hpp/cpp and consolidate material code. EDIT: Instead, made new materials.
  • One-time editing of texture files with a tool (tools/EditAssets.cpp).
  • Support any standard equirectangular environment map, in scene .lua files.
  • Fix file and code structure; I'm not a C++ developer and this has been an organizational nightmare.
    • Remove using namespace std and using namespace glm from Utilities.hpp.
    • Header const -> inline constexpr.
    • Make Math.hpp, Random.hpp/.cpp, Constants.hpp utility files, instead of utilities everywhere.
    • Inline some files like Material.cpp, Light.cpp, utils/Colour.cpp using inline.
    • Make sub-folders for materials/ and nodes/.
    • Pre-compute transformation matrices in intersectScene.
  • Fix general floating point and intersection errors on my black hole intersector.
  • Go through each file, ensuring it has a purpose and matches my code style (eg. JointNode).
  • Re-introduce CLI flags specifically for options like path tracing, backface culling, etc.
  • Sobol sequence sampling to support progressive rendering.
  • Diffuse reflection and transmission.
  • Fog / dust (Metropolis algorithm?).
    • Assuming constant density, use exponential decay function rather than Russian Roulette scattering (converges faster).
    • Plasma (BRDF): emissivity and absorption coefficients (proportional to distance).
    • Appropriate blending, so it looks good.
    • Perlin noise adjustments.
  • Mesh texture mapping.
  • Normal mapping.
  • Wavelength-dependent refraction ie. Sampled Spectrums.
  • Replace Scene's GeometryNodes with a general, hittable Entity class.

Known Bugs

  • Constructive interference-looking pattern at edge of very wide spheres with transmission (see test2.lua).
    • CAUSE: Dielectrics were simply not implemented correctly.
  • Firefly-like acne of slightly darker spots within dielectric materials.
    • CAUSE: Adaptive refinement having too loose of a threshold. Fixable as PBRT recommends, check 3x3 square.
  • Alpha texture backsides don't align with their front sides, in a mirrored sort of way.
    • CAUSE: My UV algorithm for Rings and Spheres doesn't account for internal intersection properly.
  • Objects behind a transparent mesh in a relativistically-ray-marched scene will get jaggies.
    • CAUSE: My algorithm is detecting early escape; those parts are assuming escape, but idk why.
    • FIX: Massive-brain: the issue was rays were marching in different phases after hitting an angled object. Now, instead of reconstructing rays at the hit point, I use tMin to let them continue as they were, without getting the same intersection.
  • Objects behind a transparent mesh have subtle black stripes of misses.
    • CAUSE: IDK, but they appeared after the above fix :/
  • [-] Black hole horizon causes a very suspiciously thick horizon mirror, noticeable when geometry is at camera position.
    • CAUSE: IDK, spent 2 hours. Rays are never inside the schwarzchild radius, so I guess it must be "correct"... ⚰️.

Resources