Game Career Guide Forums (http://www.gamecareerguide.com/forums/index.php)
-   Programming (http://www.gamecareerguide.com/forums/forumdisplay.php?f=7)
-   -   Math, Textures, and Shaders... oh my! (http://www.gamecareerguide.com/forums/showthread.php?t=2848)

 jwalters 08-05-2009 10:57 AM

Math, Textures, and Shaders... oh my!

Hey Everyone,

First I do apologize if this is too DX-centric. I'm reading a new book and see some crazy math stuff, wondering if anyone does some of these things. I know there are libraries for a large number of things, but have you ever generated cylindrical or spherical texture coordinates (e.g. to texture the teapot mesh)? How frequently do you use sines and cosines? Any calculus? Or perhaps a better question... what type of math do you use every day?

Also, to what extent do you use vertex/pixel shaders? Are they a part of every game you write?

I'm trying to figure out where I should focus my studies and if I need to work on memorizing some of the crazy math (e.g. to compute specular lighting) I see in the DirectX book I'm reading. Thanks for your thoughts!

 ScHiZo 08-05-2009 02:38 PM

It all depends on what type of game programming you want to do. If you want to do engine programming then you should probably know all the inner workings of how a scene gets created. There's higher level programming in games like a gameplay or ui programmer. They wouldn't need to learn so much low level stuff, but it's good to know as you can take certain limitations into consideration.

I use cosines and sines alot in the games I write. I haven't had a case where I had to bust out a Calculus book yet.. You should have a good grasp of alegra, geometry, trigonometry, vectors, and matrices. There's probably more if you want to do graphics programming.

From my experience in 3D games, vertex/pixel shaders are definitely used. You should familiarize yourself with them, but I wouldn't go overboard and write every shader out there. The shaders in games are usually grabbed from a reference book somewhere and tweaked to the designer's liking.

You shouldn't stress out to much about Math. I'm actually not very good at it, but I know enough to get by. In practice, you just look up whatever formula you need and use it. It helps to know the concepts, so you know what to look for in the first place though.

 dzeligman 08-05-2009 03:37 PM

I would recommend just starting small and incrementally building up.

Write your own DX/OpenGL renderer for displaying multiple models on the screen. Be able to translate,scale,rotate them on their own local space and the world space as a whole. Then do some shader manipulation on each of them. Use the vertex shader to modify their positions slightly and fragment shader for basic coloring.

I've been using OpenGL ES this summer for the first time and have had to learn shaders from scratch along with relearning exactly how matrices are used in a rendering environment.

I originally thought it would be really hard, but its not. Just gotta do it in small steps.

 DTR 08-05-2009 11:12 PM

Quote:
 Originally Posted by dzeligman (Post 15263) I would recommend just starting small and incrementally building up.
Agree with this.

Just improve on improvement and you will get better by every day.
Eventually you will wake up one day in a place you wanted to go all along.

 DTR 08-07-2009 08:48 PM

Quote:
 Originally Posted by Maria2009 (Post 15305) I'm very interested! I would love to find out more inforamtion related to this topic. Thanks in advance. me too, I need more detailed info

Oh for crying out loud... Are those strings concatenated from a random pool of expressions? :p

This is ridiculous.

 jwalters 08-14-2009 06:16 AM

Thanks all for the encouragement! I guess I have been stressing about the math too much and do just need to take it one step at a time. Seems like progress takes a while and I just need to work on being more patient :D

 All times are GMT -8. The time now is 04:14 AM.

Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.