• Starting 3D Programming
    14 replies, posted
Hello there, I have been kind of programming for a bit now and the best I have come up with was a program tiling the robinson tileset. I rendered them using some SDL stuff I found by googling around a bit. But now I have started studying maths and want to become more serious about this hobby, so I thought the best way to combine those two would be to make a 3D engine. But where do I start? I don't have much money to buy books, and the nehe tutorials seem kind of out-of-date. What I do know is C and a bit C++ but thats it. No knowledge about 3D (except they somehow use polygons, but only render triangles and somehow images get plastered on those to create textures :downs: ). Also I have started and gave up on Structure and Interpretation of Computer Programs because I couldn't do anything properly in emacs. What do I do? Where do I go? Also what notation for variables? Since I have never shared code before I'd like to know what the hip way of coding is. Thanks for your kind help
I would go with [url=http://openglbook.com/]this site[/url] for beginning graphics programming with OpenGL. It is not a complete tutorial, but it introduces the basics of the OpenGL core profile.
I'd recommend learning from NeHe, he has some excellent tutorials up for getting everything going. [url]http://nehe.gamedev.net/[/url] The tutorials have been filed under "Legacy Tutorials", but lots of the information is still extremely relevant.
[QUOTE=Senney;34440155]I'd recommend learning from NeHe, he has some excellent tutorials up for getting everything going. [url]http://nehe.gamedev.net/[/url] The tutorials have been filed under "Legacy Tutorials", but lots of the information is still extremely relevant.[/QUOTE] The OP mentioned that he wanted to learn something newer than what NeHe offers, and I wouldn't recommend NeHe unless someone was intent on learning OpenGL from the early 1990s. (The API has changed significantly since then). I own a copy of [url=http://www.amazon.com/OpenGL-SuperBible-Comprehensive-Tutorial-Reference/dp/0321712617/ref=dp_ob_title_bk]The OpenGL SuperBible 5th edition[/url] and it's excellent. I would highly recommend it. It uses the core profile from OpenGL 3.3 (Early 2010, no massive changes to the API since then) and also includes a printed copy of the OpenGL reference pages. If you want a basic rundown of how 3d graphics works, it goes something like this: - Everything is made of triangles. You specify the triangles vertices and all the pixels in that triangle are filled with some sort of color data. - The color data can either be a solid color, interpolated colors, or textures. - Textures are images stored on the GPU. With each vertex of the triangle that you specify, you should also specify a texture coordinate. Texture coordinates are always in the range [0, 1] and IIRC OpenGL defines (0, 0) as the bottom left and (1, 1) as the top right. For each pixel in the contained triangle, the specified texture coordinates are interpolated and the color of the texture at that point is selected as the color of the pixel. - The default window coordinates are [-1, 1] on the X, Y, and Z axes in OpenGL (In DirectX the Z axis is [0, 1]). Generally you'll want to define your own window coordinates, whether it's from (0, 0) to the size of the window or some sort of unit scaling. You use a projection matrix to represent this. - If you want objects to move around the world, you can define the object's vertices around (0, 0, 0) and apply a model matrix to transform the object into world space. - You can also use a view matrix to move the entire world around (you'd think it would be easier to have a camera that moves around the world, but no, moving the entire world to eye space is actually a lot easier to do). - All vertices you draw are multiplied by the model, view, and projection matrices by default. In modern OpenGL you have further control over this because the matrices are just variables in your shader.
Great guys thank you very much :D Also if you could tell me a forum where I might pose all my newbie questions that would be great. I dont think starting a new thread about every little problem I encounter would be correct on FP. Thank you very much
There is the "What do you need help with?" thread here, you can ask questions there.
[QUOTE=robmaister12;34440581]The OP mentioned that he wanted to learn something newer than what NeHe offers, and I wouldn't recommend NeHe unless someone was intent on learning OpenGL from the early 1990s. (The API has changed significantly since then). ...[/QUOTE] Oh, derp. I should learn to read the entirety of the post before replying! I've been working my way through the OpenGL Red Book ([url]http://www.amazon.com/OpenGL-Programming-Guide-Official-Learning/dp/0321552628/[/url]) and I've found it to be really detailed and quite well written!
Many of these tutorials and books are outdated and/or teach fixed function pipeline. If you already know something about programming, I recommend you [I]Learning Modern 3D Graphics Programming[/I] by Jason L. McKesson, which is an e-book reachable from [URL="http://arcsynthesis.org/gltut/"]http://arcsynthesis.org/gltut/[/URL]. I also recommend you reading [URL="http://arcsynthesis.org/gltut/About%20this%20Book.html#d0e30"]the intro of the book[/URL], so you understand the point of it.
[URL="http://open.gl"]Wouldn't it be great if there was a one stop site where you could learn all about non deprecated OpenGL...[/URL]
[URL="http://www.daveshreiner.com/SIGGRAPH/s11/Modern-OpenGL.pdf"]http://www.daveshreiner.com/SIGGRAPH/s11/Modern-OpenGL.pdf[/URL]
I'm just wondering I'm learning from Frank. D. Luna's 'Introduction to Game Programming with DirectX 9.0c' do you guys think OpenGl Superbible is more worthwhile? I understand each API is only as good as you make it but OpenGL is more preferable for more portable/platform-friendly games but the Superbible is a good 1000 or so pages. I own both books so it isn't a big deal it's just a matter of what to approach first.
opengl
Ok so this is a lot to pick from, but OpenGL clearly seems to be the theme here. I think I'll go with TomsonTom's [URL="http://arcsynthesis.org/gltut/"]http://arcsynthesis.org/gltut/[/URL] and the OpenGL SuperBible. Thank you so much guys :)
Just for your information, it's not finished. However I don't know if Jason L. McKesson still continues writing it, so you can learn the basics from it, but you'll have to learn more advanced things from other tutorials. ;)
Well it was last updated in November so there's still hope :D What's been done so far is massive and really good. Plus it assumes exactly the knowledge I have, good at maths, sufficient C++ to understand what's going on and not having made a finite decision between Direct3D and OpenGL.
Sorry, you need to Log In to post a reply to this thread.