Author Topic: demo effect questions  (Read 14804 times)

0 Members and 1 Guest are viewing this topic.

Offline spitfire

  • Amiga 1200
  • ****
  • Posts: 275
  • Karma: 9
    • View Profile
demo effect questions
« on: May 20, 2009 »
Id like to know how some effects are done. In all cases I dont want to hear about how one might implement them with 3d, but rather the clever multiplication/buffer techniques that were used in older times. Unless of course they too just used 3d back then.

A twisting tunnel. I know how to look around in a tunnel but how do they make those that turn?

Twister. On the mindcandy 2 peview dvd trixter said a twisting cube was done by rendering different slices of the cube at different rotations, then playing those slices out of order. Is that how most twister bars are done? Can u tell me more about this technique.

Wormhole. So you have a buffer of range values in a certain shape, and then slide some texture over that. How exactly do you map your texture onto this shape though?

Lighttrails, sticking out from behind a shape.

I cant remember the others I had questions about right now.. I'll post later.
« Last Edit: May 20, 2009 by spitfire »

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: demo effect questions
« Reply #1 on: May 20, 2009 »
Here are 3 great posts about the twisting bar fx:

http://www.dbfinteractive.com/forum/index.php/topic,1555.0.html
http://www.dbfinteractive.com/forum/index.php/topic,675.0.html
http://www.dbfinteractive.com/forum/index.php/topic,752.0.html

There are some tunnel examples on here somewhere too but I can't find them!

Very often the cool fx on the Amiga were done by using clever pre-computation techniques - so pre-rendering some results and playing it back in a particular order are way up there as possible solutions to problems.  Anything you end up calculating as part of an fx can be put in a table.  If you can put those tables in RAM and look them up very quickly that's another great way of breaking something really tough down in to a few lookups.
I did a swirly demo thing that twisted a bmp demo, some time ago, damned if I can find that either!  It started off doing everything the hard way, then worked on driving it all by tables to get it up to real time.

Jim
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: demo effect questions
« Reply #2 on: May 20, 2009 »
Quote
A twisting tunnel. I know how to look around in a tunnel but how do they make those that turn?

There are some nice tricks you can use to get these very fast in software rendering.
Firstly it helps to think of the tunnel as a series of rings, you can generate the plots on a circle using some simple sin and cos;

Code: [Select]
X=RADIUS*SIN(THETA)
Y=RADIUS*COS(THETA)

When making a tunnel I would typically generate 720 or even 1440 plots in a circle, then you can have offsets into the screen depending on how many segments your tunnel has.
very simply you never have to depth sort this type of tunnel ;) always draw it from back to front, move an offset for z into the screen until it has moved forward a couple of segments and then simply reset it.

Because you have lots of points, if you have 1440 points on each circle and you connect up with a gap of 90 points you will end up with 16 faces in each segment, by having a simple offset and moving this between 0 and 90 you can make the tunnel spin.

Quote
Twister. On the mindcandy 2 peview dvd trixter said a twisting cube was done by rendering different slices of the cube at different rotations, then playing those slices out of order. Is that how most twister bars are done? Can u tell me more about this technique.

Again, no serious techniques need to be used here as Jims links show.
All you do is have some simple sin / cos, 4 points per scan line at 90 degree offsets and just check if X1 is < X2 for each pair, if it is then draw a line between them.

You could even go to town on this and precalculate some texture getting darker and narrower and actually use pointers to fake a texturemapped bar, just like this;




Quote
Wormhole. So you have a buffer of range values in a certain shape, and then slide some texture over that. How exactly do you map your texture onto this shape though?

Not sure what you mean here, but if it is what I think then you'd basically use some formula to look up pixels in a texture map, depending on the formula you can do spheres, lenses, tunnels or any shape really.

Quote
Lighttrails, sticking out from behind a shape.

Usually these are achieved by grabbing the image in the frame buffer, dimming it and pasting it over the top, look for "radial blur" to find out more :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: demo effect questions
« Reply #3 on: May 20, 2009 »
Wormhole. So you have a buffer of range values in a certain shape, and then slide some texture over that. How exactly do you map your texture onto this shape though?
If you're refering to a classic wormhole like eg. this one...

...you draw the shape using a 16x16 (=0..255) "texture" and plot a unique color for each texel.
Now you can move/morph/blend your texture by simply assigning a new palette.
Challenge Trophies Won:

Offline spitfire

  • Amiga 1200
  • ****
  • Posts: 275
  • Karma: 9
    • View Profile
Re: demo effect questions
« Reply #4 on: May 20, 2009 »
Thanks alot for the feedback IVe already learnt alot here!

I dont quite get what youre saying about the tunnel. The tunnel effect I know isnt drawn with circles, but with angle and distance buffers. When you use the word "faces" Im thinking of triangles in 3d. I really dont want to make a proper 3d tunnel.

That twisty effect is brilliant! I find the creative use of simple math much more impressive than blunt implementation of higher math, like ray tracers etc.

Yes thats the wormhole Im talking about.

Regarding light trails, how do they do the moving light trails sticking out from behind text for example. The rays stick out further in certain sections as the apparent light source behind moves around.
« Last Edit: May 20, 2009 by spitfire »

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: demo effect questions
« Reply #5 on: May 20, 2009 »
maybe it would be better to show you some code, this is a very old cracktro I made so I apologise for the code!

I have basically taken out the logo and music so that it can be run in freebasic, this is how to cheat at tunnels:


[edit - source added to zip]
« Last Edit: September 07, 2009 by Shockwave »
Shockwave ^ Codigos
Challenge Trophies Won:

Offline spitfire

  • Amiga 1200
  • ****
  • Posts: 275
  • Karma: 9
    • View Profile
Re: demo effect questions
« Reply #6 on: May 20, 2009 »
An Error Has Occurred!
You are not allowed to access this section

when trying to download :(

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: demo effect questions
« Reply #7 on: May 20, 2009 »
Try again mate, I was updating it
Shockwave ^ Codigos
Challenge Trophies Won:

Offline spitfire

  • Amiga 1200
  • ****
  • Posts: 275
  • Karma: 9
    • View Profile
Re: demo effect questions
« Reply #8 on: May 20, 2009 »
Ah thanks got it. That demo is awesome!

Offline spitfire

  • Amiga 1200
  • ****
  • Posts: 275
  • Karma: 9
    • View Profile
Re: demo effect questions
« Reply #9 on: May 21, 2009 »
Just watched unreal by future crew. How do they do the real colour plasma?
(at about 5:45 minutes in, halfway)

[youtube]http://www.youtube.com/watch?v=vxGtPAhkEQU&eurl=http%3A%2F%2Fwww.dbfinteractive.com%2Fforum%2Findex.php%2Ftopic%2C4069.0%2Ftopicseen.html&feature=player_embedded[/youtube]

Offline Optimus

  • DBF Aficionado
  • ******
  • Posts: 2456
  • Karma: 128
    • View Profile
    • Optimouse Demo Site
Re: demo effect questions
« Reply #10 on: May 25, 2009 »
I always wondered how the fast mapped tunnel on unreal is possible. I knew these effects usually involve a correspondence of the pixels of a bitmap to specific pixels on the screen, since the mapped object was static and you just scrolled the texture. But the Unreal wormhole had a good resolutionand ran smoothly on my 386. I later remember it when I investigated a similar technique in quickbasic on my 386. It's funny how quickbasic on a 386 can do 70fps mapped tunnels, sphere mapping and everything, if the texture is 16*16 (no files, just explaining the technique a bit).

As for the plasma in unreal I am also still wondering (among with other things)
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: demo effect questions
« Reply #11 on: May 26, 2009 »
Interesting blog post there Optimus K+ :)

I agree with you, it is amazing what can be squeezed out of a fairly low powered machine even using basic!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1432
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: demo effect questions
« Reply #12 on: May 27, 2009 »
@spitfire:
hi.. maybe this stuff about tunnels may help you:
http://www.dbfinteractive.com/forum/index.php/topic,1942.0.html
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: demo effect questions
« Reply #13 on: May 27, 2009 »
That wormhole looks awesome, how its generated and done i've no clue.

As for the real plasma, is it the one that has text saying real and then unreal?
or is it the one after that, looks like some kind of shade bob technique to spread out the colours?
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline spitfire

  • Amiga 1200
  • ****
  • Posts: 275
  • Karma: 9
    • View Profile
Re: demo effect questions
« Reply #14 on: May 28, 2009 »
Thanks vain but that has everything except what I wanted to know :P

clyde: yes the bit after it says "real color pasma".

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: demo effect questions
« Reply #15 on: May 28, 2009 »
Quote
How do they do the real colour plasma?
It's a 320x400 screen-mode showing three static plasma-clouds (a red, a green and a blue one) drawn in alternating scanlines (and alternating row-order for each pixel), each using a part of the 256-colour palette.
The motion is produced by color-cycling the palette-part of each sub-image.
They're also toggling between two different row-alternations each frame (two 320x400 images fit the 256kb of standard-vga-ram).
Just zoom into the image to get the idea:

« Last Edit: May 28, 2009 by hellfire »
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: demo effect questions
« Reply #16 on: May 29, 2009 »
Thanks for the explanation Hellfire, that's a nice trick, the interlace thing. I even used it myself in the past but it didn't look half as good.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: demo effect questions
« Reply #17 on: May 29, 2009 »
Yeah. Nice explanation, Hellfire. K++
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: demo effect questions
« Reply #18 on: May 29, 2009 »
How would you create a plasma cloud?

a tip and not to be a party pooper - spit fire dude, i'd recommend that you start a new topic per effect question next time around matey. that way you'll be able to find answers a bit more easier too.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: demo effect questions
« Reply #19 on: May 30, 2009 »
You could use perlin noise to make a similar looking pattern to the one Hellfire posted there mate.
Shockwave ^ Codigos
Challenge Trophies Won: