Live data from Hacker News

Finding your home in game graphics programming

alextardif.com

21–30 of 128 posts

Re: Finding your home in game graphics programming

#21

Can we say that modern AAA graphics is way more complex than a single human can handle unless perhaps he started graphics programming many years ago?

Maybe, but AAA as a positive value descriptor is a misnomer.

I've come to realize that AAA gamedev is a way to replace actual artistic taste with "output" that can then be scaled deterministically via the normal corporate software engineering levers we all know and hate.

You can make an absolutely beautiful game as an individual or small team. This game can be 2D or 3D or anywhere in between. You can pass on things that AAA games can't because you can have good taste & artistry and AAA doesn't even try to have those things.

It's just programming & digital art - people mythologize shit like this way too much. Can you replicate a AAA game on your own? No ofc not. But you can make a game as visually stimulating and enjoyable.

So overall..I just ignore any talk that acts like "AAA" is anything of value or meaning besides an org chart turning labor into $60 products.

Re: Finding your home in game graphics programming

#22

Kind of a weird New Years fever dream tangent. Bear with me: Say we have a scene to render and a frame can be rendered in 10ms given the chosen game engine or graphics API or whatnot. There is a hypothetical optimum code for rendering that scene that can do it in less time. And the delta between those times is the price you pay for API abstractions, human abstractions (eg. maintainable code vs clever code), and other…

What you seem to be describing is the maximum theoretical efficiency. It's a common thing in lots of fields, and it's valuable because it gives you a goal you can aim for, and know that you have reached the theoretical limit of performance. As a director of mine once put it, it's important to know when to stop [trying to improve something]. For example, the Carnot cycle gives us a theoretical maximum efficiency of a thermodynamic engine, and the Cramér–Rao bound gives us an upper bound on how much accuracy we can extract from noisy measurements.

I don't know what this would be, or how we could determine this, in the graphics world, but it's still a very valuable and interesting idea.

Re: Finding your home in game graphics programming

#23

Can we say that modern AAA graphics is way more complex than a single human can handle unless perhaps he started graphics programming many years ago?

If you're not imposing the requirement that someone create a AAA game, then No, I definitely know enough artist+devs who can create a high end engine from scratch as well as the art assets.

I can definitely drop into any part of the graphics pipeline from graphics programming, to art creation and AI etc... and have done so on multiple projects.

That said, doing it all by a single individual is a massive undertaking and incredibly unlikely.

That's why it comes down to capability vs execution. It's definitely possible for a single individual to be able to do each part of the process over multiple projects, but unlikely they could do it all on a single one by themselves.

Re: Finding your home in game graphics programming

#24
post #22

Kind of a weird New Years fever dream tangent. Bear with me: Say we have a scene to render and a frame can be rendered in 10ms given the chosen game engine or graphics API or whatnot. There is a hypothetical optimum code for rendering that scene that can do it in less time. And the delta between those times is the price you pay for API abstractions, human abstractions (eg. maintainable code vs clever code), and other…

What you seem to be describing is the maximum theoretical efficiency. It's a common thing in lots of fields, and it's valuable because it gives you a goal you can aim for, and know that you have reached the theoretical limit of performance. As a director of mine once put it, it's important to know when to stop [trying to improve something]. For example, the Carnot cycle gives us a theoretical maximum efficiency of a…

Thanks for the term. That’s helps with searches. :)

Re: Finding your home in game graphics programming

#25

Earlier quoted context omitted.

I learned unity about 5 years ago and got burnt out on it after a few personal projects and a few freelance side gigs I took that used it. But I was not a decent programmer then and I have earned a CS degree in the time since. I actually used 3DS Max and Blender more than Unity but have since been distracted with web development and once I’m settled in my new job I am planning to write a raytracer. Any other recommen…

check out TinyRenderer, a 500 lines cpu renderer with some essential parts similar to OpenGL, such as z-buffer, vertex and pixel shaders, texture mapping, shadows etc, with articles explaining how things work: https://github.com/ssloy/tinyrenderer

Oh this is awesome! Thanks!

Re: Finding your home in game graphics programming

