Giter Site home page Giter Site logo

Research Ray Tracing about mcthings HOT 11 OPEN

acs avatar acs commented on September 22, 2024
Research Ray Tracing

from mcthings.

Comments (11)

acs avatar acs commented on September 22, 2024

http://raytracey.blogspot.com/2008/08/voxel-ray-tracing-vs-polygon-ray.html (2008): Voxels and ray tracing vs polys

from mcthings.

acs avatar acs commented on September 22, 2024

http://www.realtimerendering.com/raytracinggems/ Advanced Ray Tracing, but with introductory chapters, slides, videos ... and pretty recent, from 2019. Let's take a look. https://developer.nvidia.com/video/GDC-19/RAYTRACINGGEMS Too much advanced yet I have read now all slides and I can understand now a good portion of the contents. Advancing!

from mcthings.

acs avatar acs commented on September 22, 2024

I would love to follow this one, but I need to recover my C++ skills and I need a full weekend: https://github.com/RayTracing/raytracing.github.io Right now, I want to understand the key elements in Ray Tracing.

from mcthings.

acs avatar acs commented on September 22, 2024

Let's try this one: http://www.realtimerendering.com/raytracing/An-Introduction-to-Ray-Tracing-The-Morgan-Kaufmann-Series-in-Computer-Graphics-.pdf

It is the original one from 1989. But it has been updated in 2019 to the 1.3 version. And it is CC-by.

«This book is a revised and edited version of reference material prepared for an intensive one-day course on ray tracing» So probably it is whay I am looking for now!

I am reading this book and at least, the introduction chapter, it is what I was searching for.

from mcthings.

acs avatar acs commented on September 22, 2024

Some links to check:

from mcthings.

acs avatar acs commented on September 22, 2024

A python ray tracer engine: https://gist.github.com/rossant/6046463 evolved in https://excamera.com/sphinx/article-ray.html to a speedier one: https://github.com/jamesbowman/raytrace

https://github.com/martinchristen/pyRT for learning ray tracing with Python

from mcthings.

javiercuervo avatar javiercuervo commented on September 22, 2024

Some links to check:

A podcast episode
https://blog.siggraph.org/2020/06/siggraph-spotlight-episode-35-real-time-ray-tracing-realism.html/

from mcthings.

acs avatar acs commented on September 22, 2024

Ok, let's focus in https://excamera.com/sphinx/article-ray.html to test the ray tracer and maybe, create our own version.

Forked at: https://github.com/acs/raytrace

Let's start with the slower and simpler version: https://gist.github.com/rossant/6046463 Which in the repository is https://github.com/acs/raytrace/blob/master/raytracing.py

from mcthings.

acs avatar acs commented on September 22, 2024

In order to understand ray tracing and to implement it, it is key to understand the different types of lights that exist:

https://www.iu.edu.jo/files/FacultyIT/slides_it/ComputerGraphics/lecture%207.pdf

  • Emitted
  • Ambient
  • Diffuse
  • Specular

In the ray tracer sample, the last three are used. The objects don't emit light in this scene (and in general).

It seems that in the example, the https://en.wikipedia.org/wiki/Phong_reflection_model is used to describe how light is reflected in the objects. So how the objects appears in the scene.

The key logic is how the color of each pixel is defined:

    # Start computing the color.
    col_ray = ambient
    # Lambert shading (diffuse).
    col_ray += obj.get('diffuse_c', diffuse_c) * max(np.dot(N, toL), 0) * color
    # Blinn-Phong shading (specular).
    col_ray += obj.get('specular_c', specular_c) * max(np.dot(N, normalize(toL + toO)), 0) ** specular_k * color_light

And it is pretty natural: the color of each pixels is the sum of ambient light, diffuse light and specular light. Ambient is the same for all visible voxels of the scene. But diffuse and specular are computed using two algorithms.

So for each ray hitting a voxel we compute its color using this method.

from mcthings.

acs avatar acs commented on September 22, 2024

A pretty cool introduction, with a good balance between introducing basic concepts and explaining the whole thing: https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-ray-tracing/adding-reflection-and-refraction (at least for my current vision of ray tracing).

And https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-sphere-intersection describe a minimal ray tracer!

from mcthings.

acs avatar acs commented on September 22, 2024

Visual Ray Tracing algorithm: https://developer.download.nvidia.com/video/GDC-19/RAYTRACINGGEMS_Haines.pdf

Screenshot from 2020-08-02 10-24-29

from mcthings.

Related Issues (20)

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.