Well, i'm slightly lost with this normal mapping business. Does anyone know of any tutorials on implementing it with OpenGL?
thanx,
-psychopath
Well, i'm slightly lost with this normal mapping business. Does anyone know of any tutorials on implementing it with OpenGL?
thanx,
-psychopath
M.Eng Computer Engineering CandidateB.Sc Computer Science
Robotics and graphics enthusiast.
yea, I was looking at that a few nights ago. It dosn't help that much though. It shows how to create a normal map, But I need to know how to add the normal mapping code in OGL.
-psychopath
M.Eng Computer Engineering CandidateB.Sc Computer Science
Robotics and graphics enthusiast.
You need to do it using OpenGL shaders.
From reading through some of your various posts and problems, I've gathered that you're relatively amateur (i.e you were the kid who was loading the terrain data from file each graphics frame and wondering why it was going slow), so I pose this question to you: do you really need to implement shaders to get perfect lighting (which is what I assume you are doing), and are you ready for that type of work? Dealing with shaders is typically considered a more advanced/difficult level of graphics programming.
OpenGL lighting is pretty good in itself (just pass a normal for each triangle/surface you render).
If you just use Gouraud shading using regular OpenGL lighting you get very realistic results on densely tesselated models (models where each polygon's surface isn't too big). It's faster for the computer from the computational point of view and easier to implement.
Last edited by Darkness; 01-26-2005 at 03:03 PM.
See you in 13
>>From reading through some of your various posts and problems, I've gathered that you're relatively amateur (i.e you were the kid who was loading the terrain data from file each graphics frame and wondering why it was going slow)<<
well, yes i'm still learning, but iv'e learned alot since then. You can learn the most from your mistakes.
Also, iv'e downloaded examples from ATI (although they seem to be ATI card specific), and i'm going to take some time and break down the source code and see how it all works to try and avoid running into problems.
>>If you just use Gouraud shading using regular OpenGL lighting you get very realistic results on densely tesselated models (models where each polygon's surface isn't too big). It's faster for the computer from the computational point of view and easier to implement.<<
Yes, but the fewer polys the better, as it puts less stress on the vid-card.
-psychopath
Last edited by psychopath; 01-26-2005 at 04:41 PM.
M.Eng Computer Engineering CandidateB.Sc Computer Science
Robotics and graphics enthusiast.
You're completely right about learning from mistakes, and I wasn't trying to be a jerk, only just trying to point out the fact that you're inexperienced, which is okay (we were all there). It's a lot better to set your goals onto something easier and actually accomplish it than it is to develop fabulous goals and take the chance of getting discouraged if you don't obtain the fabulous goals. That is how most people stop game programming. Heck, maybe you really can implement the per pixel lighting with gl shaders without much difficulty, but don't be afraid to work with something easier first (which is still what I strongly suggest). I would also like to point out that John Carmack, probably the most well known graphics programmer, started out programming some really gay crap before he did anything cool...he developed various gay algorithms such as side scrolling and surface caching, all of which were new, but actually very simple techniques, and he later went on to harder stuff.
Also, about the speed thing, you've got the right idea that processing more polygons takes longer, but the thing is just using goraud shading is MUCH faster than doing anything in a shader that is done per fragment (per pixel).
http://en.wikipedia.org/wiki/Surface_caching
EDIT:
and before anybody throws a hormone fit, I wasn't disrespecting Carmack, only trying to support the argument that it's perfectly okay to start out with relatively easy stuff, and that you don't absolutely *have* to do something overly complex in order to become a very good coder.
Last edited by Darkness; 01-26-2005 at 05:49 PM.
See you in 13
Hmm, excuse my hormone fit and lack of posts for the last year and a half, but I don't think you realize how revolutionary it was to run Mario on a PC. If you're at all interested in Carmack or Romero's rise to power, I suggest "Masters of Doom".Originally Posted by Darkness
To to OP, I'd suggest "OpenGL Game Programming", its only $50 and it's a great book to teach you the basics of OGL.
"The best way to get answers is to just keep working the problem, recognizing when you are stalled, and directing the search pattern.....Don’t just wait for The Right Thing to strike you – try everything you think might even be in the right direction, so you can collect clues about the nature of the problem."
-John Carmack
You're missing the point napkin
See you in 13
>>OpenGL Game Programming<<
I have "Beginning OpenGL Game Programming"....great book, really helped.
-psychopath
M.Eng Computer Engineering CandidateB.Sc Computer Science
Robotics and graphics enthusiast.