• Forum
  • Lounge
  • How do certain software and games implem

 
How do certain software and games implement realistic graphics?

How do games and game engines (especially engines like Unreal Engine) and certain softwares (such as Photoshop, Maya, 3D Studio Max) implement high level or realistic graphics? I've noticed that most of these game engines, games and software are written mostly in C++. So is C++ the only language that is capable of creating these realistic graphics? I honestly don't know the whole process behind how these developers create such high level graphics. Is it possible in any other language, say C# or Python?
It is possible in any language, but it is a lot of work no matter what language you choose.

People who design graphics for video games work closely with the game programmers to design the graphics to look real. Most of it is straight up visual trickery, and a lot of it is some pretty advanced programming.

Designing the graphics takes about as much time as designing the game itself. And requires a lot of specialized knowledge.

If you want to get started, you can download a lot of 3D software for free trial periods. Some, like Blender 3D, are free by default. You can also download 3D programming stuff, like OpenGL, which is designed for 3D graphics programming.

The next thing is to start following tutorials to begin learning stuff.

Beware: there be dragons caveats!

  • At some point you can expect to fork out some serious cash.

  • It is a really steep learning curve, so this isn’t something you are going to pick up in a month or two. If you are serious, it is worth your time to sign up for some University courses to learn this stuff.

People in the industry have often taken four or five years of it, not to mention all the time they spend at home dinking with it.


Now, don’t let any of this put you off. If you are willing to put some effort into it, you can begin making simple 3D video games almost right away.

Hope this helps and Good luck!
Last edited on
It is possible in any language, but it is a lot of work

It is possible in languages which offer display of graphics and fast change of it, fast enough to make it look move, not just changing pictures in a slide presentation. It may be quite some work depending what you want to dislay. As far as i know, dynamic games use a "physics engine", so virtual objects "move" depending on their physical properties, including ray tracing on glossy surface and shadow. Just not to distract the players impression.

For less dynamic applications it may be sufficient to use a nice photo as faceplate. Have a look at this example:
www.stehlin.net/hpclub/Aristo/4-banger.zip
and see how the keys budge few pixels to give the impression of a pressed key. The off-switch is special, move the mouse pointer to it, press and hold the left mouse button, the slider moves to the left and the display goes dark. Only when releasing the mouse button the application will end. For sure only a minor detail, but it makes it look realistic. Less realistic are the splecial effect for overflow and for division by zero, it's for fun.

Such a photo-realistic surface is a bit more work than simply using the standard dialog elements, but worth it. Alas, it is also a promise, to be as accurate as the role model.
@MikeStgt
I don’t think OP is talking about the UI.
Landing a man on the moon started with figments and inventions in the stone age.
IMO a moving button in a simple UI serves the same goal than spatter in an adventure game: illusion. A game's display is its UI. With the hope, the OP may imagine the big picture by the wee move of a button.
I’m not sure I understand your dismissive tone. You are making seriously overrated generalizations.

If going to the moon were stone age figments, early Homo would have been on the moon. The reality is that it took thousands of very intelligent men hundreds of thousands of man-hours of doing really, really technical stuff with bleeding-edge technology to make those missions work. Even today what they did is a marvel of engineering. If we were to try to replicate it the costs would be astronomical.

But neither the moon nor NASA have nothing to do with this.

You ought to consider the expertise of those who work on games and know something about the technical detail behind them and their graphics. I’ve been screwing around with this stuff for years, and I am by no means an expert in even a tiny portion of all there is to it behind the scenes.

A game’s display is not a single object; nor does it represent the UI. (It represents your view, over which UI is layered.)

And sticking a 2D button graphic over an image and responding to window mouse events is a totally different dumpster of beans than rendering a realistic 3D environment and moving 3D objects around it.

If all illusions were as easy as painting a Doom-splatter bitmap on the screen, then everyone would be master magicians. The reality is that convincing illusions take a whole lot of very specialized work and a whole lot of computing power. We use the illusions and tricks because otherwise rendering every frame of the game would take hours, if not days.
I’m not sure I understand your dismissive tone.
Not sure? Complaining my "dismissive tone" looks as if you regard reasoning about my dissimilar viewpoint as aggressive. This was for sure not my intention.
The OP asked,
Is it possible in any other language, say C# or Python?
and you answered
It is possible in any language
it could be some kind of generalization. There exist Turing-complete programming languages with no graphing ability.
@MikeStgt
Okay, so I understand you did not intend to garner ire. That’s fine. Nor do I.

