Skip to content
/ silhouette Public

Experimental Raytracer Written in C to Render STL Files

License

Notifications You must be signed in to change notification settings

ozy/silhouette

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

silhouette

Silhouette is a raytracer that renders STL files written in C.

Usage

./bin/main fileName.stl > fileName.ppm

Basicly write your STL (Non Ascii) file as the first argument and forward the output into a ppm file.

Adjusting Camera

camMatrix variable is responsible for camera placement and direction. Depending on the size of the model, camera needs to be readjusted.

camMatrix = lookAt((V3f){100,100,150},(V3f){0,0,0});
//                     ^ Camera Origin,    ^ Target

Some Renders

A cat render

Colored based on the angle between the ray and the triangle normal -- An angle shader

A cube render

Also angle shader but colored uniquely per axis

A fan render

Rendered with an experimental depth shader that resets every x mm

About

Experimental Raytracer Written in C to Render STL Files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published