Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Anchoring Sprites in Cubic VRs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Anchoring Sprites in Cubic VRs



Frank,

Not sure about 1 (updated version of Matthew's behavior) and 3 is always a possibility, but it does cause bloat and it requires you to go back to regenerate the VR's whenever you make a change. However 2 was my personal "holy grail" a couple of years back. As you point out, there don't seem to be any commonly available behaviors for "pinning" sprites to a cubic VR, and I wasn't completely satisfied with the "approximations" that even existed for cylindrical VR's at that time.

In the end, I had to go back to first principles - projecting points on a spherical surface onto a a display plane (the movie window) to try and reproduce the warping that was actually happening in the VR engine. The resultant behavior is quite complicated (over 200 lines of somewhat opaque, mathematically heavy, Qscript) but it does the job I intended. A couple of caveats:

1. The possible transformations on sprites is somewhat limited, so you can't totally reproduce the illusion of being in the VR. In essence, you're pinning the four corners of the flat sprite to the curved surface of the sphere. In practice, this isn't a huge problem since the angular dimensions of the sprite (think of each corner being at a particular pan and tilt angle, so the width and height can be expressed in degrees) are often small, so the flat sprite is reasonably close to the curved surface. (Hope that made sense.)

2. Adding another visible track (the sprite track) over a VR degrades the interactive responsiveness of the VR. This gets compounded when the sprite movement is driven by idle events which are somewhat disconnected from the VR movement. In the worst case, it becomes pretty obvious the sprite is just getting jerked along as the VR pans, tilts, and zooms. Obviously, there are lots of issues at play (hardware, VR size, sprite track graphics modes, ..) so YMMV.

If you're interested in this work, contact me off-list and I'll pull together a smallish Livestage project that demos the behavior. I haven't spent much time on the behavior lately, so it lacks polish, but maybe you'd be willing to help on that front. Note that it also requires the position and orientation of the sprite to be defined at compile time - the sprite can't be moved at runtime, although the behavior could conceivably be modified to support this in the future.

Finally, you should also look at the QSXE component released with more recent versions of LSP - it defines additional actions which supports placing still or video images in the VR through the low level display buffer. If it works for you, it potentially overcomes some of the sprite related issues noted above.

Rick Workman
Immersionography Associates


On 22-Nov-05, at 3:04 PM, email@hidden wrote:

------------------------------

Message: 14
Date: Tue, 22 Nov 2005 14:58:37 -0500
From: "Frank Klassner" <email@hidden>
Subject: Anchoring Sprites in Cubic VRs
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=us-ascii

I'm in the middle of designing a game with QTVR for a summer camp.
I'm using cubic QTVR nodes taken of various locations in the
camp, and the game involves doing a scavanger-hunt through the
virtual environment (about 100 nodes -- plenty of room to encourage
exploration).

One of the tricks I wanted to use in the game was to have the items
to be found randomly appear at random nodes in a defined cluster of
nodes (E.G. a squirrel could appear in a node near the inlet to a
lake, but also at any of the nodes immediately next to that node).

After I read Matthew Peterson's "Interactive QuickTime" book, I felt
that I could use his VRSprite behavior to have the items appear as
anchored sprites (they move with the background VR as it rotates,
and distort as the VR "wraps off" the side of the screen).
Unfortunately, it appears that the code he wrote on the CD only
works for panorama VRs and not cubic VRs.  When I try using his
code in a cubic, the sprite is a lot flatter, and only slides back
and forth a little, and never moves off the screen.  It also
doesn't move up and down as I move the cubic VR up and down.

SO, I now have 3 questions/possibilities to ask of this esteemed list:

  1) Has Mr. Peterson published improved code for the cubic situation?

  2) Has anyone else created a solution to this problem of properly
     projecting sprites (not object VRs) into a cubic?  Keep in
     mind that I'd like to be able to use/import this solution in
     Live Stage 4.1.4

  3) Am I stuck with just creating copies of the nodes with and without
     the scavanger-hunt items "pasted into" them, and adding scripts
     to hotsposts that randomly determine whether when I walk into
     the next location I will enter the version with the item?  Each
     of my nodes is about 3MB. (Yes, this is only being distrbuted
     on a CD)

 Thanks!
   --Frank Klassner

--------------------------------
Associate Professor
Department of Computing Sciences
Villanova University
800 Lancaster Avenue
Villanova, PA 19085


_______________________________________________ Do not post admin requests to the list. They will be ignored. QuickTime-VR mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.