5 ms·
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" feel
by brundolf 4y ago
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
- ladberg 4y agoMaybe, 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).
- BearOso 4y agoProbably 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.
- deleted 4y ago[deleted]
- chc 4y agoIf 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?
- wildpeaks 4y agoIt'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. Example: https://andrewgotow.com/2018/09/09/interior-mapping-part-2/ https://andrewgotow.com/2018/09/09/interior-mapping-part-2/
- shahar2k 4y agoI 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
- MindSpunk 4y agoNormal 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.
- BearOso 4y agoI 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.
- rasz 4y agogamecube/wii didnt have pixel shaders, all the fancy effects had to be designed around fixed function TEV unit and multitexturing tricks
- ummonk 4y agoI think more accurately a normal map automatically scales with LOD. You only need as many fragment shaders as the pixels occupied on screen.
- account42 4y agoNormal maps don't automatically scale with LOD as all as neither a nearest nor a bilinear filter produce correct results. See e.g. one of Valve's VR rendering presentations: https://media.steampowered.com/apps/valve/2015/Alex_Vlachos_Advanced_VR_Rendering_GDC2015.pdf#page=28 https://media.steampowered.com/apps/valve/2015/Alex_Vlachos_...