The Ray Tracer Challenge: A Test-Driven Guide to Your First 3D Renderer (Pragmatic Bookshelf)

Jamis Buck

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2019-04-02
  • 定價: $1,600
  • 售價: 8.0$1,280
  • 語言: 英文
  • 頁數: 250
  • 裝訂: Paperback
  • ISBN: 1680502719
  • ISBN-13: 9781680502718
  • 相關分類: GPU
  • 立即出貨 (庫存 < 4)

買這商品的人也買了...

相關主題

商品描述

Brace yourself for a fun challenge: build a photorealistic 3D renderer from scratch! It's easier than you think. In just a couple of weeks, build a ray-tracer that renders beautiful scenes with shadows, reflections, brilliant refraction effects, and subjects composed of various graphics primitives: spheres, cubes, cylinders, triangles, and more. With each chapter, implement another piece of the puzzle and move the renderer that much further forward. Do all of this in whichever language and environment you prefer, and do it entirely test-first, so you know it's correct. Recharge yourself with this project's immense potential for personal exploration, experimentation, and discovery.

The renderer is a ray tracer, which means it simulates the physics of light by tracing the path of light rays around your scene. Each exciting chapter presents a bite-sized piece of the puzzle, building on earlier chapters and setting the stage for later ones. Requirements are given in plain English, which you translate into tests and code. When the project is complete, look back and realize you've built an entire system test-first!

There's no research necessary -- all the necessary formulas and algorithms are presented and illustrated right here. Dive into intriguing topics from fundamental concepts such as vectors and matrices; to the algorithms that simulate the intersection of light rays with spheres, planes, cubes, cylinders, and triangles; to geometric patterns such as checkers and rings. Lighting and shading effects, such as shadows and reflections, make your scenes come to life, and constructive solid geometry (CSG) enables you to combine your graphics primitives in simple ways to produce complex shapes.

Play and experiment as you discover the fun of writing a ray tracer. Accept the challenge today!

What You Need:

Aside from a computer, operating system, and programming environment, you'll need a way to display PPM image files. On Windows, programs like Photoshop will work, or free programs like IrfanView. On Mac, no special software is needed, as Preview can open PPM files.

商品描述(中文翻譯)

準備好迎接一個有趣的挑戰:從頭開始建立一個逼真的3D渲染器!這比你想像的要容易。在短短幾週內,建立一個光線追蹤器,可以渲染出帶有陰影、反射、精美折射效果以及由各種圖形基元組成的場景:球體、立方體、圓柱體、三角形等等。每個章節都會實現拼圖的另一塊,使渲染器更加完善。你可以使用任何你喜歡的語言和環境來完成這個項目,並且完全以測試為先,這樣你就知道它是正確的。這個項目具有巨大的潛力,可以讓你進行個人探索、實驗和發現,讓你重新充滿活力。

渲染器是一個光線追蹤器,這意味著它通過追蹤光線在場景中的路徑來模擬光的物理性質。每個令人興奮的章節都呈現了一個小巧的拼圖,建立在前面的章節之上,為後面的章節鋪墊了舞台。要求以簡單的英語給出,你需要將其轉化為測試和代碼。當項目完成時,回頭看看,你會意識到你已經完全以測試為先建立了一個整個系統!

這裡提供了所有必要的公式和算法,無需進行任何研究。從基本概念(如向量和矩陣)到模擬光線與球體、平面、立方體、圓柱體和三角形相交的算法;再到幾何圖案,如棋盤格和圓環。照明和著色效果(如陰影和反射)使你的場景栩栩如生,而構造實體幾何(CSG)使你能夠以簡單的方式組合圖形基元,產生複雜的形狀。

在寫光線追蹤器的過程中玩耍和實驗,發現寫光線追蹤器的樂趣。立即接受這個挑戰吧!

你需要什麼:
除了一台電腦、作業系統和編程環境外,你還需要一種顯示PPM圖像文件的方法。在Windows上,像Photoshop這樣的程序可以工作,或者像IrfanView這樣的免費程序。在Mac上,不需要特殊的軟件,因為預覽可以打開PPM文件。