Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Related to the ray tracing materials, I taught a two-day crash course on writing a ray tracer. The materials are available online: https://avik-das.github.io/build-your-own-raytracer/


That looks really interesting. One question I have. The Peter Shirley material creates something that has a realistic-ish look. The picture on your page, which I assume is representative of the built tracer, has a very unrealistic look. Do you know what causes this discrepancy?


I use the Phong reflection model (https://en.wikipedia.org/wiki/Phong_reflection_model), which gives materials a distinct plasticky look. Peter's materials are either purely diffuse, purely reflective or glass-like (the third one is something I didn't cover in the course at all).

Peter also uses area lighting derived from the surroundings, whereas my implementation uses point lights that result in sharp specular highlights. There are no surroundings in my image, only the lights.

No doubt Peter's materials look great. I wish I had time to cover more in my course, but I wanted to make sure I covered the prerequisite vector math as well for students without strong mathematical backgrounds.


What images are you comparing? One issue might be that three spheres floating in space just isn't something most people see in real life.


You're absolutely right. Normally, the surroundings provide a form of area lighting that my image doesn't have.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: