How to know the coordinates of a 3-D engine?

46d18dc92ae7cd35698347bd4b97f0fb
0
andyharglesis 101 Jan 03, 2012 at 07:52

Alright, I’ll go straight to the point … I’m confused.

A 3-D game engine is basically like a what? A 3-D space with which instructions to make 3-D games?

3-D world? I don’t get it … how do you put models into 3-D environments, and where do 3-D environments come from? 3-D game engines?

I don’t understand this at all … does an engine consist of low-level instructions to explicitly determine a 3-D space? Or does a 3-D space have nothing to do with a game engine for the third dimension itself?

Not that I’m ready for 3-D programming at all, but I’d like to clear these things up for when I do, if so, proceed to 3-D programming.

Like, look … in my head I imagine a 3-D space where things are drawn. What must be done to “get” that 3-D space to exist in the first place? Do you need a special file, or files, that can do it? And how do you know how it’s done, how and where to draw to this “area” of space, and where it will end up, how big it will be, how the camera is appointed to a generated 3-D area, etc?

And what about a “level editor?” Is a level editor a 3-D environment source, or just a way to edit a 3-D space?

Any help to clear this out would be very much appreciated!

12 Replies

Please log in or register to post a reply.

8676d29610e6c98d6dd2d9c38528cd9c
0
alphadog 101 Jan 03, 2012 at 14:41

A game engine is, primarily, a way to mathematically represent (cartesian space) and manage a 3D-based world of various objects, and then map it to 2D space (where the viewer’s eyes, the camera, is another object in that space). It is also a way to mathematically represent other things like sound, game rules, or artifical intelligence in that world. Of course, there are multiple ways to represent the world, and the objects therein, so you have terrain data formats, model data formats, animation formats, etc.

A level editor allows a user to create the data of the 3D world. It is, in a way, a very similar tool to a “game engine client” that allows a user to play in the represented world. Most engines for stand-alone games are both world engine and client all at once.

I recommend a game engine book, or some googling to clear this up. It’s a very broad question…

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 168 Jan 03, 2012 at 21:00

3D graphics APIs like OpenGL and Direct3D operate at a relatively low level. Basically, they let you allocate chunks of video memory to store data, and issue commands to the GPU. The GPU basically draws triangles on the screen. This is a bit of an oversimplification, but the GPU doesn’t intrinsically know that much about 3D space. It is able to very efficiently run limited user code (shaders) that tell it where the triangles should be on screen, and what color each pixel of each triangle should be. But it doesn’t have a concept of a camera or of objects that exist in a 3D space. It just draws triangles, where and how you tell it to do so.

A 3D graphics engine is a piece of software built on top of this basic level of functionality. It provides higher-level concepts like cameras and persistent objects in a 3D space (the game world), and provides the shaders and other code that cause the GPU to generate a realistic image of the world, by calculating where each 3D triangle should go on screen to provide correct perspective relative to the camera, and how each triangle should be colored to mimic realistic lighting. It also includes a set of tools to allow users to create 3D models, textures, and materials and place them in the game world.

A game engine is a graphics engine together with an animation system, physics engine, audio system, AI system, resource management system and various other things.

46d18dc92ae7cd35698347bd4b97f0fb
0
andyharglesis 101 Jan 04, 2012 at 07:30

Sadly, neither of those two answers get the question fully. :P

820ce9018b365a6aeba6e23847f17eda
0
geon 101 Jan 04, 2012 at 13:51

Your graphics hardware can draw triangles on the screen.

Your code does everything else. Since a lot of stuff is common between many games, they are often separated out to a game engine that takes care of everything that isn’t the game itself (story, points, behaviors).

The engine usually handles stuff like:

* Load models, animations, textures, shaders sounds, maps, etc. from disk and store in some suitable data structure.
* Keep track of the 3D world. (Where objects are, where the camera is)
* Handles physics simulations.
* Handles input.
* Renders the world.

There is nothing magical about al this. You could (theoretically) do it all yourself.

> What must be done to “get” that 3-D space to exist in the first place?

The engine would usually have some form of scene graph. There are lots of different ways to do this, depending on the situation and the needs of the game. It could be as simple as a list of “scene entities” with a pointer to a 3D model (basically an array of triangles), a coordinate for the position and a quaternion/matrix for the orientation.

