Skip to content

Commit fc317c7

Browse files
committed
commit before merge
1 parent 2a05ee6 commit fc317c7

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

Lecture1Intro/affine.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env rmanpy3
22
# for bash we need to add the following to our .bashrc
33
# export PYTHONPATH=$PYTHONPATH:$RMANTREE/bin
44
import getpass

PythonBindings/Lights/LightingScene.py

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python
2-
# on mac I'm using rmanpy which is 2.7 so best to be safe
3-
from __future__ import print_function, division
2+
43
import sys
54
import os
65
import time
@@ -50,6 +49,19 @@ def createSphere(scene, group):
5049
scene.Root().AddChild(quadric)
5150

5251

52+
53+
def buddha(scene,group,ri) :
54+
#ri.ReadArchive("buddha.zip!buddha.rib",None)
55+
#Procedural(self, data, bound, sfunc, ffunc)
56+
white = scene.CreateMaterial(None)
57+
bxdf = rman.scenegraph.Shader("Bxdf", "PxrDiffuse", "white")
58+
bxdf.params.SetColor("diffuseColor", (0.8, 0.8, 0.8))
59+
white.SetBxdf(bxdf)
60+
bound=[-20.5 ,20.5 ,-20.5 ,20.5 ,-20.5 ,20.5]
61+
ri.Procedural(["teapot.rib"],bound,"ProcDelayedReadArchive",None)
62+
63+
64+
5365
def cornellBox(scene, group):
5466

5567
# Create scene materials: white, red, and green
@@ -109,14 +121,15 @@ def cornellBox(scene, group):
109121

110122
# Set scene options
111123
options = rman.Types.RtParamList()
112-
options.SetString(Constants.k_bucket_order, "circle")
124+
#options.SetString(Constants.k_bucket_order, "circle")
113125
options.SetIntegerArray(Constants.k_Ri_FormatResolution, [1024, 1024], 2)
114126
options.SetFloat(Constants.k_Ri_FormatPixelAspectRatio, 1.0)
115127
options.SetFloat(Constants.k_ShadingRate, 1.0)
116128
options.SetFloat(Constants.k_Ri_PixelVariance, 0.1)
117129

130+
118131
options.SetString(Constants.k_searchpath_archive, "../../Lecture3/assets/:@")
119-
options.SetString(Constants.k_searchpath_shader, "./:@")
132+
options.SetString(Constants.k_searchpath_shader, "../../Lecture3Lighting/:@")
120133

121134
scene.SetOptions(options)
122135

@@ -140,6 +153,7 @@ def cornellBox(scene, group):
140153

141154
cornellBox(scene, group)
142155
createSphere(scene, group)
156+
buddha(scene,group,riContext)
143157

144158
# Create render camera and parent under a group
145159
cameraGroup = scene.CreateGroup("cameraGroup")

RIS/queryArgsFile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
import argparse
33
import collections
44
import os.path

RIS/queryPluginSource.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
""" Parse a renderman plugin source file and print useful info! """
33
import sys, os.path
44
import argparse

0 commit comments

Comments
 (0)