#26

Can we say that modern AAA graphics is way more complex than a single human can handle unless perhaps he started graphics programming many years ago?

Ultimately it's just one elegantly simple equation that defines the entire field and all of the complexity of rendering realistic graphics: https://en.wikipedia.org/wiki/Rendering_equation Unfortunately it is impossible to solve for real-world scenarios so we just keep refining and refining better estimates. :)

Even the rendering equation isn't fully realistic; it doesn't capture wave optics phenomena like, say, grate diffraction.

Re: Finding your home in game graphics programming

#27

Kind of a weird New Years fever dream tangent. Bear with me: Say we have a scene to render and a frame can be rendered in 10ms given the chosen game engine or graphics API or whatnot. There is a hypothetical optimum code for rendering that scene that can do it in less time. And the delta between those times is the price you pay for API abstractions, human abstractions (eg. maintainable code vs clever code), and other…

NVIDIA's internal term for this is "Speed of Light", or "SoL", though that's more focused on theoretical GPU throughput and efficiency.

Most of the time that you see you're locked on CPU, well, rendering is a huge cost, but often times it's gameplay code, it's the sound engine, it's the file I/O system, it's the Lua scripting. Rendering might very well be a very small amount of the CPU frame time, though it's still there too. As a game developer, when I profile a game, I usually don't see the render thread popping up as much. Things I remember:

* Some audio engine code that worked by running an expensive hashmap lookup many, many times a frame (fixed by changing how the hashmap lookup worked, which accidentally broke an older game, then had to add a configure switch to configure between fast and slow)

* AI Pathfinding code that recursively subdivided a bezier spline. Recursion was unfortunately slow on a specific console platform due to a compiler bug (and this was in 2019!). Fixed by changing it to an explicit while loop.

* A wind simulation system that simulated an entire world's worth of wind physics. Game engine was originally built with much smaller levels in mind, but carried forward for 15 years and now the levels were much bigger. Fixed by only simulating what was needed in the shot.

These things are a huge balance, and we fix it by profiling and getting things to run on our minspec hardware. And sometimes we miss.

Re: Finding your home in game graphics programming

#28
post #6

Computer graphics is where I found my love for software, math, and art. Needless to say, the first time I got to code lights in raw GL, my mind was illuminated :) Shameless plug: If you'd like to know how to build a simpler version of THREE.js from scratch in WebGL, you can check out my book: https://www.amazon.com/Real-Time-Graphics-WebGL-interactive-...

When people often say to me "I learned all that maths in school and it was useless", I think to how much of that came in useful when I wrote my first 3D engine in my teens. Suddenly it wasn't so boring any longer.

When I started coding graphics in the early 80s practically every video game was a one-person show - every line of code, every graphic and every sound effect and line of music. By the time I start doing game development as a job in the mid-90s we were up to small teams of about 10 people, and we could all still go out together for a beer after work. Now look at it.. unbelievable how many people are needed for a modern AAA online game. I can't even fathom it.

Re: Finding your home in game graphics programming

#30

Kind of a weird New Years fever dream tangent. Bear with me: Say we have a scene to render and a frame can be rendered in 10ms given the chosen game engine or graphics API or whatnot. There is a hypothetical optimum code for rendering that scene that can do it in less time. And the delta between those times is the price you pay for API abstractions, human abstractions (eg. maintainable code vs clever code), and other…

Gonna take a wild guess, Cities Skylines? I upgraded from a 1600x/GTX1060 system to a 10th-gen-i7/RTX 2080 system and I still can't get higher than 35fps. A city with 3k citizens and a city with 100k citizens may run at 35fps and 32fps respectively. Though I can run it with supersampling at 250% now and my GPU still doesn't bottleneck it (300% supersampling is what finally cracks my fps, jumping from 30 -ish to 5).

It's so weird to me, the game is definitely CPU bound, I would imagine it's almost all because of AI. So I would expect performance to decline linearly as my city grows. But it doesn't. It's frustrating when I'm playing a small town, but also pretty amazing when I'm playing a big metropolis.

Post reply on HN