> how and where to draw to this “area” of space, and where it will end up, how big it will be

This is the job of the renderer. It takes a scene entity and hands it over to the 3D driver to be rendered. Depending on the position and orientation in the 3D world of the camera and the object, a projection matrix is calculated. All the vertices of the triangles are transformed by this matrix and gets x/y coordinates on the screen. (Google projection matrix.) Then the triangles are drawn by the hardware.

> And what about a “level editor?”

Mostly, you would just use a modeling software like 3DSMax, Maya, or Blender. They can save your 3D objects (the level) into some file format your code can read. It can be as simple as an array of triangles.

8676d29610e6c98d6dd2d9c38528cd9c
0
alphadog 101 Jan 04, 2012 at 14:04

@Enthusiastic for Sense

Sadly, neither of those two answers get the question fully. :P

Don’t take this wrong, but honestly, the problem is the question. I have no real solid idea what you are asking. I thought I did, but I guess I didn’t.

I really think you’d best be served by getting a good game engine book and learning the real lingo for concepts you are interested in. Then, you can ask more accurate questions more likely to get you a useful answer.

Fe8a5d0ee91f9db7f5b82b8fd4a4e1e6
0
JarkkoL 102 Jan 04, 2012 at 15:06

3D game engine is technology (software) to manage 3D worlds. It simulates (physics, AI/scripts, animation) and renders (graphics & audio) 3D worlds.

3D game engine is composition of various sub-engines to manage different aspects of 3D worlds, namely; physics, AI, animation, audio, graphics and physics, and infrastructure which binds these sub-engines together (handles the communication between the sub-engines and feeds them with proper data). Nowdays there is plethora of game middleware available which provide various solutions to part of 3D game engines, such as Havok, PhysX, Bullet for physics, Kynapse, xAitment middleware, PathEngine for AI, FMOD, BASS for audio, to name a few. There is also plethora of complete game engines which usually provide some kind of composition of game middleware and custom technology.

3D game engines often come with a 3D game editor (specific to the engine), which enables you to build game levels by place objects to game levels, create some game content, define AI behaviors and scripts, setup trigger volumes and other “helper” objects, etc. to help in making a game. The editors also generally support importing content (3D objects, textures, audio, etc.) that’s authored in external applications such as 3DS Max, Maya, Photoshop, etc.

Cheers, Jarkko

46d18dc92ae7cd35698347bd4b97f0fb
0
andyharglesis 101 Jan 05, 2012 at 05:13

You know what? Just forget it.

Tell me how I delete my account here … it’s a waste of time writing anything when nobody can help or understand what you’re asking.

I’ll just never do 3-D programming then.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 168 Jan 05, 2012 at 07:02

Post a vague, confused question, get a bunch of general, high-level answers, then complain that no one understands what you’re asking…

Maybe you’d get more out of this if you focus on a more specific question, and if you get an answer that seems to miss what you had in mind, maybe try asking for elaboration or clarification about something, rather than just throwing the answer out.

Communication is a two-way street.

46d18dc92ae7cd35698347bd4b97f0fb
0
andyharglesis 101 Jan 06, 2012 at 06:37

I schemed you all.

I’m a well-accomplished programmer and have won honorary awards for algorithms I’ve wrote in many levels of programming. :)

This was just to see how easily people can fall for a joke. :D

820ce9018b365a6aeba6e23847f17eda
0
geon 101 Jan 06, 2012 at 11:43

> This was just to see how easily people can fall for a joke.

If that was true, you could just have hade a look at all the old threads here. Clueless beginners who want to make an MMORPGLOLWYSIWYG are really not that uncommon. No, you are just an asshole.

B5262118b588a5a420230bfbef4a2cdf
0
Stainless 151 Jan 06, 2012 at 12:02

I think we should all work out how much time we have spent answering his posts, and multiply that by our hourly rate, then invoice him and donate the proceeds to maintenance of the website.

8676d29610e6c98d6dd2d9c38528cd9c
0
alphadog 101 Jan 06, 2012 at 14:20

@Enthusiastic for Sense

This was just to see how easily people can fall for a joke. :D

Yes, it is easy. Enjoy your discovery and “win”.

I think it’d be best if people just chilled. Moral indignation is just what this kid seems to be craving. Quite frankly, it seems like a lot of good, educational discussion and some side attention-whoring.