Niall Connaughton
Niall Connaughton

Reputation: 16117

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 matrix 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!

Upvotes: 5

Views: 14376

Answers (3)

hevi
hevi

Reputation: 2736

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

Upvotes: 2

lhf
lhf

Reputation: 72402

Not an online-tutorial, but the book Ray Tracing from the Ground Up by Kevin Suffern is very detailed.

Upvotes: 1

redtuna
redtuna

Reputation: 4600

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).

Upvotes: 1

Related Questions