Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!olivea!apple!uokmax!stparker From: stparker@uokmax.ecn.uoknor.edu (Steve Parker) Newsgroups: comp.graphics Subject: Re: Scene Description Standard (Renderman isn't good enough) Message-ID: <1991May1.161329.26495@uokmax.ecn.uoknor.edu> Date: 1 May 91 16:13:29 GMT References: <1991Apr30.211131.7166@nntp-server.caltech.edu> Organization: Engineering Computer Network, University of Oklahoma, Norman, OK Lines: 132 woolstar@nntp-server.caltech.edu (John D. Woolverton) writes: > Perhapse to the world of 3D Z-buffers and other scan line >rendering programs, RenderMan is enough. But for work in >RayTracing and beyond, there are too many things missing. > PLEASE SOMEONE! Work on a scene description file format >that will describe an animation or scene, not just the >resultant list of polygons. Well, I am not Mr. Computer Graphics expert yet, but I am working diligently on being one. For the last four months, I have been busily working on my own raytracing program. I have spent most of that time working on an input language. I find the same shortcomings in current file formats - They stink for animation. If I have a large scene, I want to read it in *once* and generate hundreds of views or variations of the one scene. Computers are getting fast enough to make ray traced animations even more feasible. With these observations, I set out to design my input language. I have come up with an interpretive type language which has proved to be very powerful and very expandable. At the bottom, I have attached a short piece of code which renders a CSG face. I would appreciate any inputs or *constructive* criticisms. Much of my language is incomplete, but some of the features which will be implemented include: - if else contstructs - for and while loops - Object copying. - Default object values - Object paths and camera paths - for motion blur - Built in matrix and vector manipulation One feature that I like is that I can add a primitive without changing the yacc or lex code. I simply put the name of the new primitive in a file, write all of the associated routines, add it to the Makefile and type make. The language is really powerful in my opinion, but what do I know? I do not want to bore the entire group with the gory details, but I can supply more information if anyone would like it. Again, I would appreciate any input. Steve Parker sgp@phyast.nhn.uoknor.edu /* * render a CSG face */ /* * Note: the names light1, light2, and light3 are not special, they * are simply variable names which are assigned to the lights. * They could have just as easily been Larry, Curly and Moe. */ light1=light_source(POSITION={0,-10,30},BRIGHTNESS=1,COLOR=[1,1,1],TYPE=Point); light2=light_source(POSITION={0,-10,-10},BRIGHTNESS=.8,COLOR=[1,1,1],TYPE=Point); light3=light_source(POSITION={0,-1000,0},BRIGHTNESS=.8,COLOR=[1,1,1],TYPE=Point); lighting(SOURCE=light1,SOURCE=light2,SOURCE=light3); /* * The idea behind these is that they will be pretty much the same for * most cameras * */ params=parameter(SUPERSAMPLING=Jittered, SAMPLES=1, MAX_RAYTREE_DEPTH=4, CUTOFF_THRESHOLD=.001, SHADOWS=True); camera1=camera(EYE_POINT={1,-4,0},LOOK_POINT={0,0,0},UP_VECTOR={0,0,1}, FOV=45, XRESOLUTION=250, YRESOLUTION=250, XOUTPUT=True, TITLE="Michele's Face", OUTFILE="face.rle",PARAMETERS=params); /* * Set up surfaces */ mouthsurf=surface(AMBIENT=[.01,.01,.01],DIFFUSE=[.8,.01,.01],SPECULAR=[.9,.9,.9], SR_COEFF=25, REFLECTIVITY=.7, TRANSPARENCY=0); nosesurf=surface(AMBIENT=[.01,.01,.01],DIFFUSE=[.7,0,.5],SPECULAR=[.9,.9,.9], SR_COEFF=25, REFLECTIVITY=.9, TRANSPARENCY=0); eyesurf=surface(AMBIENT=[.01,.01,.01],DIFFUSE=[.5,.3,.9],SPECULAR=[.9,.9,.9], SR_COEFF=25, REFLECTIVITY=.6, TRANSPARENCY=0); facesurf=surface(AMBIENT=[.01,.01,.01],DIFFUSE=[.9,.7,.5],SPECULAR=[.9,.9,.9], SR_COEFF=25, REFLECTIVITY=.4, TRANSPARENCY=0); hairsurf=surface(AMBIENT=[0,0,0],DIFFUSE=[.5,.5,.5],SPECULAR=[0,0,0], SR_COEFF=25, REFLECTIVITY=.1, TRANSPARENCY=0); /* * Create the primitives. Again face, left_eye, right_eye, etc. are * just variable names * */ face=sphere(POSITION={0,0,0},RADIUS=1.2, SURFACE=facesurf); left_eye=sphere(POSITION={-.5,-.8,.6},RADIUS=.3,SURFACE=eyesurf); right_eye=sphere(POSITION={.5,-.8,.6},RADIUS=.3,SURFACE=eyesurf); left_nose=sphere(POSITION={-.2,-.95,0},RADIUS=.4,SURFACE=nosesurf); right_nose=sphere(POSITION={.2,-.95,0},RADIUS=.4,SURFACE=nosesurf); mouth_top=sphere(POSITION={0,-1.32,.15},RADIUS=1,SURFACE=mouthsurf); mouth_bot=sphere(POSITION={0,-.82,-.1},RADIUS=.8,SURFACE=mouthsurf); /* * CSG operations */ eyes=left_eye+right_eye; nose=left_nose&right_nose; mouth=mouth_bot-mouth_top; /* * A background color may also be specified here */ world(OBJECT=(face-eyes)+(mouth+nose)); /* * Render the image */ render(CAMERA=camera1); /* And we could then continue and render another view, add objects, or * just render something else completely different altogether */