it could be some kind of generalization. There exist Turing-complete programming languages with no graphing ability.
I hate strawman crap. Please don’t.


Complaining my "dismissive tone" looks as if you regard reasoning about my dissimilar viewpoint as aggressive.
So, let me explain my problem here.

Let us imagine someone we all have met: the mechanic. This is the guy who loves messing with motors, and actually has a big engine block in his ground-floor bedroom that he can tinker with every day when he isn’t at work fixing someone’s Mercedes. His friends regularly get speeding tickets after getting their engines back from him.

This is the guy who can walk by when you start your car, and tell you that you have a vacuum leak in the back of your engine (throttle body gasket, he says), when you can’t even hear the hissing.

Let us now imagine that I drive my car to the local Pep Boys and ask for a rear main gasket to fix an air leak I found. I watch the Pep Boys dude’s left eyebrow go up as he steels himself to ask me for more information, because it is clear to him that I have absolutely no idea what I am talking about.

This happens to people who have expertise in things all the time.

Police officers regularly listen to people tell them all kinds of stuff about how people react, legal requirements, weapon use, etc. If a police officer is rolling his eyebrows at you, it is because (1) he has heard it before, and (2) he is too polite to tell you you’re a moron.

Doctors regularly see people who tell them the most inane stuff about basic health sciences. No, two injections of tuberculosis vaccine will not cure your type 1 diabetes.

The people who come to your home to fix your dishwasher have to try really hard not to say you are a total idiot for throwing a half-eaten meatloaf into the machine, because the guy at the store said you could, or you saw someone do it on a commercial.


See, the point is that when you have expertise in something, anything, it is pretty darn obvious when someone without expertise begins talking as if they did. Even when it is non-obvious for everyone else.

You did exactly that. Very thoroughly, in just your very first post. And you only made it worse with each iteration. You will notice that I very kindly tried to notice to you that that you completely misunderstood the OP.

Please stop.

Don’t be dismayed. I’ve stuck my foot in my own mouth plenty of times. Which has taught me that it is typically a good idea to keep my mouth shut when I am only vaguely familiar with a topic. It is one of the reasons I will refrain from answering a good number of questions here (besides disinterest).

And, to be clear, I am not mad at you, nor do I think you are stupid.

But you are a beginner, and you need to learn quite a bit more about advanced graphics systems before you should feel very comfortable answering questions about how advanced graphics systems work.

It is a very, very deep rabbit hole, and the reason companies spend millions to produce high-end video games.
I hate strawman crap.

Turing a strawman? Your point of view, not mine.
So, let me explain my problem here.

Ok, your problem.
How do games and game engines (especially engines like Unreal Engine) and certain softwares (such as Photoshop, Maya, 3D Studio Max) implement high level or realistic graphics?

As already said, it is (mostly) not about a language.

What you see is a picture. 2D picture. Pixels with some colour.

On one side calculating the colour of one pixel is "simple math", but there is a lot of it.
On the other side the calculation is based on data.

Most languages can do that simple math, but there is also special hardware for doing the math: the GPU. There are "shader languages" that generate instructions for GPUs.
The program needs CPU instructions that feed data (and instructions) to the GPU.

However, the real secret is in the data.

I could draw a red circle and call it "a ball". Location, radius, colour. That looks flat and on low resolution the edge looks jagged, "aliased".

I could generate a lot of points that are all on the surface of that "ball", add a "normal" for each point that is orthogonal to the surface of the ball at that point. I could define where the light comes from, the color of light, the reflectiveness and diffusiveness of the ball's colour, amount of transparency, etc. A lot of data: properties, attributes, features.

That data is used to calculate how the object (ball) affects the colours that end up to the pixels. Your "software" has good collection data; "with these numbers it looks like glass, with those like steel".


The "ball" is simple object. Take an "arm". More details. Now "twist" your arm. Some of the points of the object have to move. The way you represent the model (a ball can be just location, radius, and colour) affects how you can modify it and how that looks in the picture.


Data and math create the illusion. Programming language is not the deciding factor.


You do know the homework, where you read in the test scores of a student and print out the average?
You can write that with many languages. The program is "an engine".

You run the program and input your scores. The output will not be "realistic" aka "straight A" unless the input data is "good enough". The program has no say on the matter.

@keskiverto
If you are an expert look here https://en.wikipedia.org/wiki/Game_engine and help improve it.
Topic archived. No new replies allowed.