[RAY TRACING] 4.Surface physics for ray tracing

Surface physics for ray tracing

1.Light and illumination

Introduces the physics mechanism why object show their color as you see.

Key words: photons, frequency, wavelength, spectra.

These physics principles is fundamental and each student with high school degree should know them.

2. Four mechanisms of light transport

  • Perfect specular reflection
  • perfect diffuse reflection
  • perfect specular transmission
        * total internal reflection
         * optics for transmission
         * Algebraic solution for T
         * Geometric solution for T
  • perfect diffuse transmission

3. Practical reflection and transmission

Section 2 only introduces the simplified model. There are another 2 problems to solve: rough surface and color shifting.

shading model can solve that.

4. A Shading Model

Here we get a shading model which describe the reflected light as a combination of diffuse and specular components. The result is that we get the light that correctly bounced off complex surfaces, and very realistic shading.

5. Faster Shading

The Hall shading model give us a more simple description of shading model which origins from the model above.



Real Life Experience

  • Cherish time, keep your bottom line. Sleep is important, do not negotiate with others on  this issue.
  • Don’t tell you have learnt something to others, talk is cheap and that is nonsense. Just do it and show the results to others, which is more persuasive.
  • Never tell others what you are going to do or what you are doing now if you are uncertain whether you can finish them. Tell them until you have completed it.
  • Don’t mix hard-working and laborious.
  • Life is harsh, life is harsh, life is harsh. Think about what you can do now, think about housing and other expenses when you enter into the society. Just concentrate on something worth.
  • How to get into work quickly without any interruption? Just don’t want to have a break before you start to work. You should have a break after a period of work or when it comes the ends of one day. Be productive!

[Ray Tracing] 2 Essential ray tracing algorithms

Essential ray tracing algorithms


2.Ray/sphere intersection and mapping

2.1 Intersection of the sphere – Algebraic Solution

calculate the intersection of the sphere and one ray from algebraic perspective

2.2 Intersection of the sphere – Geometric Solution

Use some geometric properties to deduce the computation amount.

2.3 Comparison of algebraic and geometric solution

Algebraic solution uses many replicate calculation like add first and subtract later while geometric solutions reduces this procedure. They in fact are internal unity.

I think there are others approaches in algebraic and geometric to speed up the ray tracing.

2.4 Precision problems

four methods are introduced in float-point calculations when solving intersections.

2.5 Spherical inverse mapping

map the sphere into one plane

3.Ray/plane algorithms

3.1 Ray/plane intersection

Given a plane normal, origin and director of one ray, find the intersection on the plane.
Note: Two-sided plane and one-sided plane are different when finding the intersection.

3.2 Polygon Intersection

Finding if one point on a plane is inside a polygon in that plane.

  • Jordan Curve Theorem: two types introduced in the book, it determines whether the intersection is inside the polygon.

3.3 Convex quadrilateral Inverse mapping

Obtain the location of a point within the convex quadrilateral. Just give the conclusion no derivation. 

Triangle inverse mapping is a special case.

4.Ray/Box intersection

Tell you how to determine if the ray intersects the box but don’t tell you why.

5.Ray/Quadric intersection and mapping

5.1 Ray/Quadric Intersection

Give quadric equation to solve the intersection.
A guide to efficiency concern and floating point arithmetic imprecision.

5.2 Standard Inverse Mapping.

  • circle
  • cylinder
  • cone
  • others do not have std inverse mapping


[Ray Tracing] 1 An overview of ray tracing


I write this note to record general ideas and notable details to let me pick them up easily in the following procedure.

I decide to sort them after I find it is easy to forget the chapters you reads before.

1 Image synthesis

Introduce pinhole camera model and determination the average light (color) in one pixel.

2 Tracing rays

2.1 Forward rat tracing

follow photons from their origin at the light and into the scene, tracing their path in a forward direction, just as the photons themselves would have traveled it. unworkable: too much calculation, low computation efficiency

2.2 Backward ray tracing

Follow a ray backwards to find out where it may have begun.

note: ”first object hit by a ray” = ”the first object might have emitted that ray”

Term ”ray tracing” is often referred to backward ray tracing.

2.3 Ray combination

pixel ray/eye ray

illumination ray/shadow ray

reflection ray

transparent ray

2.4 ~ 2.7

These sections introduce the above concepts in detail.


1.Illumination ray or shadow ray are those coming from light source directly.

2. Don’t be confused of the literal meaning of incident ray. We are using backward ray tracing, so incident ray refers to rays into our eye or reflected from the surface.

3 Recursive visibility

Use recursive algorithm in ray tracing

3.1 Surface physics

Introduction of an eye ray propagated through a scene and a ray tree.

4 Aliasing common in signal processing

4.1 Spatial aliasing

cause jaggies with low sampling rate and resolution.

4.2 Temporal aliasing

1.Things are happening too fast to record accurately.

2. Small objects move across the screen and they will blink on or off, or pop.

3. Smoothly moving edges are another kind of pop.

4.3 Anti-aliasing

list some popular approaches to solve aliasing

4.4 ~ 4.7

Super sampling

adaptive super sampling

stochastic ray tracing

statistical ray tracing

The above approaches seem to relative with many algorithms in other fields. Maybe I can use some popular methods in signal processing, control theory and machine learning to get better performance in image.

Rendering equation

The rendering equation can express how light bounces around in a scene mathematically. It is useful and one powerful way to solve it is ray tracing.