Advice on starting with pbrt

418 views
Skip to first unread message

Marin Leo Ljepotic

unread,
Nov 3, 2020, 12:56:21 PM11/3/20
to pbrt
Hey everyone!

I'm new here and I have just started exploring pbrt. I'm computer science graduate, but I have only recently started learning computer graphics. My experience with ray tracing is limited to "Ray Tracing in One Weekend" by Peter Shirley.

Since this is a subject I really enjoy, I want to develop great foundations I can easily build upon. I want to get most out of this book, so my first instinct was to implement everything in this book for myself and create my own version of the pbrt. But as I began to look over the codebase it seemed as too big of a project for relative noobie.

I am wondering if any of you have tried such a thing?
Any advice would be greatly appreciated.


trevorda...@gmail.com

unread,
Nov 3, 2020, 1:34:05 PM11/3/20
to pbrt
pbr-book.org
Go through the end of chapter exercises.

The pbrt codebase is fairly large, and not worth rewriting. You're going to get the most bang for your buck by modifying the existing codebase in meaningful and interesting ways.

The "Ray Tracing in One Weekend" book is extremely limited in scope and all chapters in pbr-book will have entirely new to understand.
Pick a chapter that looks interesting to you, and try to attempt a few of the end of chapter exercises.
Some recommendations:
- Chapter 1, 5, 6, 8, 9, 10
You're eventually going to want to read all of the chapters, and possibly attempt quite a few of the exercises, but these chapters are the most natural extension of your existing knowledge from the Shirley book.

You might also want to go on to the other Shirley books (Ray Tracing: The Next Week, Ray Tracing: The Rest of Your Life).
(Source: I edit the Shirley books)

You can also try cementing your 3d knowledge:
http://immersivemath.com/ila/index.html

Trevor

Jan Walter

unread,
Nov 4, 2020, 4:29:20 AM11/4/20
to pb...@googlegroups.com
Hi Marin,

"Ray Tracing in One Weekend" is a good start, the follow up books as well,
as someone already suggested.

Creating your own version of PBRT? Depends what you try to learn.
My way of learning the content of the book was as well to create my
own version: https://www.rs-pbrt.org/about/
But the learning effect was also about a new programming language,
Rust (https://www.rust-lang.org). I even found bugs in the C++ code
by doing that (e.g. out of bounds indices into arrays etc.). Timewise it
took me 3-4 years to have a full replacement of the C++ code, but I
got the first images after a couple of month. Keep in mind that you
might have to re-implement boring stuff, like vectors, matrices,
quaternions. It's up to you if you want to invest time into basics like
that, for the Rust counterpart that made sense, but also could have
been avoided (using other libraries to do that). I learned a lot, but
be aware of the time you need to invest ...

Also, the source code for v4 of PBRT is already available:

https://github.com/mmp/pbrt-v4

https://youtu.be/AXuk7bmhZ2g

My advice is, learn how to create a debug version of either the C++ and/or
the Rust code. Use the command line argument '--nthreads 1' for debugging,
and single step through code you are interested in (e.g. intersecting a ray
with a sphere). Compare your theoretical knowledge (e.g from other books or
Peter Shirley's code) with a concrete implementation (C/C++, Rust, any language
really) and focus on areas of interest. Try to change small things (maybe even
improve existing code), otherwise the complexity will just bury your ambition.
Once you got the small bits under control you can think about bigger projects.

Compare v3 against v4 (for now just the source code, until the book is ready).

My 2 cents,

Jan

P.S.: I'm happy to explain to you a couple of things just by clicking through
online documentation:

https://www.janwalter.org/doc/rust/pbrt/
or
https://www.rs-pbrt.org/doc/crates/pbrt/index.html

Good starting point are the different render loops.
AO and directlighting to start with, etc.
> --
> You received this message because you are subscribed to the Google Groups
> "pbrt" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pbrt+uns...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pbrt/564654e3-9cb0-4cf9-b69c-499681feedd2n%40googlegroups.com.
>

Marin Leo Ljepotic

unread,
Nov 4, 2020, 9:48:27 AM11/4/20
to pbrt
Thank you very much for your insight guys!

I'll be sure to play around with provided code and try to implement some of features mentioned in exercises.

It's great to see other implementation of the same system, and even though I'm not familiar with rust I will look around a bit.

I can assure you that other Shirley books are on my to-do list, as soon as I get a better grasp of the fundamentals.
P.S. Trevor, great work on those books! I can honestly say that they are a great source for beginners and they really sparked my interest into the world of PBR.

Once again, thanks for taking the time to point me in the right direction,
Marin
Reply all
Reply to author
Forward
0 new messages