← Back to context

Comment by namrog84

6 hours ago

Purely from a vram perspective. A triangle is just 3 vertices and some edges. A few bytes of data.

A similar 2d image of a triangle would likely be thousands of bits of data.

The 2d probably uses a little less per pixel. Whereas the triangle has slightly more expensive compute per pixel cost. But modern gpu have dedicated hardware for that.

3d is probably more expensive compute but cheaper vram usage. At least to a point and a certain set of conditions. Barring things like textures and others.

This is such a wild take, I'm not sure where to start. Let's just consider this:

> Barring things like textures and others.

Other than some really expensive stuff, it's not expensive. Who could have guessed?

  • As a graphics programmer, the most charitable interpretation I have here is that in 2D all the animations are baked into texture atlases. A 3D model would re-use its textures during animation, in 2D it’s a new one.

    But I don’t see Factorio as being a VRAM pig, even with all their animations, which you could certainly improve on from the simplistic “every animation frame is a whole new texture” model.

  • you do not need a different texel for every rendered pixel in every animation frame, which is what you need, and factorio has, with the sprite approach.