Skip to content

estorok/unity-artifacts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unity Artifacts

Ray-traced Images

rt-3

I implemented a software ray tracer that renders a scene by calculating the color and intensity for each pixel. A ray is cast from the viewer, through the location of the pixel on the screen, into the scene, until it intersects with geometry in the scene.

At the point at which the ray intersects the scene, my code calculates the light intensity at that point according to the presence of light sources in the scene and shadow attenuation using the reflective and matte (specular and diffuse) characteristics of the material. Another ray is recursively cast with direction dependent on the type of intersection (usually a mirror reflection; for transparent objects, the ray is transmitted and bent according to Snell's law, or reflected when the conditions are met for total internal reflection).

Relevant code snippets for calculating shadow attenuation, specular and diffuse reflection, and reflection/refraction directions are included in the code-snippets/ directory.

rt-3-fast.mp4

Videos of the ray tracer in operation are played back at 5-10x actual rendering speed.

rt-1

rt-1-fast.mp4

rt-2

rt-2-fast.mp4

rt-4

rt-4-fast.mp4

About

Images, videos, and short code snippets from projects using the Unity graphics engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages