Learning to work with 3D

The place to hang out and talk about totally anything general.
ODDin
level5
level5
Posts: 2521
Joined: Fri Jul 04, 2003 10:44 pm
Location: Haifa, Israel
Contact:

Learning to work with 3D

Postby ODDin » Thu May 17, 2007 1:29 pm

So, I've always wanted to do graphics which are better than just windows, and finally I'm ready to begin learning how it's actually done. However, I don't really know where to begin.

1. What do I need to learn about 3D graphics and/or the hardware invloved before I begin studying Direct3D or OpenGL? Take into consideration that I don't know ANYTHING about the subject.
2. What should I use, Direct3D or OpenGL?
3. Do I need the non-Direct3D part of DirectX?

Also, if you're familiar with good manuals on these subjects, I'll be grateful.
Last edited by ODDin on Thu May 17, 2007 3:23 pm, edited 1 time in total.
User avatar
KingAl
level5
level5
Posts: 4138
Joined: Sun Sep 10, 2006 7:42 am

Postby KingAl » Thu May 17, 2007 3:10 pm

Well, if you want to learn OpenGL the Red Book is indispensible, but this place might be worth a look. Obviously the primary advantage of OpenGL is compatibility with different operating systems. Also, there's no 'need' to use other aspects of DirectX just because you're using Direct3D.
User avatar
wwarnick
level5
level5
Posts: 1863
Joined: Mon Oct 02, 2006 8:44 pm
Location: Rexburg, ID

Postby wwarnick » Fri May 18, 2007 9:28 pm

DirectX (and OpenGL) covers input, sound, and everything else needed for game development. Direct3D is just the part that does the 3D stuff. You'll use the whole kit and kaboodle if you're smart.

wwarnick
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Postby xander » Fri May 18, 2007 9:40 pm

wwarnick wrote:DirectX (and OpenGL) covers input, sound, and everything else needed for game development. Direct3D is just the part that does the 3D stuff. You'll use the whole kit and kaboodle if you're smart.

wwarnick

Unless I am mistaken, DirectX does everything. Direct3D is a component of DirectX. OpenGL, on the other hand, only does graphics, not sound (which might use OpenAL), or input, or anything else needed for game development.

xander
User avatar
NeoThermic
Introversion Staff
Introversion Staff
Posts: 6256
Joined: Sat Mar 02, 2002 10:55 am
Location: ::1
Contact:

Postby NeoThermic » Fri May 18, 2007 10:08 pm

xander wrote:
wwarnick wrote:DirectX (and OpenGL) covers input, sound, and everything else needed for game development. Direct3D is just the part that does the 3D stuff. You'll use the whole kit and kaboodle if you're smart.

wwarnick

Unless I am mistaken, DirectX does everything. Direct3D is a component of DirectX. OpenGL, on the other hand, only does graphics, not sound (which might use OpenAL), or input, or anything else needed for game development.

xander


You are correct. OpenGL itself only does graphics. You'll want to combine it with GLUT/SDL and OpenAL to get somewhat similar function to DirectX. However, you'll still be without an equivalent to DirectPlay for networking.

As for which? I'd say OpenGL, but then I'm bias. Also, we beached upon this topic not too long ago, do a search for OpenGL in the IV lounge.

NeoThermic
User avatar
KingAl
level5
level5
Posts: 4138
Joined: Sun Sep 10, 2006 7:42 am

Postby KingAl » Sat May 19, 2007 2:37 am

Indeed. I'm definitely biased towards OpenGL, but the primary benefit of DirectX is its integration of multiple APIs into a (presumably consistently interfaced) group. Unless Microsoft decides to drop support for a particular group of features, this also improves chances of future compatibility - you don't have to worry about the groups supporting your many and various audio, networking, input, and graphics APIs ceasing to update etc. - though the importance of this varies depending on what sort of program you're making, and unless you use particularly obscure APIs it shouldn't really be an issue. Also, many major development houses which only develop for Windows use DirectX as the standard, so if you're interested in the gaming industry this is a consideration (but you don't want to be part of a major developer, do you? ;))
On the flipside, OpenGL offers great portability - you show it an operating system, and it'll probably run on it. It also has a wider feature set - it's the standard for graphics outside of the games industry, so its important that it can support the various uses some may find for it.

EDIT: Take a gander over here.
Gentlemen, you can't fight in here: this is the War Room!
Ultimate Uplink Guide
Latest Patch
ODDin
level5
level5
Posts: 2521
Joined: Fri Jul 04, 2003 10:44 pm
Location: Haifa, Israel
Contact:

Postby ODDin » Sat May 19, 2007 12:20 pm

Ok, I think I'll go with OpenGL - although I only use Windows, it's a good idea that my games will be available on other platforms as well. I'll probably learn SDL too then, but I don't understand one thing - SDL manages audio, so what does OpenAL do that SDL does not?

