________________________________________
VRHOTWIRES DEMO MODE TOOL
________________________________________
version 2.0
DEMO MODE
Many people make panos that autopan in various ways. So the movie is automatically
spinning when the movie opens...
VRHotwires has ‘demo modes’ that kick in after a pano loads or if the mouse
isn’t clicked for a certain amount of time. In this way they are very much
like the ‘demo mode’ that many games drop into when the user isn’t playing
them...
Another way of thinking about a qtvr pano with a demo mode, is like a screen
saver, especially when you’ve pressed the ‘fullscreen’ flag in movie info
and play it back in qt player... it’s an automated presentation that can go
on continously... for example on the background computer at a trade show....
Thirdly, some people are starting to think about a qtvr pano with a demo
mode, like a form of linear film.They can have long sondtrack narrations
they can play for a long time and
provide a nice backdrop to some kinds of music or poetry, or documentary.
How’s the demo mode tool work?
Well let’s give it a try.
-Open Vrhotwires
-drag a vr onto the window.
-under ‘tools’ choose demo maker.
- now for a very simple demo sequence lets’ make it pan by 2 degrees
100
times to the right. Fill in the interface like this and press ‘add’.
Nothing will be added to your movie at this point. We’re just building
up our list of moves for this demo mode to run through... So far our list
has one move.
Let’s try adding a second move too...
Press ADD again...
Now the list box should show 2 items. When you click on either of them,
you should get the move and it’s values...
we should be able to build up complex lists triggering text tracks, sound
tracks,
video tracks....with different moves at different speeds zooming in on
different objects...
don’t forget that you can open the realtime data window to see your current
pan angle. So if your movie opens looking at zero and you want it to look
at 60, then you know what the demo move should be...
But two moves is enough for now... just press
and you’re first demo mode is added.
Don’t click the mouse for a while and it should start playing in the main
movie window...
If you choose ‘script’ under views, you will no longer have an empty script.
It will now have
a demo mode script. Later in this doc we’ll break that script apart, but
for now let’s go through the possibilities in this demo mode tool...
What if you want the movie to drop into demo mode if the person has left
their desk for a while...
Check out the line near the bottom:
I find autopanning invasive sometimes. That’s why this should be user
tweakable from a settings page in my perfect movie w demo mode...
This part of the demo mode tool updates based on the main panos pan/tilt/zoom
angles...
Make sure you are panned to the place you want the demo to start from when
you click to
build the sprite track.
You can build demo mode sprite tracks over and over on top of each other
and you won’t have to delete the tracks manually with movie info. The tool
deals with it...
Details of a demo mode script?
THIS IS A COMMENTED VERSION OF A DEMO MODE MOVIE
Strategy: We’re using an idling sprite to drive our demo mode.
the advantage to this is that our movie’s time line is still unused, so
our demo can include sound lables or linear transitions that use the movie’s
timeline.
The disadvantages are, that if we drove it with a tween track, qt
would time it so it plays the same on all machines. Here we have to use some
calibration code to average it up or down for different machines...
###############################################
Sprite Track: 1 0 40
################################################
###############################
Sprite Sample: 1 0 40
###############################
On FrameLoaded
//when the pano is first opened it should go to the
demo mode’s start position..
QTVRSetPanAngle 180
end
##################
Sprite Number: 1
##################
On Idle Sprite 1
//445 holds the amount of time since the
last mouseclick
If Variable[445,TrackType=Sprite]>0
// if we've gone 1000 cycles without a mouseclick
then it’s time to start a demo mode. Change the 1000 if you want to wait a
longer or shorter amount of time before your demo mode cuts in.
If (theTicks-Variable[445,TrackType=Sprite])>1000
//each demo mode should start at a certain
pan tilt and zoom, this is where you reset it.
QTVRSetPanAngle 180
//123 is the main loop counter.
SpriteTrackSetVariable 123 100 TrackType=Sprite
//44 is the gate for the main loop. reset
it here
SpriteTrackSetVariable 444 0 TrackType=Sprite
/ 445 holds the amount of time since
the last click. reset it to zero.
SpriteTrackSetVariable 445 0 TrackType=Sprite
//make sure all the text track labels are
off.
TrackSetEnabled false TrackIndex=7
TrackSetEnabled false TrackIndex=8
TrackSetEnabled false TrackIndex=9
TrackSetEnabled false TrackIndex=10
EndIf
EndIf
//444 is gate to the main loop. it is closed
after each mouse click, and not reopened until a set time has passed without
a mouse click.
If Variable[444]=0
//this odd code tests for the mouse
click!
If theKeyIsDown[128,0]
//close the gate! we've had
a mouse click. Get out of demo mode
SpriteTrackSetVariable 444 1 TrackType=Sprite
//set variable 445 to the
system ticks count
SpriteTrackSetVariable 445 theTicks TrackType=Sprite
//since we're now out of
demo mode, we'll make sure all our lable tracks are off.
TrackSetEnabled false TrackIndex=7
TrackSetEnabled false TrackIndex=8
TrackSetEnabled false TrackIndex=9
TrackSetEnabled false TrackIndex=10
EndIf
//variable 777 is the ‘slow down’ factor for different cpu’s. a negative
number. So this is in a way, the main counter for the loop.
SpriteTrackSetVariable 223 (Variable[223]+1)+Variable[777,TrackType=Sprite]
TrackType=Sprite
//if we’ve added enough that it makes it 1 greater,
then add that amount to our REAL main counter, variable 123)
If (Variable[223,TrackType=Sprite])>(Variable[123,TrackType=Sprite]+1)
SpriteTrackSetVariable 123 Variable[123,TrackType=Sprite]+1
TrackType=Sprite
SpriteTrackSetVariable 223 Variable[123,TrackType=Sprite]
TrackType=Sprite
//from here on in we’re just checking the value of
123 and doing each demo // move depending on the count...
If Variable[123,TrackType=Sprite]=100
SpriteTrackSetVariable 555 theTicks TrackType=Sprite
EndIf
If (Variable[123,TrackType=Sprite]>100)and(Variable[123,TrackType=Sprite]<200)
QTVRSetPanAngle 2 delta
EndIf
//this is the calibration code. we’ve made it through the loop 200 times
now, and we know roughly how long that should have taken. So we can decide
whether it’s a slow, normal, or fast. (this is crude and can be improved on
easily...)
//CALIBRATION
If Variable[123,TrackType=Sprite]=200
//first we enable
a text lable at this point(by coincidence)
TrackSetEnabled true TrackIndex=8
//ok let’s figure out how long that took and put
the answer in 556
SpriteTrackSetVariable 556 theTicks-Variable[555,TrackType=Sprite]
TrackType=Sprite
//it took longer than 335 ticks to do the task, this
is a slower machine.
If Variable[556,TrackType=Sprite]>335
TextTrackPasteText "slower machine"
0 100 TrackIndex=11
EndIf
//it took less than 335 ticks to do the task, this
is a normal machine.
If Variable[556,TrackType=Sprite]<335
SpriteTrackSetVariable 777 -0.5
TrackType=Sprite
TextTrackPasteText "normal speed
machine" 0 100 TrackIndex=11
EndIf
//it took less than 290 ticks to do the task, this
is a fast machine.
If Variable[556,TrackType=Sprite]<290
SpriteTrackSetVariable 777 -0.9
TrackType=Sprite
TextTrackPasteText "fast machine"
0 100 TrackIndex=11
EndIf
//it took less than 240 ticks to do the task, this
is a very fast machine.
If Variable[556,TrackType=Sprite]<240
SpriteTrackSetVariable 777 -0.99
TrackType=Sprite
TextTrackPasteText "very fast machine"
0 100 TrackIndex=11
EndIf
TextTrackPasteText Variable[556] 100 300
TrackIndex=11
EndIf
//ok calibration is complete just keep doing the
right thing at each value of 123
If (Variable[123,TrackType=Sprite]>200)and(Variable[123,TrackType=Sprite]<230)
QTVRSetFieldOfView -1 delta
EndIf
If (Variable[123,TrackType=Sprite]>230)and(Variable[123,TrackType=Sprite]<250)
QTVRSetTiltAngle 0.5 delta
EndIf
If (Variable[123,TrackType=Sprite]>250)and(Variable[123,TrackType=Sprite]<300)
QTVRSetFieldOfView 1 delta
EndIf
If (Variable[123,TrackType=Sprite]>300)and(Variable[123,TrackType=Sprite]<350)
QTVRSetFieldOfView 1 delta
EndIf
If (Variable[123,TrackType=Sprite]>350)and(Variable[123,TrackType=Sprite]<400)
DebugStr "waiting"
EndIf
If Variable[123,TrackType=Sprite]=400
TrackSetEnabled false TrackIndex=8
EndIf
If (Variable[123,TrackType=Sprite]>400)and(Variable[123,TrackType=Sprite]<450)
QTVRSetPanAngle 1 delta
EndIf
If (Variable[123,TrackType=Sprite]>450)and(Variable[123,TrackType=Sprite]<455)
QTVRSetPanAngle 2 delta
EndIf
If Variable[123,TrackType=Sprite]=455
TrackSetEnabled true TrackIndex=7
EndIf
If (Variable[123,TrackType=Sprite]>455)and(Variable[123,TrackType=Sprite]<600)
QTVRSetFieldOfView -0.1 delta
EndIf
If (Variable[123,TrackType=Sprite]>600)and(Variable[123,TrackType=Sprite]<650)
QTVRSetFieldOfView 1 delta
EndIf
If Variable[123,TrackType=Sprite]=650
TrackSetEnabled false TrackIndex=7
EndIf
If (Variable[123,TrackType=Sprite]>650)and(Variable[123,TrackType=Sprite]<710)
QTVRSetPanAngle 2 delta
EndIf
If (Variable[123,TrackType=Sprite]>710)and(Variable[123,TrackType=Sprite]<800)
QTVRSetFieldOfView -0.5 delta
EndIf
If Variable[123,TrackType=Sprite]=800
TrackSetEnabled true TrackIndex=9
EndIf
If (Variable[123,TrackType=Sprite]>800)and(Variable[123,TrackType=Sprite]<850)
DebugStr "waiting"
EndIf
If (Variable[123,TrackType=Sprite]>850)and(Variable[123,TrackType=Sprite]<900)
QTVRSetFieldOfView 0.5 delta
EndIf
If Variable[123,TrackType=Sprite]=900
TrackSetEnabled false TrackIndex=9
TrackSetEnabled true TrackIndex=10
EndIf
If (Variable[123,TrackType=Sprite]>900)and(Variable[123,TrackType=Sprite]<1000)
//sometimes you want the demo to just pause and do
nothing and look at something...
DebugStr "waiting"
EndIf
If (Variable[123,TrackType=Sprite]>1000)and(Variable[123,TrackType=Sprite]<1100)
//reset everything...
SpriteTrackSetVariable 123 80 TrackType=Sprite
TrackSetEnabled false TrackIndex=10
QTVRSetPanAngle 180
EndIf
EndIf
EndIf
end
###########
Node Number: 1
###########