Git Product home page Git Product logo

raytracer's Introduction

Raytracer

Documentation

Scenes

scenes/cornell_box.cr

400x400px, 20000 samples / pixel, time: ~4h

scenes/light2.cr

800x400px, 10000 samples / pixel, time: 2h15m

scenes/teapot.cr

400x400px, 100 samples / pixel, no lights, 2464 triangles with interpolated normals, time: 64s, 60s, 120s

The cube map in this example is "Yokohama 3" by Emil "Humus" Persson, licensed under CC BY 3.0

scenes/minecraft.cr

800x400px, 100 samples / pixel, no lights, time: 410s

scenes/fractal1.cr

400x400px, 5 samples / pixel, no lights, time: 3m10s

scenes/fractal2.cr

800x400px, 3 samples / pixel, no lights, time: 18s

scenes/fractal5.cr

400x400px, 5 samples / pixel, no lights, time: 30s

[WIP] scenes/sponza.cr

400x400px, 5000 samples / pixel, 1 light, time: 13h

Model: Crytek Sponza

[WIP] scenes/sponza_phong.cr

400x400px, 5 samples / pixel, 1 light, phong lighting, time: 37s

Model: Crytek Sponza without Banner

scenes/metaball.cr

800x400px, 10 samples / pixel, no lights, time: 5m

The cube map in this example is "Yokohama" by Emil "Humus" Persson, licensed under CC BY 3.0

In order to run this example:

  1. Download the set of cubemaps
  2. Unzip the folder
  3. Convert each .jpg to .png e.g. using mogrify -format png *.jpg etc. (convert is part of the imagemagick)
  4. Copy all six png files (negx.png, negy.png, negz.png, posx.png, posy.png, posz.png) to cube_maps/Yokohama
  5. Mirror negx.png, e.g. using convert negx.png -flop negx.png

Resources

Models

  • teapot.obj (Utah teapot, used by scenes/teapot1.cr)

raytracer's People

Contributors

l3kn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

raytracer's Issues

Update for latest crystal

Just tried these with crystal 0.22 and they don't appear to work.
Any plans to update? BTW images looks very cool.

Missing cube_maps/Yokohama

I wanted to test that particular scene on my machine but it seems the file is missing (wasn't committed to git)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.