top | item 38697000

Don’t starve, Diablo – Parallax 7

307 points| marginalia_nu | 2 years ago |simonschreibt.de | reply

59 comments

order
[+] quadcore|2 years ago|reply
Ah, it was on my list, now I can cross it, thanks.

If someone knows how the sky of world of warcraft is made (and to a lesser extent the ground of warcraft3 which I think is a clever use of marching squares), please let us know, Ive been wondering for 10+ years. It has an incredible amount of features (day, night, clouds, moon, stars, etc), it's gorgeous, light, updates beautifully every other frame or so and no, it's not rendered-to-texture. Well pretty sure it's not. It's so smooth, you dont see a poly nor a texel. It also runs on a 2002 computer. A marvel of tech-artistery.

[+] dtech|2 years ago|reply
It isn't just a skybox?
[+] cmplxconjugate|2 years ago|reply
I still play D2 thanks to the hard work at the folks running Project Diablo 2[1]. Perspective mode looks absolutely beautiful at 144fps; it's somewhat hard to go back to the 30fps of the original LoD client.

Even now, I still have the memory and nostalgia of walking down the twisting steps from the Pandemonium Fortress and being blown away by the beautiful (macabre is maybe more fitting) graphics.

[1] https://www.projectdiablo2.com/

[+] TillE|2 years ago|reply
> This looks 3D but it’s not! It is SNES tech and is called “Mode 7“. To render it, Nintendo manipulated textures (trading height for depth) with some coder magic.

Mode 7 essentially is a primitive 3D accelerator, it renders a single textured plane with various transforms. I think in principle it's just as "real 3D" as a modern GPU, it's just very very limited and less accurate.

[+] RedNifre|2 years ago|reply
No, it's not: Mode 7 can only zoom, translate and rotate the layer in 2D. For example, the Bowser fight in Super Mario World is a typical use of mode 7: Bowser moves around, sometimes rotates and between rounds flies around in "3D" by zooming in and out.

The cool 3D hack comes from co-processors in the cartridge: Games like Super Mario Kart use extra chips than can quickly compute new mode 7 parameters per scanline: If you change the zoom and translation of mode 7 on every line (but keep the rotation the same), you can get the typical tilted 3D look by having the upper lines zoomed out (smaller) and the lower lines zoomed in more (bigger).

This "change the zoom on each scanline" trick is very different from what modern GPUs do and not an arbitrary transform, e.g. with the scanline trick you can only rotate the plane around the horizontal axis, but not around the vertical one.

[+] elpocko|2 years ago|reply
A really fixed pipeline.
[+] simonschreibt|2 years ago|reply
Thanks for sharing my little article :) <3
[+] nicoboo|2 years ago|reply
Really good and interesting article! Keep going and sharing!
[+] mattcheston|2 years ago|reply
OG computer graphics are always amazing to me. I'm convinced software and hardware both would be entire generations behind where it is without the contributions made for early animation and computer graphics.

Look at NVIDIA. They pretty much just lucked out that the same architectures would be useful for machine learning and "artificial intelligence" in it's initial iteration, but the entire company was founded on computer graphics.

[+] MrBuddyCasino|2 years ago|reply
This is not quite right. They did not see AI coming, but Nvidia invested in „compute“ very early on. The current market value is a result of two decades of continually pursuing that vision and executing competently.
[+] porbelm|2 years ago|reply
And before that, vector processing, SIMD etc. was the domain of supercomputers like the Crays of yore :)
[+] jvanderbot|2 years ago|reply
One bit: > However, I don’t know why the lower edge of the sprite is bent that way. For the perspective it wouldn’t be necessary (below is a 3Ds Max scene to show that the horizontal lines are straight if the camera isn’t rotated around its front axis):

I think (think!) this is necessary to simulate a vanishing point "below" the ground for vertically-oriented sprites. If the three pikes rotate out at the top, the bottom has to rotate a bit with it. A skew transform wouldn't look right.

The 3dmax scene didn't show much of it b/c it was straight-on with the viewport and with square textures a skew looks ok.

In the moving example, the three stakes would indeed spread out w.r.t. the eye position in real-ish life as you got closer. The 3dmax render does not illustrate this well.

[+] dexwiz|2 years ago|reply
This article focuses on parallax in games, but parallax has a long history in animation.

Multiplane cameras from Disney and their predecessors are almost 100 years old. You can do a lot of trickery with 2d images to construct scenes with depth.

https://en.wikipedia.org/wiki/Multiplane_camera

[+] kzrdude|2 years ago|reply
It sounds like the dev was very satisfied with parallax, but I don't recall ever using it. I think it just felt weird after already getting used to the default.
[+] NohatCoder|2 years ago|reply
It also degrades the visual quality of the sprites by not rendering them in 1 to 1 scale. From a modern standpoint where a bit of 3D does not have a wow factor I think it actually looks worse.
[+] chewbacha|2 years ago|reply
I also found that it was "closer" in and I couldn't see as many of the enemies. For casting, this was an issue.
[+] hnthrowaway0328|2 years ago|reply
It did give a sense of 3D back then when the character is moving fast with a lot of obstruction objects (walls and trees) passing by. Some rendering also gave better lightning effects AFAIR.
[+] lukas099|2 years ago|reply
This talks about these old games having "not real" 3d, but modern 3d games are on a flat screen too. So aren't they fundamentally "not real" 3d in the same qualitative way?
[+] dexwiz|2 years ago|reply
Not really. Modern 3D games have an arbitrarily placed camera and use linear algebra to flatten everything from 3d into 2d clip space and then rasterize. Games like D2 use sprites and offsets to give the illusion of 3d, they don’t have a 3d coordinate system to begin with. In games like this movement is usually constrained to 2 axes.

