Ray Tracing in One Weekend ——Chapter 0: Overview

三部曲:
http://www.realtimerendering.com/raytracing/Ray Tracing in a Weekend.pdf
http://www.realtimerendering.com/raytracing/Ray Tracing_ The Next Week.pdf
http://www.realtimerendering.com/raytracing/Ray Tracing_ the Rest of Your Life.pdf

source code:
https://github.com/RayTracing/raytracing.github.io/blob/master/index.html

i have taught many graphics classes over the years. often i do them in ray tracing, because u are forced to write all the code but u can still get cool images with no api. i decided to adapt 改编 my course notes into a how-to, to get u to a cool program as quickly as possible. it will not be a full-featured ray tracer, but it does have the indirect lighting which has made ray tracing a staple in movies.
follow these steps, and the architecture of the ray tracer u produce will be good for extending to a more extensive ray tracer if u get excited and want to purse that.

when somebody says “ray tracing” it could mean many things. what i am going to describe is technically a path tracer, and a fairly general one. while the code will be pretty simple (let the computer do the work!) i think u will be very happy with the images u can make.

i will take u through writing a ray tracer in the order i do it, along with some debugging tips. by the end, u will have a ray tracer that produces some great images. u should be able to do this in a weekend.
if u take longer, do not worry about it. i use C++ as the driving language, but u do not need to. however, i suggest u do, because it is fast, portable, and most production movie and video game renderers are written in C++. note that i avoid most “modern features” of C++, but inheritance and operator overloading are too useful for ray tracers to pass on. i do not provide the code online, but the code is real and i show all of it except for a few straightforward operators in the vec3 class.
i am a big believer in typing in code to learn it, but when code is available i use it, so i only practice what i preach when the code is not avaliable. so do not ask.
这作者脑子有点怀了吧,写的都是啥。

I have left that last part in because it is funny what a 180 I have done. Several readers ended up with subtle errors that were helped when we compared code. So please do type in the code, but if you want to look at mine it is at:
https://github.com/petershirley/raytracinginoneweekend

I assume a little bit of familiarity with vectors (like dot product and vector addition). If you don’t know that, do a little review. If you need that review, or to learn it for the first time, check out Marschner’s and my graphics text , Foley, Van Dam, et al ., or McGuire’s graphics codex .

chapter 1: output an image

whenever u start a renderer, u need a way to see an image. the most straightfoward way is to write it to a file.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值