Whats New - Version 7.4.8

June 4 2016


return to main index



OSL printf Output

A summary of the data generated from calls to printf() are now displayed in the Process Monitor. For example, the data from the printfs shown below would be displayed as shown in figure 1.

shader
dist2Color(float mindistance = 0,
           float maxdistance = 15.0,
           color mincolor = color(1,0,0),
           color maxcolor = color(0,0,1),
           string spacename = "object",
        output color resultRGB = 0)
{
point p = transform(spacename, P);
float dist = distance(p, point(0,0,0));
  
float blend = smoothstep(mindistance, maxdistance, dist);
resultRGB = mix(mincolor, maxcolor, blend);
printf("%f\n", dist);
printf("%f\n", resultRGB);
}


Figure 1


Frame Denoise

When editing a rib file denoising can be added via the Enable Frame Denoise menu item.



Figure 2


Cutter comments the rib file's Display statement and inserts a ReadArchive. For example,

    ReadArchive "./DenoiseOptions.rib"
    #Display "untitled" "it" "rgba"
    Format 640 360 1
    Projection "perspective" "fov" 20

A second ReadArchive is added immediately after WorldEnd.

    WorldEnd
    ReadArchive "./Denoise.rib"

The rib archives "DenoiseOptions.rib" and "Denoise.rib" generated by Cutter and saved in the same directory as cutter.jar. Examples of the archives are shown below.


DenoiseOptions.rib


DisplayChannel "color albedo" "string source" ["color lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;C<.S'passthru'>*((U2L)|O)"]
DisplayChannel "float a"
DisplayChannel "float z_var" "string source" ["float z"] "string statistics" ["variance"] "string filter" ["gaussian"]
DisplayChannel "color diffuse_mse" "string source" ["color lpe:C(D[DS]*[LO])|O"] "string statistics" ["mse"]
DisplayChannel "color specular" "string source" ["color lpe:CS[DS]*[LO]"]
DisplayChannel "float z" "string source" ["float z"] "string filter" ["gaussian"]
DisplayChannel "color Ci"
DisplayChannel "color albedo_var" "string source" ["color lpe:nothruput;noinfinitecheck;noclamp;unoccluded;overwrite;C<.S'passthru'>*((U2L)|O)"] "string statistics" ["variance"]
DisplayChannel "normal normal_var" "string source" ["normal Nn"] "string statistics" ["variance"]
DisplayChannel "normal normal" "string source" ["normal Nn"]
DisplayChannel "vector forward" "string source" ["vector motionFore"]
DisplayChannel "color mse" "string source" ["color Ci"] "string statistics" ["mse"]
DisplayChannel "color specular_mse" "string source" ["color lpe:CS[DS]*[LO]"] "string statistics" ["mse"]
DisplayChannel "color diffuse" "string source" ["color lpe:C(D[DS]*[LO])|O"]
Hider "raytrace" "int adaptall" [0] "int incremental" [1] "string pixelfiltermode" ["importance"] "int minsamples" [16] "int minextrasamples" [8] "int maxsamples" [64] "float darkfalloff" [0.025]
Display "dist2Color_.exr" "openexr" "Ci,a,mse,albedo,albedo_var,diffuse,diffuse_mse,specular,specular_mse,z,z_var,normal,normal_var,forward," "int asrgba" [1] "string filter" ["gaussian"] "float[2] filterwidth" [2 2] "int[4] quantize" [0 0 0 0] "float dither" [0] "float[2] exposure" [1 1] "float[3] remap" [0 0 0]


Denoise.rib


System "\"${RMANTREE}/bin/denoise\" -f default.filter.json \"dist2Color_.exr\""
System "\"${RMANTREE}/bin/sho\" -dspy it \"dist2Color_.exr\""
System "\"${RMANTREE}/bin/sho\" -dspy it \"dist2Color__filtered.exr\""











© 2002- Malcolm Kesson. All rights reserved.