Git Product home page Git Product logo

tracing-with-ray's Introduction

tracing-with-ray

4th Homework Assignment for Interactive Computer Graphics

I used Microsoft Visual Studio 2017 and needed to download the eigen3.3.7 library and unpack it into my HWK4 folder. In Microsoft VS 2017, I created Include links to eigen3.3.7, and to the include folder in the COSC4370 (Hwk 4) folder. This homework can be compiled via the debugger in Visual Studio 2017 - compiling should produce a blue cylinder and a green cube. Both the cylinder and cube should have different colors, phong shading, the sphere should cast a shadow on the cylinder, and they should be both reflected onto the bottom of the image frame.

First, I had to decide which 3D object to render: I greatly struggled with rendering a cube and a triangle, so I finally settled upon a cylinder, which was much easier. I created the cylinder and then phong shaded the sphere and cylinder by implementing the ideas and concepts that I used to complete HWK3: spectral shading was difficult to implement since it was hard to translate the functions of OpenGL to Eigen functions.

Then, I implemented shadow casting by testing HitRecords and collisions of our light rays to shapes throughout the image set: I initially had some trouble with artifacts / black dots being rendered on the sphere, but then I reduced them by playing with the spectral lighting settings and increasing the threshold that the t value of the HitRecords was compared to.

I couldn't successfully implement the reflective surfaces, so I implemented something that I hope will suffice: I rendered the mirrored pixels of each shape by lighting up and grey shading a pixel with a y-value offset, providing the appearance of the objects being mirrored across a reflective pool / surface. Please let me know if you have any questions.

Please let me know if you have any problems compiling or displaying any of my images.

tracing-with-ray's People

Contributors

mpaustin1993 avatar

Watchers

 avatar  avatar  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.