RSL NODE – bake out AO ptc

shading parameters

float i_inAlpha;
color i_inColor;
output float o_outAlpha;
output color o_outColor;
shader_output varying color aov_matte = 1.0;
string ptc_file = “default.ptc”;
string ptc_coordsys = “world”;

Shading Code

o_outAlpha = i_inAlpha;
o_outColor = i_inColor;
aov_matte = 1.0;

normal Nf = faceforward( normalize(N), I );

bake3d( ptc_file, “”, P, Nf,
“coordsystem”, ptc_coordsys,
“interpolate”, 1,
“_radiance”, Ci);

Turn off Cull Hidden Surfaces, Cull Backfacing Surfaces and Dice Raster Orient while baking

Leave a Reply

Your email address will not be published. Required fields are marked *