From john.danks at gmail.com Sun Nov 1 13:04:25 2009 From: john.danks at gmail.com (John Danks) Date: Sun, 1 Nov 2009 10:04:25 -0800 Subject: [Pbrt-discuss] problem with the sphere In-Reply-To: <57eb5b500910310824g2ea161e5ld57752c8df9fc9b1@mail.gmail.com> References: <57eb5b500910301414s6605f5cbk6090642c8a190916@mail.gmail.com> <209910870910301423p14672535r22e92ceaa7deac60@mail.gmail.com> <57eb5b500910301429n61be3d82x6e5a7854b299c928@mail.gmail.com> <57eb5b500910310824g2ea161e5ld57752c8df9fc9b1@mail.gmail.com> Message-ID: <209910870911011004n7c83c5a1xc0a1bd1c658477bf@mail.gmail.com> I was able to reproduce the problem with pbrt-v1. It appears to be a precision issue of some sort. The spot is more apparent when using only 1 sample. It is present with both the orthographic and perspective cameras, but can disappear and reappear as the camera is moved around. The spot itself appears to be located at (0, 0, 1) in the sphere's object space. I compared the intersection code for spheres between v1 and v2 and didn't see any significant differences. Since it works in v2 I don't think it's worth much more time to investigate. Version 2 is "alpha" code for the next edition of the PBRT book. It's been released by the authors well in advance of the book in order to get some feedback on the code. You can get a copy here: http://github.com/mmp/pbrt-v2 On Sat, Oct 31, 2009 at 7:24 AM, Mohamed Yessine Yengui wrote: > Hello! > > I tried with three linux versions of pbrt: version 1.04 and 1.03 from pbrt > web site and version 1.03 from > https://graphics.stanford.edu/wikis/cs348b-07/PBRTInfo. I reproduce the same > problem with all these versions. But, I don?t understand what do you mean by > version 2? Sorry, I?m new user of pbrt. > > Thanks > > 2009/10/30 Mohamed Yessine Yengui >> >> the version is pbrt-1.03. >> >> 2009/10/30 John Danks >>> >>> Which version of pbrt are you using? I was not able to reproduce the >>> problem with version 2. >>> >>> On Fri, Oct 30, 2009 at 2:14 PM, Mohamed Yessine Yengui >>> wrote: >>> > Hello! >>> > >>> > When I tried to render the sphere model with pbrt, I noticed that there >>> > was >>> > a dark point in the resulting image, normally, this point must be >>> > illuminated. After analyzing, I perceived that the normal vector >>> > computed on >>> > the sphere is not continuous. Could anyone help me to resolve this >>> > problem? >>> > >>> > This is my .pbrt file and you find in attached the resulting image. >>> > ?The >>> > dark point is in the red circle. >>> > >>> > >>> > >>> > ?Film "image" "string filename" ?["sphere.exr"] >>> > ??? ??? "integer xresolution" [500] "integer yresolution" [500] >>> > ???Sampler ?"bestcandidate" ?"integer pixelsamples" [4] >>> > ???LookAt -12 -3 12 0 0 0 0 1 0 >>> > ??? Camera "orthographic" >>> > ??? WorldBegin >>> > ???AttributeBegin >>> > ?? CoordSysTransform "camera" >>> > ???? LightSource "distant"? "color I" [ 3 3 3 ] "point from" [0 0 0] >>> > "point >>> > to" [-1 -1 1] >>> > ??? AttributeEnd >>> > ??? AttributeBegin >>> > ???? Material "plastic" "color Kd" [1.0 1.0 1.0] "color Ks" [8 8 8] >>> > "float >>> > roughness" [.006] >>> > ??? Shape "sphere" "float radius" [.3] >>> > ???? AttributeEnd >>> > ??? WorldEnd >>> > >>> > Thanks