import prman使ってます。
#ricurve_pr.py
#set PYTHONPATH=C:\Python25;C:\Python\Scripts;%RMANTREE%\bin
import prman
ri=prman.Ri()
filename="ricurve_pr.rib"
ri.Begin(ri.RENDER)
ri.Imager("background", {"color color":(.2,.4,.6)})
ri.Display ("ricurve_pr.png","file","rgb")
ri.Format(512, 384, -1.0)
ri.PixelSamples( 4, 4)
ri.ShadingRate(1)
ri.Projection(ri.PERSPECTIVE, {ri.FOV: 90})
ri.WorldBegin()
ri.LightSource("distantlight", {ri.HANDLEID: "1","to":[0,0,1]})
ri.LightSource("ambientlight", {ri.HANDLEID: "2", "intensity":[0.4]})
ri.Translate(0,0,1.8)
ri.Surface("plastic")
ri.Color([1,0,0])
points= [0, 0, 0 ,-1, -.5 ,1 ,2 ,.5 ,1 ,1 ,0, -1 ]
width=[0.01,0.04]
ri.Curves( "cubic",[4],"nonperiodic",{ri.P:points, ri.WIDTH : width})
ri.Color([0,0,1])
points2=[0,0,0,3,4,5,-1,-.5,1,2,.5,1,1,0,-1]
ri.Curves("linear",[5],"nonperiodic",{ ri.P:points2 , ri.CONSTANTWIDTH:[0.075]})
ri.WorldEnd()
ri.End()
- -
- -