return to table of content

Don’t starve, Diablo – Parallax 7

quadcore
11 replies
1d21h

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
4 replies
1d21h

It isn't just a skybox?

quadcore
2 replies
1d20h

The original sky is mostly procedural, I forgot to mention. The newer skies are more traditional skyboxes.

scrollaway
1 replies
1d15h

What's your question, more specifically? Also what do you mean by "the original sky"? Because it was already a skybox in the WoW original 2004 release, even if there were some procedural elements added on top.

quadcore
0 replies
1d3h

Someone in the discussion found an interesting technique from Homeworld 2.

k12sosse
0 replies
1d18h

DayZ got a real nice upgrade to their vanilla skybox this year. Procedural weather also coming. You'd think this is all very simple to do and sure it is, to a pro and outsider, but the arma3 engine is long in the tooth and DayZ had some serious neglect for a couple years. Nice to see development has been reignited into overdrive in its 10th anniversary year.

dantondwa
2 replies
1d20h

Here is a breakdown of a WoW skybox by a Blizzard artist: https://80.lv/articles/how-to-create-skies-for-3d-games/

TLDR. it’s multiple skybox meshes layered

quadcore
0 replies
1d20h

That's for the newer skies, the original is mostly procedural.

keyle
0 replies
1d18h

That was a great article, thanks!

waste_monk
1 replies
1d12h

Unrelated but on the topic of skyboxes, I always thought the backgrounds of Homeworld were really nice... turns out it's just vertex color gradients.

https://simonschreibt.de/gat/homeworld-2-backgrounds/

http://simonschreibt.de/gat/homeworld-2-backgrounds-tech/

quadcore
0 replies
1d8h

Well done, this is something like it. That tesselation is awesome. The result is gorgeous and fast. Really beautiful.

Cant upvote enough.

throwaway7679
0 replies
1d18h

and to a lesser extent the ground of warcraft3 which I think is a clever use of marching squares

Ground textures, cliffs, and ramps are tiles.[1] A heightmap modifies tile corners.[2] Everything else is an individually-placed object.

[1] https://www.hiveworkshop.com/attachments/wc3search-tutorial0...

[2] https://www.hiveworkshop.com/attachments/15-jpg.7734/

delecti
7 replies
1d18h

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.

gambiting
2 replies
1d18h

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.

adamrezich
0 replies
1d18h

I only played it years and years after release at the behest of an obsessed friend, but when I played it, the setting was right there in the options menu

Nition
0 replies
1d17h

The article does not say this, and it was in the game options. You did need the right type of graphics card though.

stevenwoo
1 replies
1d18h

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.

xwolfi
0 replies
1d17h

Ahah

diputsmonro
0 replies
1d17h

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
0 replies
1d18h

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.

TillE
6 replies
1d18h

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
3 replies
1d15h

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.

daxelrod
1 replies
1d13h

Great explanation.

F-Zero managed to do the “change zoom on each scanline” trick without a coprocessor in the cartridge, didn’t it?

jonhohle
0 replies
1d3h

F-Zero was a launch title that didn’t use anything specifically for graphics. It used the same cartridge board as Super Mario World.

Mode-7 scaling can be modified per scanline to get the textured-plane effect seen in many games (e.g. F-Zero), without any additional hardware.

coopierez
0 replies
1d9h

You don't need a co-processor for that. Final Fantasies IV-VI all used the 3D mode 7 effect for the overworld, making the effect more exaggerated when the player enters an airship. It's fairly trivial and inexpensive to use HDMA to adjust the (pre-calculated) parameters for each scanline.

Super Mario Kart needed the co-processor for determining things like how to draw the karts depending on their position and distance from the player. Pilotwings used the same co-processor for similar things (essentially, tracking objects and perspective in 3D space).

elpocko
1 replies
1d18h

A really fixed pipeline.

ethbr1
0 replies
1d17h

Gotta save those transistors somewhere! No chip budget for GPSNES.

kzrdude
4 replies
1d20h

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.

hnthrowaway0328
1 replies
1d20h

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.

bombcar
0 replies
1d15h

It was also nicer on the time-blurry CRTs of the era. The previous frame would still be a ghost of a memory covering a lot of flaws.

chewbacha
0 replies
1d19h

I also found that it was "closer" in and I couldn't see as many of the enemies. For casting, this was an issue.

NohatCoder
0 replies
1d20h

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.

lukas099
3 replies
1d16h

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
1 replies
1d16h

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.

lukas099
0 replies
21h50m

I think I understand what you mean. Thanks!

cubefox
0 replies
1d6h

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.

Dolototo
3 replies
1d20h

Is that usable in D2 remasterd?

stodor89
0 replies
1d11h

It's using Unreal Engine, so just making it 3D is easier.

seattle_spring
0 replies
1d11h

Doesn't D2 remastered render real 3d? Actual 3d would have no use for fake parallax trickery.

adamrezich
0 replies
1d18h

it's been months since I played but if I recall correctly it is

mattcheston
2 replies
1d12h

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.

porbelm
0 replies
1d9h

And before that, vector processing, SIMD etc. was the domain of supercomputers like the Crays of yore :)

MrBuddyCasino
0 replies
1d5h

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.

simonschreibt
1 replies
1d20h

Thanks for sharing my little article :) <3

nicoboo
0 replies
1d6h

Really good and interesting article! Keep going and sharing!

rob74
1 replies
1d9h

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
0 replies
1d2h

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__
1 replies
1d10h

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

marginalia_nu
0 replies
1d7h

Also possible it's a honest to god bug.

twelvechairs
0 replies
1d11h

Weird focus on Diablo 2. The mode focussed on was use by hardly anyone as it looked awkward and broke certain features. Diablo 2 was also released in an era where full 3d was very standard practice (well after half life let alone quake and doom and others). The great graphical coding era of video games was at least 5 years before for me. Things like Commanche Maximum Overkill, Magic Carpet and Descent.

theodric
0 replies
1d20h

Not loading for me, so here's the archive link: https://archive.is/igjBu

phaedrus
0 replies
1d3h

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.

paxys
0 replies
1d18h

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.

jvanderbot
0 replies
1d19h

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
0 replies
1d12h

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

cmplxconjugate
0 replies
1d10h

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/

chadhutchins10
0 replies
1d16h

Now explain it to me like I'm in a cow level.

Waterluvian
0 replies
1d19h

It was a really neat feature but it broke core things like “a poisoned monster is green” so I never used it.

TacticalCoder
0 replies
1d16h

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