Re: working with Performer

New Message Reply Date view Thread view Subject view Author view

Kim Michael Fairchild (fair++at++iss.nus.sg)
Wed, 16 Aug 1995 11:08:00 +0800


>>
>> >-- On Aug 15, 2:23pm, Kim Michael Fairchild wrote:
>> > Subject: RE: working with Performer
>> > Hi,
>> >
>> > We added a "VR markup language" called "Dez" for description to
>> > performer to make it easier to develope with. Coupled with interactive
>> > editing of things like "paths", "landmines" (things people step on),
>> > "sound mines" (things you here using 3d sound), etc., we find that
>> > even non-computer types can quickly build pretty fancy worlds.
>>
>> can we put this (public) at the sgi site?
>>
>>

Hello,

Will post my reply to the original questioner. Not sure about about
putting it on a public site. Let me check with my management, seems
like it should be ok to put the executable out.

I include here, my internal structure for parsing the Dez language so
you can get an idea what kinds of tokens we found to be useful and/or
required; and a little Dez script to build the Suntec City convention
centre (in Singapore).

If people are generally interested, I can put the paper describing
this up, or I can direct mail.

thanks, Kim.

To: fran++at++sgi115.ctc.com
In-reply-to: <9508150809.ZM1309++at++sgi115.ctc.com> (fran++at++sgi115.ctc.com)
Subject: Re: working with Performer
FCC: ~/mail/send-messages
--text follows this line--
Hi,

Will send you the reply I sent to the original questioner. I have
written this up for a new techie publications, want a copy? I can get
you FrameMaker or postscript.

Quite proud of our language, really takes us about 2 days to build a
walkthrough of VERY large stuff. Working on our 4th one now, this one
is a bit different, some TI folks want to do a walkthrough of a chip
:->.

Kim.

-----------

Here is an example DEZ file. Much of this was written interactively
using the mouse and the GUI.

; This is an example I always wanted to do, it creates a nice little
; solar system with moving objects. I used this for the "flying logo"
; part of the last piece we did. (shown to 350 people using passive
; glasses at Dun and Bradstreet's Solution '95 conference a couple of
; weeks ago). I built this world in about 2 hours. Would of been
; faster, but wrote code to reuse meteors when they fly by :->

echo "Starting up in space"

MoveFilter .96

; Setup the Stars

globaltexture star.rgba

scale 1 1 1
static
; loop 5
loop 1000
sfRandom 1200
translateY random
sfRandom 300
translateX random
translateZ random
bill
flatten
endloop
dynamic

; end Loop Setup stars

; Put up stars in globe

translation 150.000000 -5.000000 150.000000
translation 175.000000 530.000000 150.000000
orientation 90.000000 0.000000 0.000000
scale 3000 3000 3000
file starfield.bgf
scale 1 1 1

symbol RateOfMeteors 2
symbol DistanceToStart 80
symbol MeteorOffset 12
symbol True 1

; Start the meteors

factors RateOfMeteors DistanceToStart MeteorOffset
meteors True

; define the earth and moon

globaltexture earth.bgf
translation 143.800003 865.329956 150.000000
orientation 0 90 0
scale 4.199998 4.099998 4.099998
rotations 5 0 0
planet

globaltexture moon.bgf
translation 143.800003 865.329956 150.000000
orientation 0 90 0
scale 2 2 2
rotations 10 0 0
planet

; useful debugging stuff
; printscene
; memory
; quit

; Define the parameters for initial logo position
; key: percentage(not used) distance offset
factors 0 5 5
factors 0 0 0 ; DB - fast ball, down the middle :->

; ISS logo

factors 0 DistanceToStart 4
rotations 3 1 0
symbol issLogo #logos
globaltexture iss2.bgf
orientation 0 90 0
logo issLogo

; HP logo

factors 0 DistanceToStart 4
rotations -3 1 0
symbol hpLogo #logos
globaltexture hp.bgf
orientation 0 90 0
logo hpLogo