Also, I understand that it's a good idea to understand 3d math when I work with 3d, but just what exactly is 3d math? I've studied algebra in the uni, which covered vectors, vector spaces, matrices and linear transformations - is that enough?
Last edited by ODDin on Sat May 19, 2007 10:15 pm, edited 1 time in total.
User avatar
KingAl
level5
level5
Posts: 4138
Joined: Sun Sep 10, 2006 7:42 am

Postby KingAl » Sat May 19, 2007 12:55 pm

OpenAL's main advantage is with 3D sound, which the SDL can't do on its own. In relation to knowledge, vectors and matrices are exactly the areas that are useful to be up-to-date on, though 3D projection is another important area.
Gentlemen, you can't fight in here: this is the War Room!

Ultimate Uplink Guide

Latest Patch
User avatar
wwarnick
level5
level5
Posts: 1863
Joined: Mon Oct 02, 2006 8:44 pm
Location: Rexburg, ID

Postby wwarnick » Mon May 21, 2007 3:17 pm

KingAl wrote:...It also has a wider feature set...

I was under the impression that when IV ported Darwinia to DirectX, they were able to add new visual effects that OpenGL did not support.

wwarnick
User avatar
KingAl
level5
level5
Posts: 4138
Joined: Sun Sep 10, 2006 7:42 am

Postby KingAl » Mon May 21, 2007 3:24 pm

OpenGL is perfectly capable of rendering reflections, distortion and suchlike, IV just took the opportunity to add those effects because they were already altering the game to function using DirectX.
Gentlemen, you can't fight in here: this is the War Room!

Ultimate Uplink Guide

Latest Patch
User avatar
NeoThermic
Introversion Staff
Introversion Staff
Posts: 6256
Joined: Sat Mar 02, 2002 10:55 am
Location: ::1
Contact:

Postby NeoThermic » Mon May 21, 2007 3:41 pm

wwarnick wrote:
KingAl wrote:...It also has a wider feature set...

I was under the impression that when IV ported Darwinia to DirectX, they were able to add new visual effects that OpenGL did not support.

wwarnick


DirectX makes them slightly easier, as it tries to hide the raw workings from the end coder. Problem is, you'll eventually want to get down and dirty with the card, so you'll need to use the raw functions. Shaders and such are easy to do in GLSL, for example.

NeoThermic
Stewsburntmonkey
level5
level5
Posts: 11553
Joined: Wed Jul 10, 2002 7:44 pm
Location: Nashville, TN
Contact:

Postby Stewsburntmonkey » Mon May 21, 2007 3:55 pm

I've got the OpenGL red book as well as a book called 3D Math Primer for Graphics and Game Development which covers the linear algebra decently (I've also probably got my linear algebra books from university around somewhere).
User avatar
wwarnick
level5
level5
Posts: 1863
Joined: Mon Oct 02, 2006 8:44 pm
Location: Rexburg, ID

Postby wwarnick » Mon May 21, 2007 6:30 pm

I read up on some OpenGL stuff and it says pixel shader effects require an extension, while DirectX does not. It also said that extensions can make code a little messy (minor annoyance I guess). But it also mentioned that an OpenGL 2.0 has been proposed, which I assume would solve all the age-related problems with the library.

NeoThermic wrote:OpenGL itself only does graphics.

I did not know that. Does that make things more difficult, or are SDL and OpenAl easy enough to pick up?

wwarnick
User avatar
shinygerbil
level5
level5
Posts: 4667
Joined: Wed Dec 22, 2004 10:14 pm
Location: Out, finding my own food. Also, doing the shinyBonsai Manoeuvre(tm)
Contact:

Postby shinygerbil » Mon May 21, 2007 6:34 pm

wwarnick wrote:I read up on some OpenGL stuff and it says pixel shader effects require an extension, while DirectX does not.


I presume this is because DirectX comes with all the extra bells and whistles, which you can't cut out even if you want to. :P
Here is my signature. Make of it what you will.
Image
User avatar
wwarnick
level5
level5
Posts: 1863
Joined: Mon Oct 02, 2006 8:44 pm
Location: Rexburg, ID

Postby wwarnick » Mon May 21, 2007 7:22 pm

shinygerbil wrote:I presume this is because DirectX comes with all the extra bells and whistles, which you can't cut out even if you want to.

I'm assuming that's a jab at Microsoft.

If I'm right, the said extension exists only because integrating pixel-shading capability into the core library would take some serious reworking. OpenGL is old (but up to date with the extensions). That's why they proposed OpenGL 2.0, so that you wouldn't need so many extensions.

wwarnick

Return to “Introversion Lounge”

Who is online

Users browsing this forum: No registered users and 5 guests