Skip to content

Latest commit

 

History

History
127 lines (89 loc) · 3.63 KB

README.md

File metadata and controls

127 lines (89 loc) · 3.63 KB

Minya Renderer

A CPU raytracer based off of the Raytracing in a Weekend book series by Peter Shirley (https://raytracing.github.io/) and an in progress real time Vulkan rendering engine. It uses a bounding volume hierarchy inorder to accelerate ray tracing.

Cpu Renderer

example render

The cpu raytracer is based off of the Raytracing in a Weekend series by Peter Shirley. It features multiple materials, a GUI written with egui and support for loading arbitrary scenes. The supported materials are described below.

Lambertian

A diffuse material that scatters light in random directions and absorbs a specific color based on the color of the object. The following example render can be used by loading the "Lambertian Demonstration" scenario.

lambertian

Metal

Models a metallic surface. It reflects rays about the normal vector with a random blur based on a predifined "fuzz" variable inorder to model metalic surfaces that are not completly polished. An example of a smooth render is shown below. metallic smooth

When a surface is rough the rays are more likely to be reflected in a random direction and the same scene as above is shown except with a fuzz of 0.6.

metallic

Dielectric

A Dielectric Material simulates a transparent material with diffraction. A dielectric material can be used to simulate glass. An example with low refraction shown below. low refraction

An example with high refraction is shown below. Notice how the orange sphere is distorted by the glassy sphere. high refraction

DiffuseLight

A diffuse light source simply emits light. The light can emmit according to a texture. The texture can be proceedurally generated noise, an image texture or a constant background.

An example of a diffuse light emmitting light according to a texture. diffuse light

Supported Shapes

Many different renderable shapes are supported

Sphere

Spheres support

Axis Aligned Box

Axis Aligned Rectangles

Voxel Grid

Voxel Oct Tree

Supported Transformations

Translation

Rotation

Egui Gui

The gui was built inorder to make debuging and interacting with the renderer easier. It currently has a window for selecting new scenes and a debug log window. The debug log window utilizes the log crate inorder to provide a convient API that differentiates between debug, info, warnings and errors.

INSERT PICTURE HERE

Vulkan Renderer

An in progress vulkan rendering engine is currently under construction. It is planned to use ray tracing. Currently it supports loading some of the scenes from the cpu Minya renderer.

A rendering of the cornell box is shown below.

vulkan cornell_box

erDiagram
    RootNodes["Root Nodes"]{
        id ChildId
        int size
    }

    
    Node{
        id NodeId PK
        VarChar(5) LeafOrParent "Must be 'leaf' or 'parent'"
    }
    Parent{
        id ParentId PK
        id NodeId FK
        id Child00 FK
        id Child01 FK
        id Child10 FK
        id Child11 FK
    }
    Leaf{
        id ParentId PK
        id LeafId FK
        VarChar MaterialType
    }
    SolidMaterial{
        id LeafId
        blob MaterialData
    }
    TranslucentMaterial["Translucent Material"]{
        id LeafId
        blob MaterialData
    }
    Node |{--|| Parent: ""
    Node |{--|| Leaf: ""
    RootNodes ||--o| Node: ""
    SolidMaterial o{--|| Leaf: ""
    TranslucentMaterial o{--|| Leaf: ""
Loading