; DB logo

factors 0 DistanceToStart 0
symbol dbLogo #logos
globaltexture db.bgf
rotations 0 0 0
orientation 0 90 0
logo dbLogo

; ISS logo virtual mine

symbol issLogoMine #mines
virtualmine issLogoMine
echo "starting ISS logo";
flyinglogo issLogo
endmine

; HP logo virtual mine

symbol hpLogoMine #mines
virtualmine hpLogoMine
echo "starting hp logo";
flyinglogo hpLogo
endmine

; DB logo virtual mine

symbol dbLogoMine #mines
virtualmine dbLogoMine
echo "starting db logo";
flyinglogo dbLogo
endmine

; The virtual mine for starting the logos
  
symbol logos #mines
virtualmine logos
delayedradio dbLogoMine 0
delayedradio hpLogoMine 17
delayedradio issLogoMine 15
endmine

; Setup the night sky

; skyblack

; Set initial location

Orientation 0 0 0
Translation 150 -5 150
absteleport

; cute macros for turning showers on and off

symbol turnOffMeteors #mines
symbol QuitWorld #mines
symbol startShower #mines
symbol endShower #mines

virtualmine QuitWorld
quit
endmine

virtualmine startShower
meteors 1
endmine

virtualmine endShower
meteors 0
endmine

; Turn off meteors

delayedradio endShower 0

; **** START DEMO ACTION****

; PATH ONE

symbol world0path1 #paths
file world0path1.dez ; 42 seconds

; PATH TWO

symbol world0path2 #paths
file world0path2.dez ; 34 seconds

symbol w0p1 #mines
virtualmine w0p1
echo "starting path1"
MoveFilter .92
follow world0path1
endmine

symbol w0p2 #mines
virtualmine w0p2
echo "starting path2"
MoveFilter .92
delayedradio endShower 0
follow world0path2
endmine

symbol startDemo #mines
startDemoMine startDemo

symbol world1arrival #mines

; start meteor shower
; follow first path in world 0
; start the logo(s)
; jump to world 1

virtualmine startDemo
fog 0.0
scaleheight .5
delayedradio w0p1 26
delayedradio startShower 23
delayedradio logos 4.9
delayedradio w0p2 40
delayedradio world1arrival 68.6
delayedradio cloudEffect 67
endmine

; handy land mine for starting from this world

symbol world0start #mines

translation 156.440002 -1.400000 148.729996
orientation 0.000000 0.000000 0.000000
scale 10.000000 10.000000 10.000000
Mine world0start
echo "Starting demo from world0"
delayedRadio startDemo 0
endMine

-------

Hi,

Yep, we do most of this.

>> o performance (we _need_ realtime)
Don't do much here but call performer stuff

