pvrt 2.0: GenerateRayDifferential, inaccurate?

8 views
Skip to first unread message

tomwindcloud

unread,
Nov 16, 2009, 10:29:43 PM11/16/09
to pbrt
First , if Matt or Greg are reading: thanks for your great work
(book, codes)!
In 2.0, GenerateRay is replaced by GenerateRayDifferential,
rxOrigin, ryOrigin, rxDirection and ryDirection substitute rx, ry.
But i think the result maybe is inaccurate.
For example, ray->rxDirection = Normalize(Vector(Pcamera) +
dxCamera).
dxCamera is get by :
dxCamera = RasterToCamera(Point(1,0,0)) - RasterToCamera(Point
(0,0,0));
but dxCamera1 = RasterToCamera(Point(151,0,0)) - RasterToCamera
(Point(150,0,0)); dxCamera can't always equal dxCamera1.So, maybe it
is inaccurate??

ps: ha, i see. I test the result in my project, given film(xres:300,
yres:300, znear:1e-2f), dxCamera.x = 2.7614180e-005, dxCamera1.x =
2.7614238e-005. The error is too small, so GenerateRayDifferential can
get right result. Anyway, i thanks Matt and Greg again, your work is
great!

Matt Pharr

unread,
Nov 30, 2009, 8:18:33 PM11/30/09
to pb...@googlegroups.com
I've looked into this a bit more, and am pretty sure there's no bug there; the differences only seem to be due to small floating-point inaccuracies.

Glad you've found the book and code useful!

Thanks,
-matt
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "pbrt" group.
> To post to this group, send email to pb...@googlegroups.com
> To unsubscribe from this group, send email to pbrt+uns...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/pbrt?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

Reply all
Reply to author
Forward
0 new messages