Live data from Hacker News

Finding your home in game graphics programming

alextardif.com

81–90 of 128 posts

Re: Finding your home in game graphics programming

#81
post #17

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?

No, but it is a full time job. It's getting much more complicated. Here's an hour long talk on how Unreal Engine 5's Nanite works.[1] This is a huge breakthrough in level of detail theory. Things that used to be O(N) are now O(1). With enough pre-computation, rendering cost does not go up with scene size. See this demo.[2] You can download the demo for Xbox X/S and PlayStation 5, and soon, in source form for PCs. Exp…

The closest thing to the metaverse in the form of open worlds are flight simulators right now. They have an enormous amount of content to model the entire planet already. A lot of that content is generated rather than designed. MS obviously did a nice job with this and e.g. X-plane and Flightgear have pretty detailed worlds as well. Most of these worlds are generated from various data sources (satellite imagery, altitude data, open street maps, etc. MS does the same but adds machine learning to that mix to generate plausible looking buildings and objects from the massive amount of data they have access to.

Fusing that with what Epic is doing is basically going to enable even more detailed gaming worlds where a lot of the content is generated rather than designed. Flight simulator scenery is bottle necked on the enormous amount of triangles needed to model the entire world. Storing them is not the issue. But rendering them is. Removing that limitation will allow much higher level of details. X-plane is actually pretty good at generating e.g. roads, rails, and buildings from open street map data but the polygon counts are kept low to keep performance up. Check out e.g. simheaven.com for some examples of what x-plane can do with open data. Not as good as what MS has delivered but not that far off either. And they actually provide some open data as well, which simheaven recently integrated for x-plane.

Flightgear actually pioneered the notion of streaming scenery content on demand rather than pre-installing it manually. X-plane does not have this and MS has now shifted to doing both installable scenery and downloading higher resolution stuff on demand while you are flying.

Once you hit a certain size, pre-installing all the content is no longer feasible or even needed. Once these worlds become so large that exploring all of it would take a life time (or more), it's more optimal to only deliver those bits that you actually need, when you need them. And doing that in real time means that even caching that locally becomes optional. And even the rendering process itself does not have to be local. E.g. NVidia and a few others have been providing streaming games with cloud based rendering. That makes a lot more sense once you hit a few peta/exa bytes of scenery data.

Another interesting thing is generating photo realistic scenery from simple sketches with machine learning trained on massive amounts of images. This too is becoming a thing and is going to be much more efficient than manually crafting detailed models in excruciating amounts of detail. MS did this with flight simulator. Others will follow.

Interesting times.

Re: Finding your home in game graphics programming

#82

What should I do if I want to draw 2D lines? I just want to draw nice looking, efficient 2D lines. I am aware there are many high level engines and libraries that let you draw lines, but I have tried them all over many years and they are all bad. This is a serious plea - please help.

On Windows, the best way is often Direct2D https://docs.microsoft.com/en-us/windows/win32/direct2d/dire... On Linux, you have to do that yourself. The best approach depends on requirements and target hardware. The simplest case is when your lines are straight segments or polylines of them, you have decent GPU, and you don’t have weird requirements about line caps and joins. In that case, simply render a quad per segm…

Thank you!

Re: Finding your home in game graphics programming

#83
post #75

What should I do if I want to draw 2D lines? I just want to draw nice looking, efficient 2D lines. I am aware there are many high level engines and libraries that let you draw lines, but I have tried them all over many years and they are all bad. This is a serious plea - please help.

Check out my free open source book "A bitmappers companion" its a reference book about 2d graphics algorithms with code examples in Rust. https://github.com/epilys/bitmappers-companion

Thanks!

Re: Finding your home in game graphics programming

#84

I've heard that the salary for game programmers is pretty low compared to other fields. Is this also true for graphics programmers in general? E.g. jobs in AR/VR.

I am a former game dev who worked for one of the top AAA game studios in the world in a lead programmer role. At my first FAANG job, my compensation was like 2x higher than game dev. Now it’s many times higher still but admittedly I have been out of gaming for 15 years and have a senior leadership role. I generally do think that for a given talent/experience level the rest of the industry pays much more with way better work-life balance, it’s a combination of supply/demand and business model (at least for AAA) vs SaaS. You can strike it big in games if you are lucky (e.g. create Minecraft) but it’s much easier to do that at a startup or big tech.

Re: Finding your home in game graphics programming

#85

What should I do if I want to draw 2D lines? I just want to draw nice looking, efficient 2D lines. I am aware there are many high level engines and libraries that let you draw lines, but I have tried them all over many years and they are all bad. This is a serious plea - please help.

Have you tried SDL2? I’ve used it in the past for 2d stuff and didn’t have any problems with it.

Re: Finding your home in game graphics programming

#86
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 gam…

Absolutely! When you take into account just the artistic aspects (e.g. modeling, texturing, rigging, etc. with professionals specializing just in particular aspects like facial structures, etc.), it really is quite remarkable.

I imagine we'll get more efficiency as procedural and generative techniques become more powerful: characters, worlds, mechanics, etc. are all programmatically generated with little-to-no intervention.

Re: Finding your home in game graphics programming

#87
Could someone suggest a good book/article(s) about 3d software rendering from scratch. I want to use just plain WIN API or SDL to make let's say a 3d rendered cube. Is "Computer Graphics: Principles and Practice" 2nd edition is all that I need or do you recommend other books?

Re: Finding your home in game graphics programming

#88

Thanks for sharing! As someone who's not familiar with graphics programming, i would say recommending to start with DirectX is probably the wrong choice: it looks just as complicated as other solutions, but will lock you into the Windows ecosystem. In contrast, OpenGL/Vulkan are widely ported. Same story with the undecided recommendation for Unreal/Unity/Godot: only Godot in those three is free-software, and has an a…

All my work with game graphics is basically software rendering, but I have it on good authority from actual game developers that DX11 specifically is actually a pretty darned good API that is a pretty good match to how current GPUs actually work. Not to mention that it has pretty good tooling for debugging. Metal is also supposedly pretty good.

Re: Finding your home in game graphics programming

#89
post #58
post #50

Earlier quoted context omitted.

Well, some people think failure is the best teacher. As an example the first generation of german rocket engineers whose work culminated in Saturn V and thus enabling the first moon landings basically started from scratch.

So your advice is to just suck it up and accept that interested people need to spend billions and study for decades on the issue, because learning from previously successful endeavors is a worse teacher. Right. It's fine to just half-ass it if the interest is only superficial or for a hobby. Otherwise it might create a very unrealistic expectation in the student, because the gained knowledge by doing it like that is…

Learn from the past but don't take it as gospel because people probably worked with different constraints and assumptions that might be completely different today.

Re: Finding your home in game graphics programming

#90
>The more I wrote, the more I understood the issue was more complex than that

This is why discussion of a topic and the ability to elucidate them in speech or writing is important. It is easier to examine them in an orderly format. I often model conversations in my head about my opinions (about work, things with my home life, just in general).

As a side note: Strong ordering of ideas is something that can be developed naturally, but it is also a skill learned through willing engagement with oft-maligned academic topics like humanities (liberal arts) courses. This is especially true of learning ordered writing. I often see devs who fulfill requests precisely, literally as they are requested, and then bemoan how it doesn't even make sense. Then I see devs who demand detailed conversations to pick apart each word of a request so they don't just provide what was asked for, but also what was needed. ( Sometimes to the frustration of the requestor for whom their needs seem obvious since they live every day with the area of work)

I'm not claiming humanities are some sort of magic bullet on this, only that they can be a convenient path to skills that are actually useful, albeit subtly hidden by a surface level course title that fills a 3-credit literature requirement. And yes, some people don't need it. But colleges (in the US, my area of familiarity) do have a mechanism of getting out of a lot of them if you don't need it: Take AP exams the demonstrate you already have those skills and get requirements waived.

You may wonder, since most have had such courses forced on them, how I could correct. Well-- 1) I make no claim that it always works. And 2) Look above for my caveat of willing engagement. Blowing them off as useless won't get you much out of them.

If I had to make a recommendation, I'd direct comp sci majors to fill as many of those courses as possible in philosophy courses, which is an area defined by the requirement for ordered thinking and dissection of meaning on a very granular level. For literature requirements I'd recommend Shakespeare which also often focuses around dissecting multiple levels of meaning from the text. (If you have taken a Shakespeare course and don't know the multiple meanings of "3-legged stool" then you didn't read carefully.) For history, choose courses that focus on the enlightenment and renaissance time periods.

Post reply on HN