Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a 2001 trip effect written in QB64?
#1
Simple question. Has anyone written a slit-scan effect program for QB64? That is like the "trip" sequence in the movie "2001 a Space Oddity". If not, is anyone up to the challenge of making one? If so one little rule, it should use an external image to scan. Here is a short YouTube video that shows the technique. I can almost understand how to do it from that myself. Final thought - it might make a good screensaver project too.

Thanks.

TR
Reply
#2
Little disappointed that none of the graphics experts on here took the bait...

TR
Reply
#3
You want an animated image going side ways along a wall?

Perhaps a mod of this?
Code: (Select All)
' Star Wars Episode V: The Empire Strikes Back opening crawl?
' http://www.galaxyfaraway.com/gfa/2006/02/what-is-the-text-of-the-star-wars-episode-v-the-empire-strikes-back-opening-crawl/

Screen _NewImage(800, 700, 32)
_ScreenMove 300, 20
swt& = _NewImage(320, 512, 32)
_Dest swt&
Color _RGB32(0, 180, 0)
nl$ = Chr$(10)
sw$ = "It is a dark time for the Rebellion." + nl$
sw$ = sw$ + "Although the Death Star has been" + nl$
sw$ = sw$ + "destroyed, Imperial troops have driven" + nl$
sw$ = sw$ + "the Rebel forces from their hidden base" + nl$
sw$ = sw$ + "and pursued them across the galaxy." + nl$
sw$ = sw$ + nl$ + nl$
sw$ = sw$ + "Evading the dreaded Imperial Starfleet," + nl$
sw$ = sw$ + "a group of freedom fighters led by Luke" + nl$
sw$ = sw$ + "Skywalker has established a new secret" + nl$
sw$ = sw$ + "base on the remote ice world of Hoth." + nl$
sw$ = sw$ + nl$ + nl$
sw$ = sw$ + "The evil lord Darth Vader, obsessed" + nl$
sw$ = sw$ + "with finding young Skywalker, has" + nl$
sw$ = sw$ + "dispatched thousands of remote probes" + nl$
sw$ = sw$ + "into the far reaches of space.... " + nl$
Locate 20, 1
Print sw$

_Dest 0
yy = _Height / 3
For i = 11 To 60 Step .5
    Cls
    yy = yy - 60 / i
    cText _Width / 2, yy + yy, yy, _RGB32(230, 220, 50), "Star Wars"
    cText _Width / 2, yy + yy, yy * .96, _RGB32(0, 0, 0), "Star Wars"
    _Display
    _Limit 15
Next

cx = _Width / 2
power = 1024 'TO 1 STEP -1
x = (_Height - 20) ^ (1 / power)
dy = 1 '256 pixel height / 50 blocks across
For y = -840 To -270
    Cls
    For i = 0 To power - 1
        '_PUTIMAGE [STEP] [(dx1, dy1)-[STEP][(dx2, dy2)]][, sourceHandle&][, destHandle&][, ][STEP][(sx1, sy1)[-STEP][(sx2, sy2)]]
        _PutImage (cx - .75 * x ^ i, 10 + x ^ i)-(cx + .75 * x ^ i, 10 + x ^ (i + 1)), swt&, 0, (0, y + dy * i)-(319, y + dy * (i + 1))

        'LINE (cx - .75 * x ^ i, 10 + x ^ i)-(cx + .75 * x ^ i, 10 + x ^ (i + 1)), , B
    Next
    Print y
    _Display
    _Limit 15
Next
yy = 80
For i = 60 To 0 Step -.5
    Cls
    yy = yy + 60 / i
    cText _Width / 2, yy + yy, yy, _RGB32(230, 220, 50), "Star Wars"
    cText _Width / 2, yy + yy, yy * .96, _RGB32(0, 0, 0), "Star Wars"
    _Display
    _Limit 75
Next

Sub cText (x, y, textHeight, K As _Unsigned Long, txt$)
    fg = _DefaultColor
    'screen snapshot
    cur& = _Dest
    I& = _NewImage(8 * Len(txt$), 16, 32)
    _Dest I&
    Color K, _RGBA32(0, 0, 0, 0)
    _PrintString (0, 0), txt$
    mult = textHeight / 16
    xlen = Len(txt$) * 8 * mult
    _PutImage (x - .5 * xlen, y - .5 * textHeight)-Step(xlen, textHeight), I&, cur&
    Color fg
    _FreeImage I&
End Sub
b = b + ...
Reply
#4
Spent time getting the links for this reply so I haven't looked at your code yet. While bearing some similarities to the slit scan effect the Star Wars intro crawl isn't really it. Rather than trying to explain what I am talking about here are those links (with comments from me).

Background (links in this section are all to wikipedia pages)

In around 1964 Douglas Trumbull volunteered his services to Stanley Kubrick for work on the latter's new Space movie based on a short storey (The Sentinel) by Arthur C. Clarke. Clarke and Kubrick worked together on the screenplay. Towards the end of the movie there is a sequence now known as either the stargate sequence or (by others) as the "trip" sequence. Trumbull was tasked with creating something other-worldly for this. For this he ended up adapting an old photographic technique known as Slit-scan photography (that page contains a very, very brief description of how it is done), and invented a machine to do it. Incidentally, there is an older (than the movie) variation of this method that is still in use around the world - those official pictures of horse races aka the finishing post pictures.

VIL (Very Important (YouTube) Links)

This is what the result of Trumbull's work actually looks like (it is somewhat edited though) - Stanley Kubrick - 2001: A Space Odyssey, 1968 - Slit Scan Effect (Length 1:50)

Please watch this description of the history of the slit-scan technique from its origins - 

The History and Science of the Slit Scan Effect used in Stanley Kubrick's 2001: A Space Odyssey (length 15:26)

Not only does it contain the history but also it gives a much fuller description of the mechanics of the making of the sequence above. Heck, the guy even goes to the trouble of trying to replicate (with some success I might add) the sequence from 2001. FWIW, IMO I think this is a really good video on the topic.

Suggested Method of Replicating in QB64 (real-time)

In essence think of it as having a pair of conveyor belts in 3D space whose origins are at near infinity and that pass either side of you. At the furthest away points on this conveyor you put a slice of a graphic (different graphic on each one). You then rotate the belts so that the original graphics get closer to you and add new slices to the ends of the belts. Repeat this process to create a moving graphics effect.

From that I can see 2 problems - timing and perspective effects. The timing should be obvious so I'll expand on the mechanics for the right hand side -

Load a small (vertically) image into memory.
Take a vertical slice of it one pixel in width.
Display that slice.
After a period of time, scroll the displayed image to the right adjusting the height and maybe the width in order to simulate the perspective.
Add a new slice of the image where the first slice was.
Repeat until you run out of image to slice.

Anyway, just my suggestion.

TR
Reply
#5
Yeah you haven't studied the example of Star Wars crawl, don't be fooled by the text, thousands of putImages a pixel high are stacked up to form the image with ever expanding widths.
b = b + ...
Reply




Users browsing this thread: 1 Guest(s)