But a normal map renders much more cheaply than the equivalent geometry, right? I assume that's why they exist at all. "All that complexity is still there" feels beside the point
Maybe, maybe not. It depends what your constraints are. The normal map probably takes up much more memory than the mesh and the shaders needed to render it are likely more complicated (though they would likely already be included in the engine, and thus no additional cost).
Probably not. You save on vertex transforms, but all the work is put into the pixel shaders, which do a bunch of calculations per fragment. If this is full parallax mapping, it's definitely more total work this way. Whether it's faster in the end depends on where you have CPU/GPU time to spare and what your GPU is good at.
Normal maps are more efficient than finely tessellated geometry on the GPU for a number of reasons:
- GPUs are bad at very fine/small triangles (think like <5 pixels per triangle) as the rasterization pipeline is not designed for triangles that small. It can actually be more efficient to rasterize in software in compute shaders when trying to render tiny triangles. For example, Unreal Engine's Nanite does this. You'd need crazy polygon density to match the visual look of normal maps, let alone parallax mapping.
- To get similar resolution to a normal map in geometry would take much more memory. Normal maps can be naively implemented with a 32 bits-per-pixel texture compared to geometry which will often be minimum 128-bits just for the vertex position, let alone the vertex normal, vertex tangent and texture coordinate. For the same memory footprint you would get less than a quarter of the effective detail using just geometry.
- Higher memory usage from the geometry would also increase the memory bandwidth needed to fetch the vertex attributes which will slow down the vertex transform stage further, beyond just needing to transform more vertices. Using too much memory bandwidth is an easy way to bottleneck yourself, a lot of work in modern renderers goes into finding ways to use less memory just so less data needs to be fetched from memory.
CPU never matters in normal mapping/parallax mapping or other techniques, it's never even in the pipeline for where this stuff is processed. It's all on the GPU. If it was cheaper to throw more geometry at the GPU then that's what would be done as normal maps and similar techniques all have very obvious flaws that finer geometry doesn't.
I think you read too much into what I said. In this example, the two coins, performance difference is going to be negligible. More "work" would be done in the fragment shader, assuming fragments > vertices, but it can do that significantly faster.
If parallax mapping is more expensive than just rendering the equivalent polygons, doesn't that imply that the Spider-Man games are being wasteful with their texture-based building interiors? I thought it was supposed to be an optimization and rendering actual objects would be wasteful. Have I got that wrong?
It's not wasteful because Interior Mapping replaces many objects (which would each have their own vertices and textures) by a single square and texture, so you can have a complex room with many objects at the cost of a single object.
I could also add to that in Spider-Man they're not using parallax mapping for the interiors, it's a different technique that instead creates four quad surfaces inside the pixel shader I'm not sure however if the performance is cheaper or not, I'm a different kind of tech artist