Also a key different is pre-rendered sprites. In games like Roller Coaster Tycoon or Diablo, models were made on expensive dedicated computers and then rendered into sprite sheets. Objects may look 3d but were usually shipped as flat assets. Some modern pixel art games will do stuff like ship a normal map with the sprite so you can do dynamic lightning on a 2d sprite.

Modern games that use parallax could easily be just rendering flat objects in 3d scenes, but 20 years ago graphics pipelines were way different so you had to be clever if you wanted 3d effects.

[+] cubefox|2 years ago|reply
Indeed. The article claims that flat 3D planes implemented using mode 7 are merely "fake 3D". But the result looks exactly like a single texture mapped polygon, except that the "camera" only allows changes in yaw and pitch, not in roll. But that's just a limitation of the 3D situations the mode 7 system can render, it doesn't say that what it _can_ render is more fake somehow. In the end, every 3D rendering approach manipulates just a 2D pixel grid on a screen to create the illusion of looking at virtual objects.
[+] Waterluvian|2 years ago|reply
It was a really neat feature but it broke core things like “a poisoned monster is green” so I never used it.
[+] rob74|2 years ago|reply
I can't help but wonder if a feature like the Diablo 2 perspective mode would have a chance of being implemented today in a AAA game? A lot of effort for a feature that didn't actually add anything to the gameplay and only worked for users that (a) had a supported 3D card and (b) found the option in the menu and enabled it? Not very likely...
[+] kingnothing|2 years ago|reply
Raytracing is the most relevant thing I can think of off the top of my head. It fits the rest of your description. For that matter, though, I don't know what a lot of the graphical options are in games these days or if they really add anything. Back in the day it was easy to choose your resolution, texture resolution, and level of AA. Now the menus have 40 options, often with no descriptions.
[+] k__|2 years ago|reply
"I don’t know why the lower edge of the sprite is bent that way"

Maybe a designer said, it looks better.

Joke aside, I throw in one-off/random code into my games here and there. Feels bad from an engineering point of view, but sometimes the games just need this to feel better, Idk.

[+] phaedrus|2 years ago|reply
The article is glaringly wrong on one point: Diablo 2 is not 2D; it's natively 3D! The entire (visible) playfield is a triangle mesh. Interestingly as you walk in the game you don't move in relation to the mesh. The textures and vertex heights are modified according to what part of the ground is under the fixed mesh, like dragging a large sheet of clear plastic over a landscape.
[+] TacticalCoder|2 years ago|reply
Not only did I play Diablo 2 (TFA is about Diablo 2, not about Diablo) a huge lot but... One of my most prized possession is an original arcade PCB of Moon Patrol from 1982. It's crazy: it's got 3 layers (2 full size PCBs and then one half size) and it's definitely my bulkiest PCB [1]! Still works, too!

So I did enjoy TFA a lot.

[1] https://commons.wikimedia.org/wiki/File:Moon_patrol_original...

[+] delecti|2 years ago|reply
Was this a normal option that could be enabled? I played countless hours and I don't remember it at all. The article mentions Perspective Mode like it was something that could trivially be turned on.
[+] stevenwoo|2 years ago|reply
IIRC it was added pretty late in development, I remember it because my only involvement was adding the UI menu option to allow users to turn it on/off.
[+] diputsmonro|2 years ago|reply
I remember it sometimes being in the options menu and sometimes not (and sometimes showing up but disabled). Maybe there were a different combination of versions or graphics cards that produced those different results. Perhaps earlier versions hid the option if your graphics card didn't support it, and later versions showed it but grayed it out.
[+] cityofdelusion|2 years ago|reply
Yes, perspective mode existed. I believe it needed to be running on glide which needed certain graphics cards at the time. Glide also enabled dynamic lighting.
[+] gambiting|2 years ago|reply
The article clearly says the mode exists in the game but it wasn't exposed through options and it's not mentioned in any official documentation.
[+] Dolototo|2 years ago|reply
Is that usable in D2 remasterd?
[+] seattle_spring|2 years ago|reply
Doesn't D2 remastered render real 3d? Actual 3d would have no use for fake parallax trickery.
[+] stodor89|2 years ago|reply
It's using Unreal Engine, so just making it 3D is easier.
[+] adamrezich|2 years ago|reply
it's been months since I played but if I recall correctly it is
[+] paxys|2 years ago|reply
It's funny that the author understands all the math and engineering behind this feature at such a deep level and then ends with "All this is alien technology!" We really have a tendency to sell ourselves short.