Giter VIP home page Giter VIP logo

ray-tracing's Introduction

#RTW 1

Creating First Image

Learnt about PPM and bitmaps

Image 1

Added process indicator and created the same PPM image

Image 2

Learnt about vectors after this, colors and how numbers indicate colors

Create a ray class and printed a blue to white gradient

Added a sphere to the diagram

(Surprisingly learning math in classes helped finally)

Image 3: Sphere and a BG

Continued with surface-normals.

Created a ray_color class and hit_shere class to detect if any ray hits the sphere.

Image 4: Colored sphere according to the surface-normals

Proceeded to add function to check for hittable objects

Then learnt some fancy Cpp codes and pointers and weird codes

After this added antialiasing and learnt a lot about random numbers. The mt19937 generator is quite amazing for how fast it works and then imposing those values on a uniform distribution makes quiet a lot of variation in numbers.

Learnt about diffusing materials.

After that made a sphere with gamma correction and added Lambertian effect.

Metals are very confusing because they can reflect. And yeah that will annoy you. Because scattering and reflectance have a very different meaning. NCERT physics at point feels hopeless

The went to the refraction part and that was fun, somehow trigonometry for it wasn't that confusing. And also added the total internal reflection part weirdly enough these seemed much easier after learning all that stuff before.

Then learnt about defocus blur and for guy who is just in college this blew my mind. This is amazing for what it can do.

It can make those spheres like this. This looks amazing.

And do go and read about Gaussian noise and Perlin noise from Wikipedia and what some videos from YouTube about it. They are absolutely amazing. Intelligent, literally. The random numbers play a huge role in it. (Pseudo random numbers)

Then we create a final render and man this took quite a lot time to render but it's beautiful.

FINAL RENDER

All credits goes to the authors of Ray Tracing In A Weekend

Ray Tracing in One Weekend

ray-tracing's People

Contributors

asad0206 avatar

Watchers

 avatar

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.