Page 3 of 3

Re: pbrt-v3 source code now available

Posted: Sat Aug 08, 2015 1:54 am
by cozdas
Great news! Thanks for this book Matt, it's a real gem.

I've got one request though: It'd be great if you can release the book in "print replica" format. The format of the existing (v2) edition generates hard-to-follow page layouts with disproportional elements in the page (sample page attached to demonstrate my point). Realtime Rendering is a good example of the "print replica" format. With pbrt's larger pages and smaller texts it might be tricky to do but I'd appreciate if you at least consider that.

Re: pbrt-v3 source code now available

Posted: Fri Aug 14, 2015 8:44 pm
by ziu
Thanks a lot for the code Matt! I have been using the CPU HLBVH builder code and been throwing all test scenes at it and so far it seems to be holding ok. I only had an issue with scenes where I had infinite size primitives (e.g. half-spaces in an extension I added) so I ended up removing those prior to construction.

Re: pbrt-v3 source code now available

Posted: Tue Aug 25, 2015 5:00 pm
by toxie
In https://github.com/mmp/pbrt-v3/blob/mas ... brt.h#L235 and https://github.com/mmp/pbrt-v3/blob/mas ... brt.h#L249
the checks for +0.0 and -0.0 are not correct, as by IEEE754 +0.0 == -0.0 is true. So you want to check this special case with the uint you're getting below instead.

EDIT: oh, forget about it, the code of course still will do what is actually needed. time to stop staring at code now, i guess.. ;)

Re: pbrt-v3 source code now available

Posted: Wed Sep 02, 2015 11:09 am
by ziu
I did a change to the code. I had issues with some scenes with abnormal bounding boxes (too small) blowing up the program by triggering this assert :

Code: Select all

Assert(centroidBounds.pMax[dim] != centroidBounds.pMin[dim]);
https://github.com/mmp/pbrt-v3/blob/mas ... h.cpp#L527

So I changed the code in BVHAccel::buildUpperSAH to be like this:

Code: Select all

int mid;
if (centroidBounds.pMax[dim] != centroidBounds.pMin[dim]) {
    // do the fancy split position finding method.
    mid = pmid - treelet_roots;
} else {
    mid = start + (end - start)/2;
}
I know its a bit of a hack, but at least it can still find a split point somewhere and generate a viable BVH.

Hope it helps,