##RenderMan RIB-Structure 1.0 version 3.03 Option "searchpath" "shader" ["&;.;g:/RenderMan/shaders;c:/bmrt2.4/shaders"] ########################################################################### # # This RIB file demonstrates the use of the "lafortune" shader that # implements the BRDF representation of Lafortune et al. from SIGGRAPH 97. # ########################################################################### Display "lafortune.tif" "file" "rgb" Exposure 1.0 2.2 Format 800 600 -1 PixelSamples 4 4 Option "render" "prmanspecular" [1] Projection "perspective" "fov" 30 Rotate 180 0 1 0 Rotate -80 1 0 0 Translate 0 469.8 -121.0 WorldBegin Declare "shadows" "string" AttributeBegin # Need an attribute block to keep whole world from glowing Attribute "light" "nsamples" [4] "shadows" "on" AreaLightSource "arealight" 1 "intensity" 150000.0 # "lightcolor" [1 1 1] Patch "bilinear" "P" [200 -300 600 100 -300 600 200 -200 600 100 -200 600] AttributeEnd Illuminate 1 1 # Switch on light outside attribute block so others see it. AttributeBegin # Need an attribute block to keep whole world from glowing Attribute "light" "nsamples" [9] "shadows" "on" AreaLightSource "arealight" 2 "intensity" 20000.0 "lightcolor" [ 0.2 0.8 0.2] Patch "bilinear" "P" [ -60 120 130 -50 120 130 -60 120 140 -50 120 140] AttributeEnd Illuminate 2 1 # Switch on light outside attribute block so others see it. AttributeBegin Attribute "light" "nsamples" [9] "shadows" "on" AreaLightSource "arealight" 3 "intensity" 20000.0 "lightcolor" [ 0.8 0.2 0.2] Patch "bilinear" "P" [ 50 120 130 60 120 130 50 120 140 60 120 140] AttributeEnd Illuminate 3 1 # Switch on light outside attribute block so others see it. # Sky background; adds ambient lighting, but doesn't interact with model AttributeBegin Attribute "radiosity" "emissioncolor" [0.1 0.2 0.3] Attribute "radiosity" "zonal" "zonal_shoots" Attribute "radiosity" "patchsize" 1000 "elemsize" 500 "minsize" 200 Sphere 5000 -1000 5000 360 AttributeEnd Attribute "radiosity" "patchsize" 100 "elemsize" 50 "minsize" 10 # Ground plane AttributeBegin Attribute "radiosity" "patchsize" 100 "elemsize" 25 "minsize" 5 Color [ .75 .84 .86 ] Surface "matte" Patch "bilinear" "P" [ -1000 -1000 0 1000 -1000 0 -1000 1000 0 1000 1000 0 ] AttributeEnd # Back plane AttributeBegin Attribute "radiosity" "patchsize" 100 "elemsize" 25 "minsize" 5 Color [ .6 .8 .82 ] Surface "matte" Patch "bilinear" "P" [ -1000 150 -1000 1000 150 -1000 -1000 150 1000 1000 150 1000 ] AttributeEnd AttributeBegin Color [ .3094 .39667 .70837 ] Translate 70 0 50 Surface "matte" Sphere 50 -50 50 360 AttributeEnd # Note: R values are average of 600nm and 650; G is 550, B is 450 AttributeBegin Translate -70 0 50 Color [ .3094 .39667 .70837 ] Declare "coeff" "float[27]" Surface "lafortune" "coeff" [ 0.877276 0.801226 21.88889 0.857255 0.774290 18.597755 0.670982 0.586674 7.472717 -0.419449 0.008408 2.594712 -0.406681 0.017625 2.581499 -0.477976 0.227295 3.677653 -1.031545 0.706734 66.899060 -1.029426 0.696530 63.767912 -1.026588 0.687715 57.489181 ] Sphere 50 -50 50 360 AttributeEnd AttributeBegin Rotate -30 0 0 1 Translate 60 -110 0.5 Color [ 0 0 0 ] Surface "lafortune" "coeff" [ -1.11854 1.01272 15.8708 -1.11845 1.01469 15.6489 -1.11999 1.01942 15.4571 -1.05334 .69541 111.267 -1.06409 0.662178 88.9222 -1.08378 0.626672 65.2179 -1.01684 1.00132 180.181 -1.01635 1.00112 184.152 -1.01529 1.00108 195.773 ] Patch "bilinear" "P" [ -35 -55 0 35 -55 0 -35 55 0 35 55 0 ] AttributeEnd WorldEnd