>> o simplicity
A VERY simple markup language that can be learned in a day or so. Made
it for architects.
>> o suitable for distributed environnement
Currently coupling it to something like BricksNet a distributed environment for
500 or so people at a time.
>> o ease of access to objects internals (vertices), including
>> if possible notion of neighborhood, etc
Not doing too much, we normally don't need to do this once we define
our models. We have a very nice "Intergraph" translator" that converts
to our own format.
>> o textured
Yep, have a geometry editor that does all sorts of nice texturing things.
>> o support for spaceball and some other `fancy' devices.
Easy stuff. We have about 5 or 6 devices connected. Not hard to add
anymore.

----

Here is our central Token Array structure. Each token has an attached
function that handles parsing its own arguments. After the initial
design, I just add them when I need one (takes about 30 seconds or so
:->).

static TokenArray Tokens[] =
 {
 { "#", lfCOMMENT, NULL, "Comment, ignore everything until end of line", },
 { ";", lfCOMMENT, NULL, "Comment, ignore everything until end of line", },
 { "3DSound", lfUSESOUND, NULL, "Send sound commands to the sound subsystem", },
 { "AbsRubberPath", lfABSRUBBERPATH, "int pathNum, float seconds", "Modify Path Timing absolutely", },
 { "absTeleport", lfABSTELEPORT, NULL, "Immediately teleport to the location",},
 { "absWormHole", lfABSWORMHOLE, "int", "WormHole teleport to a particular world, reset to the start position",},
 { "animation", lfANIMATION, "int", "Number of files in the animation sequence",},
 { "banner", lfBANNER , "filename or off", "Place or remove a banner in front of the view",},
 { "bbox", lfBBOX ,NULL, "Print out the bounding box for the scene and the last loaded object",},
/* { "boid", lfBOID, "filename", "create 20 boids of geometry <filename>", },*/
 { "Billboard", lfBILLBOARD, NULL, "Use the current material to make a billboard", },
 { "breakUpFactor", lfBREAKUPFACTOR, "float", "Set the smallest size polygon for the Breakup routine <advanced>",},
 { "characters", lfCHARACTERS, "int", "Create a numbered character",},
 { "Chair", lfCHAIR, "integer 1-4", "Attach the CHAIR to a sensor", },
 { "Collide", lfCollide, NULL, "Setup the intersection testing", },
 { "cout", lfPRINTF, NULL, "Simulate Cout in C++ (printf is alias",},
 { "CreationObject", lfCREATIONOBJECT, "string", "Set the default filename for creation",},
 { "Debug", lfDEBUG, NULL, "Turn on Internal Debugging Statements", },
 { "Delete", lfDelete, "int", "Delete the variable", },
 { "delayedRadio", lfDELAYEDRADIO, "int mine, int time", "Radio controled detonate landmine",},
 { "doFlatLand", lfDoFlatLand, NULL, "special effect to flatten",},
 { "driveModel", lfDRIVEMODEL, "int", "Define the drive model to use TB-0, FLY-1, DR-2",},
 { "Dynamic", lfDYNAMIC,NULL, "Use a Dynamic Coordinate System", },
 { "Echo", lfECHO, "String", "Echo the following String", },
 { "EndLoop", lfENDLOOP, NULL, "Terminate a Loop", },
 { "EndTime", lfENDTIME, "float", "Set the time to end an effect",},
 { "Exit", lfEXIT, NULL, "Quit now, don't need to display", },
 { "factors", lfFACTORS, "float float float", "Define three numbers used as arguments for events.",},
 { "FastTrak", lfFASTTRAK, "integer maskbits 1-15", "Use the FastTrak Sensor. Data is in Sensors 1-4", },
 { "File", lfFILENAME, "filename", "Load in an additional file. Can be a .bin, .flt, .bgf, or .dez file", },
 { "Flatten", lfFLATTEN, NULL, "Flatten the Static Coordinate System Heirarchy", },
 { "fog", lfFOG, "float", "Turn on/off fog. Value = 0.0, turns off fog. Other value gives range",},
 { "follow",lfFOLLOW, "int", "Follow path <int>. Normally placed in a landmine",},
 { "FunctionToCall", lfFUNTOCALL, "int", "Set the value of the function to call for an effect", },
 { "genericInt", lfGENERICINT, "int", "Define the value of the integer variable",},
 { "globalTexture", lfGLOBALTEXTURE, "string", "Set the global texture to be applied to the next BGF object",},
 { "gravity", lfGRAVITY, "int", "Turn on and off automatic falling to the ground of translated objects",},
 { "ground", lfGround, "string", "",},
 { "group", lfGROUP, NULL, "Create a group",},
 { "guide", lfGUIDE, "int", "0 - no guide, 1 is default",},
 { "EndGroup", lfENDGROUP, NULL, "End of current Group",},
 { "FlatLand", lfFLATLAND, NULL, "flatten the terrain",},
 { "FlyingLogo ", lfFLYING, "int or #logos", "Start A flying Logo",},
 { "Forgive ", lfFORGIVE, "int flag", "Forgive load errors",},
 { "guitoggle", lfGUI, NULL, "Turn off the Gui display. F1 brings it back",},
 { "Hand", lfHAND, "integer 1-4", "Attach the Hand to a sensor", },
 { "Head", lfHEAD, "integer 1-4)", "Attach the Head to a sensor", },
 { "HMD", lfHEADMOUNTEDDISPLAY, "integer 1-4", "Turn on the head mounted display",},
 { "Help",lfHELP, NULL, "Give help on a particular token or series of tokens.", },
 { "instanceAnimation", lfINSTANCEANIMATION, "float float", "Add the last object to the group again",},
 { "iocDistance", lfIOCDISTANCE, "float", "Eye point separation",},
 { "Lake", lfLAKE, NULL, "Show the lake", },
 { "Laser", lfLASER, "filename", "define a laser", },
 { "LeftHand", lfLEFTHAND, "integer 1-4", "Attach the Left Hand to a sensor", },
 { "lightSource", lfLIGHTSOURCE, "float x, y ,z, r, g, b", "Create a light source at a location and colour",},
 { "LiveMovie", lfLIVE_MOVIE, NULL, "create a screen for live movie (using sun) ",},
 { "LocationDelta", lfLOCATIONDELTA, "float x, y, and z", "Change the location delta from the present location", },
 { "Logo ", lfLOGO, "int or #logos", "create a flying Logo",},
 { "Loop", lfLOOP, "integer", "Loop the commands until EndLoop <number> times", },
 { "Material", lfMATERIAL, "material file", "Set the current material", },
 { "Memory",lfMEMORY, NULL, "Show the Texture Memory", },
 { "Meteors", lfMETEORS, "<not complete>", "Create a meteor shower", },
 { "Movement", lfMOVEMENT, "integer index", "Set the movement method of the object", },
 { "MoveFilter", lfMOVEFILTER, "float", "Set the value of the movement digital filter", },
 { "NodeGraph",lfNODEGRAPH, NULL, "Printout the Current Node Graph",},
 { "Notify", lfNOTIFY, "integer 1-4", "Change the notice level of messages", },
 { "oakTree", lfOAKTREE, NULL, "Create a 3 dimensional oak tree",},
 { "objectFollow", lfOBJECTFOLLOW, "int", "Have the object follow a path",},
 { "opening", lfOPENING, "NULL", "do opening",},
 { "path", lfPATH, "int", "Read in a path description. The description is ended with \"endpath\"",},
 { "partition", lfPARTITION, "float float float", "Specify the three values used for partitioning",},
 { "photoNode", lfPHOTONODE, "int", "Define a PhotoNode"},
 { "People", lfPEOPLE, NULL, "Use the current material to make a Person", },
 { "Planet", lfPLANET, "<not complete>", "Create a moving", },
 { "powerLaser", lfPOWERLASER, "int", "Turn laser power on"},
 { "printf", lfPRINTF, NULL, "Simulate Cout in C++ (cout is alias)",},
 { "printPaths", lfPRINTPATHS, NULL, "Printout the path times",},
 { "printScene", lfPRINTSCENE, NULL, "Printout the current scene in detail",},
 { "Orientation", lfORIENTATION, "float x y and z", "Orient the objects ", },
 { "Quiet", lfQUIET, NULL, "Turn off playing sounds", },
 { "Quit", lfEXIT, NULL, "Quit now, don't need to display", },
 { "Radio", lfDoRadio, NULL, "Radio control detonate landmine",},
 { "Random", lfRANDOM, "float", "Generate a random number, scale by the value of SFRandom", },
 { "RandomGod", lfRANDOMGOD, "int", "Constantly Move the Display when idle", },
/* { "rayCast", lfRAYCAST, NULL, "do ray cast shadow", },*/
 { "Replace", lfReplace, "int int", "Replace the first variable with the second", },
 { "Remote", lfREMOTE, NULL, "Debugging function, call function \"doRemote\", useful for remote operation", },
 { "RightHand", lfHAND, "integer 1-4", "Attach the Right Hand to a sensor", },
 { "Rotations", lfROTATION, "float float float", "Rotation speeds", },
 { "RotateX", lfROTATEX, "float x", "Pitch the objects ", },
 { "RotateY", lfROTATEY, "float y", "Roll the objects ", },
 { "RotateZ", lfROTATEZ, "float z", "Yaw the objects ", },
 { "Rotatation", lfROTATION, "float z", "Yaw the objects ", },
 { "RubberPath", lfRUBBERPATH, "int pathNum, float percent", "Modify Path Timing by a percentage", },
 { "Sequence", lfANI_SEQ, NULL, "Place your sequence file *.seq here", },
 { "SkyBlack", lfSKYBLACK, NULL, "Use an outer space sky model", },
 { "SkyNormal", lfSKYNORMAL, NULL, "Use the normal sky model", },
 { "Sequence", lfANI_SEQ, NULL, "Place your sequence file *.seq here", },
 { "SFRandom", lfSFRANDOM, "float", "Define the scale factor for Random numbers", },
 { "Scale", lfSCALE,"float x y and z", "Scale the objects", },
 { "scaleHeight", lfSCALEHEIGHT, "float", "Scale the height from the ground",},
 { "scaleSpeed", lfSCALESPEED,"float", "Scale the Speed",},
 { "Show", lfSHOW,NULL, "Show the current settings.", },
 { "Small", lfSMALL,NULL, "Create a smaller debug screen rather than full-screen", },
 { "Sound", lfSOUND, "integer index", "Set the sound eminating from the next defined object", },
 { "SpecialEffect", lfSPECIALEFFECT, "int", "Create a special effect. See effect.h for types",},
 { "SpecialSound", lfSPECIALSOUND, "int", "Have the guide say something",},
 { "StartTime", lfSTARTTIME, "float", "Set the time to start an effect",},
 { "StartDemoMine", lfSTARTDEMO, "int", "Setup the startup landmine",},
 { "Static", lfSTATIC, NULL, "Use a Static Coordinate System", },
 { "Symbol",lfSYMBOL, "symbolName value", "Create a symbol variable", },
 { "Terrain", lfTERRAIN, "filename", "Create a Terrain.", },
 { "Test", lfTEST, "float", "Test token.", },
 { "timeOfDay", lfTIMEOFDAY,"float", "Set the time of day 0-2400",},
 { "timer", lfTIMER,NULL, "Start the timer",},
 { "trace", lfTRACE,NULL, "Trace the running",},
 { "Translation", lfTRANSLATION, "float x y and z", "Translate the objects", },
 { "TranslateX",lfTRANSLATEX, "float", "Translate the objects on one axis", },
 { "TranslateY",lfTRANSLATEY, "float", "Translate the objects on one axis", },
 { "TranslateZ",lfTRANSLATEZ, "float", "Translate the objects on one axis", },
 { "Tree", lfBILLBOARD, NULL, "Use the current material to make a billboard", },
 { "Variable",lfVariable, "int","Save the last object as a variable", },
 { "Verbose",lfVERBOSE,NULL,"Toggle on the verbose mode", },
 { "Version",lfVER_NUM,NULL, "Show the version number of the ISS Dez Toolkit.", },
 { "ViewLoop", lfLOOPVIEW, "int", "1 - to loop on following paths",},
 { "VirtualMine", lfVIRTUALMINE, "int", "Like a mine, but doesn't appear", },
 { "Visible", lfVISIBLE, "int", "Set to 1 to make object toggle visibility. Be sure to set back to 0 later ",},
 { "VoiceRecognition", lfVOICERECOGNITION, NULL, "Create a connection to the Apple Voice reconition machine" },
 { "world", lfWORLD, "int", "Create a world, all subsequent objects will appear here",},
 { "WormHole", lfWORMHOLE, "int", "WormHole teleport to a particular world",},
}


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:48 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.