Example #1
0
ri.Light('PxrRectLight', 'areaLight', {'float exposure': [3]})
ri.AttributeEnd()
ri.TransformEnd()
#######################################################################
# end lighting
#######################################################################

# set the pattern generation to be from our osl band shader
ri.Pattern("layer", shaderName)

# first teapot
ri.AttributeBegin()
# the colour from the shader is driven by noise, metallic by the noise green channel via the noiseToFloat
ri.Bxdf("PxrDisney", "bxdf",
        {"reference color baseColor": ["%s:Cout" % shaderName]})
drawTeapot(ri, x=-1, ry=-45)
ri.AttributeEnd()
ri.Pattern(
    "layer", shaderName, {
        "color baseColour": [1.0, 1.0, 1.0],
        "color lineColour1": [1.0, 0.0, 0.0],
        "color lineColour2": [0.0, 0.0, 0.0],
        "float fuzz": [0.2],
        "float repeatU": [4],
        "float repeatV": [2]
    })
# second teapot
ri.Bxdf("PxrDisney", "bxdf",
        {"reference color baseColor": ["%s:Cout" % shaderName]})
drawTeapot(ri, ry=-45)
ri.Pattern(
Example #2
0
	ri.AttributeBegin()
	# the colour from the shader is driven by noise, metallic by the noise green channel via the noiseToFloat 


	drawCube(ri,x=-1,y=0.5,ry=-frame,sx=0.5,sy=0.5,sz=0.5)
	ri.AttributeEnd()
	ri.Pattern("tile","tileShader", {"color C1"  : [0.0 ,1.0,0.0],
																	"color C2"  : [1.0 ,0.0,0.0],
																	"float repeat" : [3]})
	# second teapot

	drawCube(ri,y=0.5,rx=frame,ry=-45,sx=0.5,sy=0.5,sz=0.5)

	# third teapot

	drawTeapot(ri,x=1,ry=frame)
	# floor
	ri.TransformBegin()
	ri.Pattern("tile","tileShader", {"color C1"  : [1.0 ,1.0,1.0],
																	 "color C2"  : [1.0 ,0.0,0.0],
																	 "float edgeSize" : [0.01],
																	 "float fuzz" : [0.01]})
									
	s=2.0
	face=[-s,0,-s, s,0,-s,-s,0,s, s,0,s]
	ri.Patch("bilinear",{'P':face})

	ri.TransformEnd()

	# end our world
	ri.WorldEnd()
Example #3
0
ri.Light('PxrRectLight', 'areaLight', {'float exposure': [3]})
ri.AttributeEnd()
ri.TransformEnd()
#######################################################################
# end lighting
#######################################################################

# first teapot
ri.Bxdf(
    "PxrDisney", "bxdf", {
        "color baseColor": [0.8, 0.2, 0.2],
        "float roughness": [0.5],
        "float clearcoat": [0.2],
        "float clearcoatGloss": [1]
    })
drawTeapot(ri, x=-1)

# second teapot
ri.Bxdf(
    "PxrDisney", "bxdf", {
        "color baseColor": [0.8, 0.2, 0.2],
        "float roughness": [0.5],
        "float clearcoat": [0.5],
        "float clearcoatGloss": [1]
    })
drawTeapot(ri)

# third teapot
ri.Bxdf(
    "PxrDisney", "bxdf", {
        "color baseColor": [0.8, 0.2, 0.2],
Example #4
0
ri.AttributeBegin()

ri.Bxdf(
    "PxrDisney", "bxdf", {
        "color baseColor": [1.0, 1.0, 1.0],
        "float metallic": [1],
        "float roughness": [0],
        "float specular": [0.5]
    })
ri.Procedural2(
    ri.Proc2DelayedReadArchive, ri.SimpleBound, {
        "string filename": ["shaderBall.zip!chromeBall.rib"],
        "float[6] __bound": [-2, 2, 0, 2, -2, 2]
    })
drawTeapot(ri, x=19, y=0, z=-9, ry=-60, sx=1.2, sy=1.2, sz=1.2)

ri.AttributeEnd()

ri.AttributeBegin()

ri.Pattern("PxrTexture", "colourChecker", {"string filename": "checker.tx"})
ri.Bxdf("PxrDisney", "bxdf", {
    "reference color baseColor": ["colourChecker:resultRGB"],
})
ri.Procedural2(
    ri.Proc2DelayedReadArchive, ri.SimpleBound, {
        "string filename": ["shaderBall.zip!colChecker.rib"],
        "float[6] __bound": [-2, 2, 0, 2, -2, 2]
    })
ri.AttributeEnd()