Skip to main content
GameDev.net gamedev.net
🔒 Locked

Math for lighting...

Started by Tree Penguin Oct 31, 2004 at 7:16 AM 3 replies 1.1k views
Original Post
Tree Penguin
Tree Penguin
Hi, i am currently working on lighting and reflection (software radiosity) and i always find a 'logic' way to do something instead of a mathematical one. When i read example shaders or algorithms i simply don't understand them, i don't know why they do it and i don't know what it does, so i decided to give it a try. So i need a (not too) basic 3d math beginners tutorial, do you guys reccomend a website or a book (i'm not sure if i can afford it)? My interest is mainly lighting. Thanks.
LilBudyWizer
LilBudyWizer
NeHe totally free and 48 very good tutorials covering a wide array of topics. The above site is not a math tutorial. Rather it will teach you a lot of math in the course of teaching you graphics programming. I took the path of needing to understand all the math. Ten math courses later I know a lot more math and the more math I learn the more math I realize I don't know. I haven't learn jack about graphics programming because I've been too busy working math problems to write any programs. I enjoy math as much as programming which is the real reason I do it. If your goal is to do graphics programming your emphasis has to be on creating working programs rather than developing a theory on how you would do graphics programming if you ever got around to it.

[Edited by - LilBudyWizer on October 31, 2004 3:41:30 PM]
Keys to success: Ability, ambition and opportunity.
JaakRa
JaakRa
Coding custom lighting isnt easy, you need to know some 3D stuff, mostly stuff about vectors and trig.
Like I understand you'r working on raytracing (hence... reflection, radiocity), there you simply *need* to know lot about vector math and trig. Trust me, its not as hard as it seems right now once you understand math behind it and start thinking logically... there is nothing more logical than math.
Tree Penguin
Tree Penguin
Ok, i'll explain myself a bit more and sorry for the vague question.

I am programming (OpenGL and 3d software rendered) for almost 2 years now and i decided to start a serious project. So i started working on an animating app (animating models and rendering the animations) and since a while i tend to run away for anything mathematic or other things that need a lot of theory, i always try to find my own way to do things to avoid tutorials and books on the subjects.

Of course this works in some cases but it too often doesn't work, so i decided to work on my math skills.

I know how to work with matrices, i know what radiants are and how i should work with cos/sin (in a basic way, calculating angles to and from)
I am having problems with everything concerning angles (reflections, refractions) in 3d, i know some basics but it's just not enaugh.

So, does anyone know and reccommend some sort of online math course that covers everything i might be needing, or can anyone give me a list of things i should know when dealing with lighting and animation?

I'm sorry if the question sounds lazy but i just don't know where to start.

Thanks you guys.

EDIT: quaternions would be a good idea i guess.
Rocket05
Rocket05
i really dont think you'll need more than your standard algebra, calculus would help but you might be able to get by without it.

there are quite a few established lighting/shading models (lambertian, phong, blinn, cook-torr, etc.), google is your best friend here. I suggest starting with the lambertian model, its very simple and looks decent. even if you dont understand the math of these models right away, the principles should make sense, understanding the math part will come.

depending on whether or not you're still in school, you might be able to just ask a math teacher to explain the math of a lighting/shading model to you.

if not, you can always make a post here, there's quite a bunch of math wiz's hang'n around here
"I never let schooling interfere with my education" - Mark Twain

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.