Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Math knowledge required to learn OpenGL?

This thread is locked; no one can reply to it. rss feed Print
Math knowledge required to learn OpenGL?
kentl
Member #2,905
November 2002

I understand that OpenGL probably is the way to go for graphics (at present and) in the future. I have always used different 2D based graphic libraries so i have not been forced to deal with 3D vectors, matrix math and such things i understand are involved in 3D.

I wonder how much algebra and geometry math that is required to be able to use OpenGL to create 3D applications? I would love it if the answers where quite specific so i understand which parts to focus on when gaining the necessary knowledge.

23yrold3yrold
Member #1,134
March 2001
avatar

Minimal. Go play with the NeHe tutorials (no math required) and you'll learn what kind of math is needed. Most of the complex stuff is done by libraries now anyway, so don't sweat it.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

X-G
Member #856
December 2000
avatar

You are strongly encouraged to learn basic linear algebra; that's vectors and matrices for you. You don't need to know any advanced mathematics though.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Archon
Member #4,195
January 2004
avatar

I bet that you can find out "how to do something" by looking at examples and only learning the code you need! :D

Richard Phipps
Member #1,632
November 2001
avatar

Hmmm.. So you can get by with weak Trig skills? :)

miran
Member #2,407
June 2002

Quote:

Minimal.

True. But it helps a lot if you actually know what you're doing instead of just copying code from tutorials...

--
sig used to be here

Archon
Member #4,195
January 2004
avatar

Quote:

But it helps a lot if you actually know what you're doing instead of just copying code from tutorials...

Looks around - gets nervous
But some people dont do that right?

Chris Katko
Member #1,881
January 2002
avatar

Basic OpenGL probably doesn't need very much math. But if you want to have physics in your game, good luck. :)

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs

kentl
Member #2,905
November 2002

I could squeeze some "simple game physics" in there i am sure. Instead of using dx,dy i would have dx,dy,dz and do "falling" as normal with the dy variable. If i only worked with spheres or cubes i could even do the collision detection with my existing math knowledge ;)

I'll learn basic linear algebra to start with.. :)

Thanks to everyone for the helpful replies! :) (but by all means, let the discussion go on if you have something to add)

Rash
Member #2,374
May 2002
avatar

You can learn the math on the fly as you go on trying more complicated stuff. If you don't like the idea, just see it as learning more of "OpenGL". Apparently there is some sort of stigma on math by itself.

Tobias Dammers
Member #2,604
August 2002
avatar

Real programmers aren't afraid of math!

Seriously: Just start programming, and whenever you bump into math stuff you don't get: well, just one more chance to learn something new & useful! I would recommend, though, to learn the basic concepts of general game programming (logic loops, timers, input, data structures etc). Thinking in 3D is a bit more complex than in 2D, so you should get the basic stuff straight at least.

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

Indeterminatus
Member #737
November 2000
avatar

I can only recommend the book "Tricks of the 3D game programming gurus" by LaMothe. It really helped me get into 3D math / programming. Being able to program your own software rasterizer you should have no problem of understanding what OpenGL does ;)

_______________________________
Indeterminatus. [Atomic Butcher]
si tacuisses, philosophus mansisses

nonnus29
Member #2,606
August 2002
avatar

This is a really good tutorial I find helpful from time to time.

Mika Halttunen
Member #760
November 2000
avatar

In my opinion you don't have to know much about math before attempting to use OpenGL. At least I didn't, and I have written several games using OpenGL (Ultimate Steroids, Enigma, I Have No Tomatoes).

It really on depends what you're trying to do, your basic tile collisions will work in 3d too - just throw some no-brainer "physics" in (i.e. gravity) and you've got Enigma :)

Naturally something more complex with realistic physics involves quite a bit of math. But to get started in OpenGL, no, you don't need a degree in math.

---------------------------------------------
.:MHGames | @mhgames_ :.

kentl
Member #2,905
November 2002

Quote:

"Tricks of the 3D game programming gurus" by LaMothe

I'll check it out when i get more free time. I liked "J2ME Game Programming" released by LaMothe (not written though).

Quote:

This is a really good tutorial I find helpful from time to time.

Bookmarked! Thanks! :)

Quote:

Go play with the NeHe tutorials

Ok, i was thinking that some math was required for them as well. But i will check them out.

I will go with the learn the maths on the fly approach. Before i get started i will take a linear algebra course though to have some kind of foundation to build upon.

Go to: