nesdev.com
http://forums.nesdev.com/

List of techniques to fake 3D graphics with 2D hardware
http://forums.nesdev.com/viewtopic.php?f=21&t=15340
Page 1 of 2

Author:  Bregalad [ Thu Jan 05, 2017 4:38 am ]
Post subject:  List of techniques to fake 3D graphics with 2D hardware

So many games comes with various tricks to do 3D effects on 2D hardware that I don't know whether the amount of tricks possible is finite or infinite. Could such an exhaustive list be made ? Or is the number of technique just too long for that to be possible ?

Pre-rendering something that looks 3D is a special case so it would be just once part of the list.

Author:  lazerbeat [ Thu Jan 05, 2017 5:24 am ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

It isn't an answer to your question but there are two examples of 3d effects in the High hopes Demo which I think are really good (I am sure everyone knows them already!). The first is the rotating rectangular cube. I have no idea at all how this is done.

https://youtu.be/eQ-OcS2Gwvk?t=56

The other one I like a lot is the blitter object towards the end.

https://youtu.be/eQ-OcS2Gwvk?t=105

Which I kind of vaguely am trying to replicate in a super simple way but haven't got very far yet.

Author:  tepples [ Thu Jan 05, 2017 9:19 am ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

The rotating cube at 0:56 is a mix of the vertical stretching used in Rad Racer and the CHR ROM-based texture mapping used in Cosmic Epsilon: each texture is stored at each width, and then for each scanline, timed code changes the Y scroll position to bring the appropriate row of the texture into view. This vertical stretching works on an NES but would have to be done all in software on a Master System.

The rotating dots at 1:45 are just a 3D transformation applied to each vertex. A couple tricks are possible: using orthographic projection so as not to have to divide by Z, and interpolation of frames so as not to need to perform the full transformation on all points each frame.

The Kefrens ribbons at 2:15 are two adjacent columns of the nametable rewritten during hblank, then a scroll change to reset the scroll to the top of the screen.

Author:  Myask [ Thu Jan 05, 2017 2:29 pm ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

tepples wrote:
The rotating dots at 1:45 are just a 3D transformation applied to each vertex. A couple tricks are possible: using orthographic projection so as not to have to divide by Z, and interpolation of frames so as not to need to perform the full transformation on all points each frame.

…but rendered how? Sprites seem like there would be too many for some rotations ("seem"), and there's too much text for IT to be sprites.

But, the bright text also makes it easier for sprites to be seamlessly dropped when that situation would arise…

Author:  tepples [ Thu Jan 05, 2017 2:42 pm ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

I imagine the frontmost ones are drawn larger so that you'll not notice dropout of the rearmost ones. Plus as they rotate, few are horizontally aligned.

Author:  mkwong98 [ Fri Jan 06, 2017 7:10 pm ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

All I can think of is parallax scrolling: https://youtu.be/ltuRuGM271Q
And 3D effect in games such as 3D World Runner and Space Harrier. Is there a name for it?

Author:  Dwedit [ Sat Jan 07, 2017 11:53 am ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

I don't know if there's a name for the specific 3D effect in WorldRunner...
There is per-scanline scaled graphics for perspective, and horizontal scrolling per scanline is used to make the perspective and parallax work correctly.
The same effect is also used by Street Fighter II and Toy Story, though on just a single plane in the front background.

Author:  tepples [ Sat Jan 07, 2017 12:09 pm ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

"Pole Position effect"?

Author:  tokumaru [ Sat Jan 07, 2017 12:18 pm ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

Raycasting is another technique.

The problem with creating a list of techniques is that many of them don't even have names, or are not implemented consistently across different games.

Author:  Myask [ Sat Jan 07, 2017 2:26 pm ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

I'd argue raycasting is kinda right at the end of 'fake' and the beginning of 'implement'.

Author:  tokumaru [ Sat Jan 07, 2017 3:04 pm ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

I guess... Even though it's a bunch of tricks, the trig used does create a limited but mostly correct representation of the 3D space. Objects in raycasters are usually pretty fake though.

Author:  rainwarrior [ Sat Jan 07, 2017 3:47 pm ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

tokumaru wrote:
The problem with creating a list of techniques is that many of them don't even have names, or are not implemented consistently across different games.

The thread that was started just a little bit before this one made a pretty nice "visual" list, at least for the NES:
https://forums.nesdev.com/viewtopic.php?f=21&t=15338


Outside the NES...

Systems that can do lots of sprite coverage, and especially ones with sprite scaling (e.g. Sega's series of games like Afterburner, Space Harrier, etc.) can do quite a lot of 3D positioning of sprites. Like, that's basically the same as "real" 3D stuff except your drawing primitive is a sprite at a point, instead of rasterized triangles. (Point sprites are also a type of primitive on modern 3D hardware, BTW, mostly used for particle explosions and stuff.)

You could probably make a big category just for SNES techniques owing to Mode 7 or other stuff that's specific to it. It had pretty good sprite coverage too, so it could do some of the point sprite 3D techniques.


There's also a bunch of demoscene stuff. Rubber-cube via raster effects, copper bars, infinite bobs, etc. but a lot of these are of pretty limited/specific application.

Author:  Myask [ Sat Jan 07, 2017 4:28 pm ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

Reminds me that the bar for '3d' was an oft-moving set of goalposts, at least on PC (consider Catacombs3D ~ Wolf3D < D°°M ≤ Duke3D < Quake/Descent)

Going behind stuff [>1 play layer] (Super Mario Bros. 3)
Parallax scrolling (too many to note, see topic)
raster effects, (pre?)scaled-sprites (Pole Position, Rad Racer)

Isometric and cavalier projections (Solstice, Snake Rattle 'n' Roll, Ultima VII) [much easier to do when you design levels where you cannot go behind terrain, or have loads of overdraw to play with]
Pre-rendered stuff that was CGI (DKC) or motion-captured (Mortal Kombat)
--or just pre-rendered, [u]animated[/i] scenes (Myst)
2d gameplay with rendered BG elements that got to act on Z-axis "2.5d" (Mischief Makers, Kirby 64, Tomba…and some bits of Yoshi's Island)
Pre-drawn rotations, scalings (Wing Commander)
…plus Mode 7 (Super Mario Kart)
…plus raycasting for terrain (Catacombs 3D, Wolf3D)
Rendered polygons mixed with sprites (Tomba…and some bits of Yoshi's Island)
Doom engine
==3d goalpost-moving stopped here, usually==
rendered wireframes, no polygons (Red Alarm)
Rendered polygons (Star Fox, Vortex, Stunt Race FX)
Texture-mapping
various light-shading methods
Dynamic lighting
etc.

Mono-stereo-surround sound shouldn't be entirely discounted either, and there are/were a fair few entries trying to bridge stereo and surround.

Author:  ccovell [ Sat Jan 07, 2017 6:32 pm ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

rainwarrior wrote:
There's also a bunch of demoscene stuff. Rubber-cube via raster effects


Rubber cube is not just simple raster-scrolling, but showing several previous frames of the rotating cube at different scanlines.

Author:  tepples [ Sat Jan 07, 2017 9:30 pm ]
Post subject:  Re: List of techniques to fake 3D graphics with 2D hardware

tokumaru wrote:
Objects in raycasters are usually pretty fake though.

But no more so than the coins and trees in Super Mario 64. A raycaster like Id Tech 0 in Wolfenstein 3D produces a 1-pixel-tall Z buffer, against which scaled sprites near each ray are rendered back to front. A portal caster like Build in Duke Nukem 3D works similarly, drawing sprites that are in or near each rendered room.

Where does stereoscopy (red-blue anaglyph, alternate frame, polarized) fit into the ranking of goalposts?

Page 1 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/