Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: FLASH: 3D-question (digital-arts.co.uk)
From: John Dowdell
Date: Thu, 6 May 1999 21:47:29 +0100

At 10:43 AM 5/6/99, Hofsommer, Tyson wrote:
> WOW! That is awesome! Anyone know how they do those interactions
> w/o movies AND have them all follow the cursor?

I guess by now you know it's Shockwave.... ;-)

For the "how'd they do that!?" I don't know the project in particular, but
believed they used programmable blending combined with "quads": the ability
to set the four corners of a bitmap independently of each other.

Example: Imagine a square that's rotating on its vertical axis. Because of
perspective, the two distant corners would appear to be closer together
than the two corners closest to your eye. If the original square was 100
pixels on a side, then you might represent it on-screen like this... each
point is the horizontal and vertical screen coordinates from the top-left
of the screen, and points are listed in left-top-right-bottom order:

theSquare = [point(100, 100), point(200, 100), point(200, 200), point(100, 200)]

In perspective, the same graphic might be distorted to fit this quadrilateral:

theQuad = [point(125, 75), point(175, 125), point(175, 175), point(125, 225)]

(In other words, when the left edge rotates in to you, then its corners
cover a larger area of the screen than the right edge which is away in the
distance.)

The person scripting this project set up a timer function to apply a
direction-of-motion to the logical 3D shape, then did a 3D-to-2D transform
to find the perspective as it appears on the screen. The quads of the
graphic sprites then texturize this area. Add a mouse function to modify
the direction-of-motion, and you can spin that thing 'round all day
long.... ;-)

jd





John Dowdell, Macromedia Tech Support, San Francisco CA US
Search technotes: http://www.macromedia.com/support/search/
Offlist email risks capture by the spam filters. I may not see your
email if it's not on the list. Private one-on-one email options are
available via Priority Access: http://www.macromedia.com/support/



------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]