Simple ray tracing tutorial?
Years ago at uni I wrote a ray tracer in C++, but now I can hardly remember any of it. Just for fun, I decided to try writing a ray tracer again, this time in C#. But sadly I'm struggling getting started with the translation from camera coordinates to world coordinates.
Can anyone recommend me a good set of tutorials on writing a ray tracer from scratch? My maths knowledge is pretty basic, so I need to re-learn the mat开发者_JAVA百科rix multiplication involved in working out where a point on the screen is in 3D space to cast a ray through it.
The intersection with shapes and shading parts I think I can work out, but I need to go back to basics for the camera translation.
Thanks!
I made a very simple ray tracer, if you want to have a look at a c++ code sample here is the link. a tiny ray tracer project
I found http://www.siggraph.org/education/materials/HyperGraph/raytrace/rtrace0.htm useful. It doesn't go all the way back to the basics but may still help (hint: if you see a broken font character as I do, it's meant to be a dot product).
Not an online-tutorial, but the book Ray Tracing from the Ground Up by Kevin Suffern is very detailed.
精彩评论