The model for coins in Super Mario Odyssey is simpler than in Super Mario Galaxy
twitter.com
twitter.com
In modern games, you often can't really separate the model from the textures the way that you used to. Hell, I have a couple models I render in my game which take their geometry entirely from textures and don't use traditional model vertices to carry their mesh at all. These days you kind of have to consider models and textures to be basically the same thing; just different data sources that get fed into your shader and accessed in different ways, and you can often move data back and forth between them depending on the exact effect you want to get. But I wouldn't call my no-vertex-data models "simpler" than a version which was drawn from a static mesh; all that complexity is still there, it's just being carried in a texture instead of in a vertex buffer object.
It’s not. The full rendering might not be simpler, but the model is simpler.
a vertex shader could change the geometry or emit intermediate vertices from a displacement map, but my understanding is that that also happens via fragment shader tricks!
perhaps you mean the artist's highly detailed mesh used to bake normal maps but those aren't typically shipped out to the user's game engine to save space, it's just an artifact of the artist's production process
That said... how is this news, exactly? Bump/normal mapping was a novel, new fangled technique back in the late 1990's... In its original form, it actually predates programmable GPUs.
The most "pure" way to do a "no mesh" render would probably be to use geometry shaders to emit your geometric primitives. (You do need to give it at least one "starting" primitive to make the draw call, but you're free to entirely ignore that primitive). It'd be trivial to embed some mesh data into a "texture", for example, just by reading vertex xyz positions into the rgb channels of a 1D texture that's `number_of_triangles*3` elements wide, and your geometry shader could walk along that texture and output those vertices and triangles and have them get rendered, without ever accessing a vertex buffer object.
That way you only need point positions in the mesh, and no UV or normals.
However, I think (at least in games: in VFX we go the other way and have many many "primvars" as vertex/point data) most real-time setups for hero objects end up having points and UVs, and then normals are normally done as a texture.
Technically you could distort the UV map if you need variable resolution across a model.
It's a very specialized tool (only about UV maps) but goes in depth. It's so handy, I wouldn't be surprised if Epic buys that company sooner or later.
[0] See the "Quality" section here: https://docs.unrealengine.com/4.27/en-US/BuildingWorlds/Ligh...
I thought octrees solved this?
The normal map probably takes up slightly more memory than all the geometry that is in the more complex model, but the more complex model causes the gpu to render a lot more triangles which is a lot more work. Looking up values in the normal map is something the gpu is very good at.
That sounds more like a displacement map.
I've briefly looked at rendering API, newer ones like Vulkan or WGPU. I got the impression that ultimately there is only data and shaders. Is there any truth to this? Of course, you want your data to be useful to the parallel calculations done by shaders.
Example: https://andrewgotow.com/2018/09/09/interior-mapping-part-2/
- 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.
See e.g. one of Valve's VR rendering presentations: https://media.steampowered.com/apps/valve/2015/Alex_Vlachos_...
Does that pass muster? Are we now free to appreciate how the clever use of normal maps allowed Nintendo’s artists to counterintuitively decrease poly count across generations of Mario titles?
It’s fun anecdata though, that’s for sure.
This is evidenced in the way people seem to consider fragment shaders to be a kind of "illusion" or falsehood.
But of course, a spoiler: it's "illusions" all the way down. This is not a pipe. A value in a normal map is just as "real" as a face in a mesh (that is, not at all, or entirely so, depending on your perspective).
Not to imply people don’t read the articles here. I would never imply that…
This is interesting to consider, as it never occurred to me that anyone would think otherwise.
I wonder if it's generational. Those who grew up with games whose triangle (or quad, in the case of a certain Sega system) budgets were constrained to the point of clearly distinct mesh faces probably have a different mental model from those for whom baked normals and LOD meshes have always been a continuum.
The only reason this made the top of the front page is because this was written in a way that seems intentionally deceptive in order to make you click. I'd argue the author is being a pedant even more, and did it first. Had they used a more honest title, people wouldn't be upset. But then it wouldn't have made the front page.
I hate this trend in journalism that can be summed up as: "I'm going to frame something in a confusing, counterintuitive way, then explain it in a straightforward way, in order to make you think I'm smart and make you think you've learned something really complex." I see everywhere else on the Internet. HN is supposed to filter this out.
Maybe take the rest of the day off? Work through the anger?
This is an insulting and inappropriate response. I'm not going to engage with the rest of your comment if this is how you're going to act.
This is nice by Twitter standards but it's still an ad hominem, I hope this doesn't become common on HN. It never leads to anything interesting and overall makes conversations worse.
When I spent a bit too long on reddit, I started to realize that all threads there degenerate into this, given enough attention. Without moderation, it just feels like a series of dead-end discussions where trying to participate isn’t worth the effort because any nuanced arguments will fly out the window when people get tired of arguments and want to start fighting. I hope this place doesn’t become that.
The whole point of saying that it's "simpler" is for the wow factor of "obviously this is a more complicated, more detailed, game. Isn't it weird that the model for the coin is simpler despite all of that?" It's the sort of thing that would be clickbait if it were in a news article. The point of being "pedantic" is to point out that the clickbaity implication is inaccurate. Of course it's simpler, if the complexity is moved to the other parts of the model.
The left polygons are "truly" a polygon. The right 4 shapes is this "fake" technique of normal-mapping.
https://en.wikipedia.org/wiki/Normal_mapping
In particular: https://en.wikipedia.org/wiki/Normal_mapping#/media/File:Nor...
This png makes it more obvious how to "Bake" a proper mesh into a normal map.
----------
Normal mapping looks pretty good, but its obviously not as good as a proper mesh. Still though, normal-mapping is far, far, far cheaper to calculate. In most cases, normal-mapping is "good enough".
The "hardware stuff" is automatic and hard coded. Modern pipelines added more steps / complications (Geometry shaders, Tesselators, etc. etc.), but the Vertex Shader / Pixel Shader steps have remained key to modern graphics since the early 00s.
-------------
"Vertex Shader" is a program run on every vertex at the start of the pipeline. This is commonly used to implement wind-effects (ex: moving your vertex left-and-right randomly to simulate wind), among other kinds of effects. You literally move the vertex from its original position to a new one, in a fully customizable way.
"Pixel Shader" is a program run on every pixel after the vertexes were figured out (and redundant ones removed). Its one of the last steps as the GPU is calculating the final color of that particular pixel. Normal mapping is just one example of the many kinds of techniques implemented in the Pixel Shading step.
-------------
So "Pixel Shaders" are the kinds of programs that "compute a hologram on a flat surface". And its the job of a video game programmer to write pixel shaders to create the many effects you see in video games.
Similarly, Vertex Shaders are the many kinds of programs (wind and other effects) that move vertices around at the start of the pipeline.
Wikipedia has a little video showing the effect of parallax mapping in action: https://en.wikipedia.org/wiki/Parallax_mapping
Another good example: https://doc.babylonjs.com/features/featuresDeepDive/material...
And there's a decent explanation here: https://learnopengl.com/Advanced-Lighting/Parallax-Mapping
Some game examples: http://wiki.polycount.com/wiki/Parallax_Map
Some nice game examples, specifically with looking into windows: http://simonschreibt.de/gat/windows-ac-row-ininite/
Basically, in terms of levels of realism via maps, the progression goes
1. Bump mapping: the shader reads a heightfield and estimates the gradients to compute an adjustment to the normals. Provides some bumpiness, but tends looks a little flat.
2. Normal mapping: basically a variant of bump mapping -- the shader reads the adjustment to the normals directly from a two- or three-channel texture.
3. Parallax mapping: the shader offsets the lookups in the texture map by a combination of the heightmap height and the view direction. Small bumps will appear to shift correctly as the camera moves around, but the polygon edges and silhouettes usually give the illusion away.
4. Parallax occlusion mapping: like parallax mapping, but done in a loop where the shader steps across the heightfield looking for where a ray going under the surface would intersect that heightfield. Handles much deeper bumps, but polygon edges and silhouettes still tend to be a giveaway.
4. Displacement mapping: the heightfield map (or vector displacement map) gets turned into actual geometry that gets rendered somewhere further on in the pipeline. Pretty much perfect, but very expensive. Ubiquitous in film (feature animation and VFX) rendering.
------
IMO, its important to understand the limitations of pixel shading, because its an important step in the modern graphics pipeline.
It's hard to say without realistic benchmarks on Wii and Switch hardware.
Unarguably it's also more processing power than its predecessor which appeared to be untextured. Far more FLOPs are executed at the fragment level than at the vertex level, and that will vary with how much the model takes up on the screen. But more bang for buck than geometry alone? Can't disagree with that.
Don't disagree with that, just the claim that the model is simpler.
> Depth pass, culling, transforming between coordination systems, all care about the poly count
At a guess a dynamic asset like this would be frustum or occlusion culled by bounding box, which doesn't scale with geometry count. Depth pass happens at draw time. But yes, there would be more vertices to transform. Moving geometric details to shaders is a trade-off between either being fill-rate or vertex bound.
- max area: ~2600 fps
- fan: ~860 fps
So it still holds true.
Though given the framerates I can also guess why they didn’t bother for the Mario circles with like 20 segments.
https://www.nintendoworldreport.com/guide/1786/gamecube-faq-...
Quite often it’s not even a question of the GPU itself but the development pipeline and the tooling used. As well as ofc does the engine itself supports it.
Also at the end of the day your GPU has finite amount of compute resources many of them are shared across various stages of the rendering pipeline even back at the 6th and 7th gen of consoles where fixed function units were far more common.
In fact in many cases even back then if you used more traditional “fixed function pipelines” the driver would still convert things into shaders e.g. hardware T&L even on the Wii was probably done by a vertex shader.
Many teams especially in companies that focus far more on gameplay than visuals opted out for simpler pipelines that have fewer variables to manage.
It’s much easier to manage the frame budget if you only need to care about how many polygons and textures you use, as if the performance is too low you can reduce the complexity of models or number/size of textures.
Shaders and more advanced techniques require far more fine grain optimization especially once you get into deferred or multi pass rendering.
So this isn’t hardware, it’s that the team behind it either didn’t want or didn’t need to leverage the use of normal mapping to achieve their design goals.
Nope, no vertex shaders on the Wii, just a hardware T&L unit with no code upload feature.
Some exec from Nintendo is on record as saying something along the lines that texture mapping looks bad and should be avoided. My conspiracy theory is that it was a conscious decision at Nintendo to limit the ability of its consoles to do stuff with textures. The N64 was even worse, a lot worse: it only had 4kB of texture cache.
It’s still possible EAD Tokyo didn’t put much stock in the technique though, or that their workflow was not set up for that at this point, or that hardware limitations otherwise made rendering coins using normal mapping worse than fully modelling them.
The bumpmapping hardware most wikis mention as "supporting normal mapping" is pretty much irrelevant.
The G400 was generally lackluster at 3d performance, so the feature didn't really get used by games.
(Of course, none of this would be likely to improve FPS in the game, but it's an interesting computational geometry problem nonetheless.)
[1]: https://twitter.com/matiasgoldberg/status/163650418707999539...
Lots of SDF examples in ShaderToy[2], and many introductory videos on YouTube (I specially recommend Inigo Quilez's channel[2] --co-creator of [1]--, and The Art of Code [3])
[1] https://www.shadertoy.com/
[2] https://www.youtube.com/channel/UCdmAhiG8HQDlz8uyekw4ENw
Not sure if this has changed in recent years though.
Which one is most efficient?
As a MEng I’d think the more polygons would be as you’re just rendering simple shapes but more of them. The other simple disc is more power hungry because it requires some special bits on a graphics card or whatever.
Just nitpicking about the confusing use of percentages here.
Question: is there an existing level of detail generation system, preferably open source, which can take a high-detail mesh, vertex normals, and a normal map, and emit a lower level of detail mesh, with vertex normals and a new normal map which looks the same?
(LOD generators tend to be either expensive, like Simplygon, or academic and brittle, blowing up on some meshes.)
For various productions reasons, we want to build the low-poly mesh by hand. Managing topology is key to maintain a good deformation, and you as the artist probably know all the areas that will need more vertex density. As things make their way down the rigging/animation pipeline, automated tools really just don't cut it.
[0] https://help.autodesk.com/view/MAYAUL/2022/ENU/?guid=GUID-B0...
To my despair, the exam turned out to consist of only a single question.
Question: write code to approach a sphere using triangular planes so the model can be used in rendering a scene.
I didn’t get to that specific chapter, so I had no idea.
My answer consisted of a single sentence:
I won’t do that, this is useless, let’s just use the sphere, it’s way more efficient and more detailed.
And I turned it in.
I got an A+.
Especially for geometrically simple shapes like this coin
After using Rhino 3D for a while, meshes feel "dirty"
I know NURBs would be much slower to render but I think it could be a potential future look for games
NB I'm not a game developer or 3D modeller
There's no reason to encode all that curve data if all you care about in the end is a finite set of pixels rendered on the screen.
You can achieve the same level of detail without having to recalculate the surfaces. It's a lot easier for the computer to morph a shape by applying some math function (that's essentially arithmetic) to all the polygon's vertexes.
That said, I've seen some 3d artists work in NURBs, then render out to Polygons.
Loads of interesting quirks of the N64 to do with slow bus.
And modern GPUs are plenty fast enough to do quite a bit of work per pixel, at least until the pixel count gets silly (resolutions of 4K and beyond), hence all the work going into AI upscaling systems.
(But the first coin image is from Super Mario Galaxy, a Wii game, and the Wii had a rather more limited GPU with a fixed-function pipeline rather than fully-programmable shaders)
If you were coming to it from the PS2 (like I was), it was super-freeing and amazing and so much more flexible and powerful than anything you were used to. But if you were coming to it from the Xbox (like many of my co-workers were) it was more like suddenly being handcuffed.
As always, what is the right approach depends. If you want to run the game in a very memory constrained environment (early game consoles), the approach of using polygons might make more sense. But nowadays we have plenty of vram and if the entity is used a lot, 1 texture for 100s of entities makes it a worthwhile tradeoff.
Edit: thank you for the corrections, I'm not heavily into game programming/rendering but am familiar with 3D/animation software, but the internals of rendering is really not my specialty so I appreciate being corrected. Cunningham's Law to the rescue yet again :)
That hasn't been true for many years.
> as you'd use more vram when using textures
For the equivalent amount of detail, not really. Vertices are expensive, normal maps are encoded very compactly.
This is a game from 2007, 16 years ago (and its development would have started in 2005), so that it has not been true for many years is not a useful assertion even if true.
Or worse, it confirms that it used to be an issue, and thus may well have affected a game created “many years ago”.
Now, you are right that this might not matter much if you only consider coins in particular. But everything in a level wants to have additional surface details. The ability to have normal maps everywhere was a huge part of the jump in visual quality a couple of console generations ago.
First, modern GPUs are capable of handling millions of triangles with ease. Games are almost never vertex bound. They are usually pixel bound or bound by locking. In other words, too many or too costly of pixel operations are in use or there is some poor coordination between the CPU and GPU where the CPU gets stuck waiting for the GPU or the GPU is underutilized at certain times and then over burdened other times.
Adding two maps adds two texture fetches and possibly some blending calculations. It's very hard to weigh the comparable impact because different situations have a huge impact on which code gets executed.
For a model with many triangles, the word case scenario is seeing the side of the model with the most faces. This will cause the most triangles to pass the winding test, occlusion tests, frustum tests, etc. This will be relatively the same regardless of how close the coin is to the camera.
For the normal mapped test, the worst case scenario is when the coin fills the view regardless of its orientation. This is because the triangles will then be rasterizied across the entire screen resulting in a coin material calculation and therefore the additional fetches for every pixel of the screen.
Also, when it comes to quality, normal maps have a tendency to break down at views of high angular incidence. This is because though the lighting behaves as expected, it becomes clear that parts of the model aren't sticking up and occluding the coin. This means such maps are a poor solution for things like walls on long hallways where the view is expected to be almost perpendicular to the wall surfaces most of the time.
There is a solution called Parallax Occlusion Mapping. Though it is expensive and I don't see it in a lot of games.
https://en.wikipedia.org/wiki/Parallax_occlusion_mapping
https://www.youtube.com/watch?v=0k5IatsFXHk
You'd have a bad time including all of that in the actual model.
True for the CPU, but quite unfair to the Wii's ArtX GPU, which was substantially faster and more featureful than the ATI r128 in the PB G3.
Or you could reduce the texture complexity to a 2D texture without raytracing if you defined the coin mathematically in the shader. Heck, you could get rid of the texture entirely and just do everything with math in the shader.
3D graphics used to require rigid hardware distinctions between vertices and textures and etc, but in modern pipelines it's pretty much all data and the programmer decides what to do with it.
As someone developing a VR game on the side who does all the models in blender myself, modeling in high res then baking to normal maps is a time consuming pain the the ass.
Essentially, in the lighting calculations, instead of using the real normal from the polygon face, you interpolate it with its neighbors, making it look smooth.