mmp / pbrt-v2

Source code for the version of pbrt described in the second edition of "Physically Based Rendering"
http://pbrt.org
990 stars 343 forks source link

artifacts when EWA magnifies texels #25

Open mmp opened 10 years ago

mmp commented 10 years ago

(From mantis bug tracker)

fpsunflower: I've noticed that the EWA filter exhibits strange artifacts under magnification. This is apparent in the two following images (closeup of the lines.exr texture)


Film "image"
    "integer xresolution" [200] "integer yresolution" [100]
    "integer xresolution" [800] "integer yresolution" [400]
#   "integer xresolution" [750] "integer yresolution" [375]
#   "float cropwindow" [.2 .4 .07 .22]

Sampler "lowdiscrepancy" "integer pixelsamples" [1]
PixelFilter "box"

LookAt 0 0.7 8  0 0.7 0   0 1 0
Camera "perspective" "float fov" [1]

SurfaceIntegrator "directlighting"

WorldBegin

AttributeBegin
#  LightSource "distant" "color L" [3 3 3] "point from" [0 10 3] "point to" [0 0 0 ]
AttributeEnd

AttributeBegin
  CoordSysTransform "camera"
  AreaLightSource "area" "color L" [6 6 6] "integer nsamples" [32]
  Translate 0 3 -10
  Material "matte" "color Kd" [ 0 0 0 ]
  Shape "disk" "float radius" [3] 
AttributeEnd

AttributeBegin
  AreaLightSource "area" "color L" [3.2 3.2 3.2] "integer nsamples" [32]
  Translate 0 15 0
  Rotate 90 1 0 0 
  Material "matte" "color Kd" [ 0 0 0 ]
  Shape "disk" "float radius" [20] 
AttributeEnd

AttributeBegin
  Material "matte" "color Kd" [.1 .1 .1]
  Shape "trianglemesh" "integer indices" [ 0 1 2 2 0 3 ]
    "point P" [-10 0 -10   10 0 -10   10 0 10   -10 0 10 ]
  Shape "trianglemesh" "integer indices" [ 0 1 2 2 0 3 ]
    "point P" [-10 0 -10   10 0 -10   10 9 -10   -10 9 -10 ]
  Shape "trianglemesh" "integer indices" [ 0 1 2 2 0 3 ]
    "point P" [-10 0 -10   -10 0 10   -10 9 10   -10 9 -10 ]
AttributeEnd

Texture "g-tri" "color" "imagemap" "string filename" "textures/lines.exr"
    "bool trilinear" ["true"]
    "float uscale" [1] "float vscale" [1]
Texture "g-ewa" "color" "imagemap" "string filename" "textures/lines.exr"
    "float uscale" [1] "float vscale" [1]

AttributeBegin

## switch texture filtering here ##
Material "uber" "texture Kd" "g-ewa" "color Ks" [.1 .1 .1]
#Material "uber" "texture Kd" "g-tri" "color Ks" [.1 .1 .1]

Translate 0 1 6
Rotate 10 0 0 1
Rotate -35 1 0 0
Rotate -20 1 1 1
Shape "sphere"
AttributeEnd

WorldEnd