List of techniques to fake 3D graphics with 2D hardware

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

User avatar
Bregalad
Posts: 7766
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

List of techniques to fake 3D graphics with 2D hardware

Post by Bregalad » Thu Jan 05, 2017 4:38 am

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.

lazerbeat
Posts: 64
Joined: Tue Jul 09, 2013 7:13 am

Re: List of techniques to fake 3D graphics with 2D hardware

Post by lazerbeat » Thu Jan 05, 2017 5:24 am

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.

tepples
Posts: 21748
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: List of techniques to fake 3D graphics with 2D hardware

Post by tepples » Thu Jan 05, 2017 9:19 am

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.

User avatar
Myask
Posts: 965
Joined: Sat Jul 12, 2014 3:04 pm

Re: List of techniques to fake 3D graphics with 2D hardware

Post by Myask » Thu Jan 05, 2017 2:29 pm

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…

tepples
Posts: 21748
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: List of techniques to fake 3D graphics with 2D hardware

Post by tepples » Thu Jan 05, 2017 2:42 pm

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.

mkwong98
Posts: 221
Joined: Mon May 30, 2011 9:01 pm

Re: List of techniques to fake 3D graphics with 2D hardware

Post by mkwong98 » Fri Jan 06, 2017 7:10 pm

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?

User avatar
Dwedit
Posts: 4236
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: List of techniques to fake 3D graphics with 2D hardware

Post by Dwedit » Sat Jan 07, 2017 11:53 am

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.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

tepples
Posts: 21748
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: List of techniques to fake 3D graphics with 2D hardware

Post by tepples » Sat Jan 07, 2017 12:09 pm

"Pole Position effect"?

User avatar
tokumaru
Posts: 11465
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: List of techniques to fake 3D graphics with 2D hardware

Post by tokumaru » Sat Jan 07, 2017 12:18 pm

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.

User avatar
Myask
Posts: 965
Joined: Sat Jul 12, 2014 3:04 pm

Re: List of techniques to fake 3D graphics with 2D hardware

Post by Myask » Sat Jan 07, 2017 2:26 pm

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

User avatar
tokumaru
Posts: 11465
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: List of techniques to fake 3D graphics with 2D hardware

Post by tokumaru » Sat Jan 07, 2017 3:04 pm

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.

User avatar
rainwarrior
Posts: 7669
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: List of techniques to fake 3D graphics with 2D hardware

Post by rainwarrior » Sat Jan 07, 2017 3:47 pm

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.

User avatar
Myask
Posts: 965
Joined: Sat Jul 12, 2014 3:04 pm

Re: List of techniques to fake 3D graphics with 2D hardware

Post by Myask » Sat Jan 07, 2017 4:28 pm

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, 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.

ccovell
Posts: 1006
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Re: List of techniques to fake 3D graphics with 2D hardware

Post by ccovell » Sat Jan 07, 2017 6:32 pm

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.

tepples
Posts: 21748
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: List of techniques to fake 3D graphics with 2D hardware

Post by tepples » Sat Jan 07, 2017 9:30 pm

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?

Post Reply