Standalone Voxel Renderer II

As already mentioned last time, I’ve been exploring some possibilities with ocTrees, specifically trace depth.

When a tree* is traversed to find the closest hit voxel, the processed cells (boxes) of the tree get smaller and smaller with each iteration. It occurred to me to use that like an adjustable level of detail by setting a limit on how deep this search can go (instead of just stopping at the last cell).

*I just realized that I am using a tree model to showcase an ocTree. This honestly wasn’t planned : D.

octree traversal from coarse (size 256) to fine (size 1)

I had to do some extra code so that a voxel’s color and material propagate upwards to their parent cells (and their’s to their parents …) so that these show an average of all values of their children. Setting this parameter per ray opens up a lot of new possibilities: For example, it is possible to use a lower level of detail for secondary rays to save some rendertime, as global illumination generally doesn’t need to be resolved at high fidelity. Or objects at a great distance from the camera could use a lower level of detail so that far away voxels still show as boxes, rather than being so small they are indiscernible from a pixel.

The last point opens up another door I haven’t explored yet: What if these LODs were tied to the depth of field of a camera. Could you simulate „blurriness“ (which basically is a loss of detail outside of the focus region) with these sharp, but less detailed, bigger boxes?

left: smallest voxels are of size 1, right: of size 8

Summary (November/December 2020)

Most of my focus right now is on many points besides of lighting and shading as these are areas I didn’t get to explore much yet with vex.

Also I didn’t want to do lighting and shading algorithms in python, but rather wait until I learned the more performant C#/C++. This might change, but while there are still topics outside of lighting to be explored prepare to see some more flat shaded voxels.

Kategorien:Allgemein, BlogSchlagwörter:, , ,

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden /  Ändern )

Google Foto

Du kommentierst mit Deinem Google-Konto. Abmelden /  Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s