r/GraphicsProgramming • • Dec 03 '19

Ray Tracing

Hey guys
I'l trying to implement a raytracing algorithm, but I can't find any suitable tutorial
Any help?

10 Upvotes

19 comments sorted by

32

u/Deanje Dec 03 '19

4

u/[deleted] Dec 03 '19

you da real mvp

10

u/cbrpnk Dec 03 '19

The book actually implements a path tracer, but that's what you really want, trust me!

3

u/s0lly Dec 03 '19

You can check out my excel model if that’d help: https://github.com/s0lly/Raytracer-In-Excel

10

u/trailside Dec 03 '19

I learned a lot working through this book: http://raytracerchallenge.com/

2

u/Godzoozles Dec 04 '19

Ordered a copy of the book based on your rec. Thanks

1

u/skrobobob Dec 03 '19

I would highly recommend this book also!

1

u/-Tesla Dec 03 '19

Does it cover multi threading aspect of the renderer?

2

u/trailside Dec 03 '19

Not really. The implementation is up to you, the book walks you through the algorithms using a test-first approach. The choice of language is up to you.

1

u/[deleted] Dec 04 '19

There’s a lot of easy ways to parallelize offline rendering though

1

u/-Tesla Dec 04 '19

I have no experience with parallelising anything. I'm trying to parallelize my Path Tracer (really, just a Ray caster at this point) and I think I'm stuck, been already 2 days.

2

u/[deleted] Dec 04 '19

You can create a thread pool and make calculating the value of a pixel the unit of work, so at any given point you’re calculating {number of cores} pixels concurrently

1

u/[deleted] Dec 05 '19

Ooo this looks fun. Ordered.

6

u/rocketRaccoonOnMoon Dec 03 '19

Not really a tutorial but I have to mention the Physically Based Rendering book. It's a really good academic material for starting, and it has code samples as well: http://www.pbr-book.org/3ed-2018/contents.html

6

u/moschles Dec 04 '19

You can't find a suitable tutorial for ray tracing ??

Wut?

5

u/deftware Dec 04 '19

For more signed-distance field modeling/rendering strategies check out http://www.iquilezles.org/www/index.htm It's the site of one of the shadertoy developers who has been into doing all kinds of old-school graphics/raytracing techniques using modern graphics APIs, along with an impressive amount of novel new ideas, tricks, and techniques he devised on his own.

1

u/iamsaitam Dec 03 '19

What about ray tracing with open-gl (shaders), any book out there?

-1

u/[deleted] Dec 03 '19

They are all here