Archived

This topic is now archived and is closed to further replies.

vish40

OpenGL Questions for people who know OpenGL pretty well!!!

Recommended Posts

vish40    122
hey guys, I have been programming in OpenGL for about 6 months. I have read tutorials on several of the website. They were great, especially NeHe''s, but they only take to a certain level. I am at a level where I can create a 3d object and do alpha blending, lighting, texturing and all other low level stuff. I can''t seen to go anywhere from here. So I have a question to ask you OpenGL programmers. How did you go about learn OpenGL and what step did you took to get to the level you''re at. I would also like to know the following things: I do i go about programming a level in OpenGL. Are there any tutorials that I can help with this process. Thanks for your replys.

Share this post


Link to post
Share on other sites
vish40    122
See the problem with this is that i dont know how to program that. Is there a website that explains the process of creating complex object or even my own format.

Thanks again for your replys.

Share this post


Link to post
Share on other sites
benjamin bunny    838
I learnt by programming a simple 3D game, referring to the OpenGL pages on MSDN.

If you''ve done a lot of tutorials, it''s probably time you weened yourself off them. Tutorials are okay if you want to get your feet wet, but at some point you need to learn to think for yourself. Copying and pasting really doesn''t teach you that much.

Share this post


Link to post
Share on other sites
benjamin bunny    838
quote:
Original post by vish40
See the problem with this is that i dont know how to program that. Is there a website that explains the process of creating complex object or even my own format.

Thanks again for your replys.


Oh dear. My initial suspicion was correct: you're a copy and paste programmer without a clue about designing your own code. Perhaps you should just learn to program instead. Before you ask, no, there isn't a web page which will teach you how to program. You need to learn yourself.

When you have some more specific questions, come back and ask them, and I'm sure we'll do our best to help you out.

[edited by - benjamin bunny on September 2, 2003 7:48:36 PM]

Share this post


Link to post
Share on other sites
ParadigmShift    190
I don't think you guys are being fair to this poster. He's not asking for another tutorial, he's asking for some ideas as to where to proceed. Even if you're not copying & pasting, you still burrow other people's ideas. Nobody wants to reinvent the wheel, except maybe for a purely academic challange.

vish40: If you're feeling adventurous, you can try your hand at loading an existing file format, such as Quake2 BSP. There are documents for doing this such as:

http://www.flipcode.com/tutorials/tut_q2levels.shtml

This shows you not only how to read in a specific format (so you can use existing artwork to develop your own rendering techniques) but also what information goes into the level besides geometry.

If you keep your loading code moderatly separate from your drawing code, you can always go back and replace or extend the file format later.

Hope that helps.

Tom

[edited by - ParadigmShift on September 2, 2003 7:58:08 PM]

[edited by - ParadigmShift on September 2, 2003 7:59:38 PM]

[edited by - ParadigmShift on September 2, 2003 8:01:26 PM]

Share this post


Link to post
Share on other sites
ahzab33    122
As for models, I''ve learned a lot from a book called Focus on 3D Models by PremierPress. In the book they go over the concept in a pretty API-Independent way, and then you can go to the CD for the examples written using OpenGL. It is another book, but you might actually walk way understanding what your doing rather than guessing, or cutting and pasting. It goes over most of the major format, i.e. .OBJ (MAYA), .3DS (3DS Max), .MD2 (Quake 2), .MD3 (Quake 3), MDL (half-life), etc.

There are plenty of websites available as well to learn the level-rendering stuff like GameTutorials.com. There is also another book by the same company called Focus on Terrain someting where it teaches you several methods for generating terrain algorithimically. When it comes down to it, we all get our ideas from someone else. Even John Carmack has stated that all he does is embrace and extend other''s ideas.

Kill ''''em all!!! Let Allah sort em out

Share this post


Link to post
Share on other sites
jeeky    126
What you really need is not another programming resource.

As benjamin bunny stated, copying and pasting won't take you very far.

What you really need is a project, such as a simple game or demo program. Another source of programming projects is employment, but generally the projects are dictated to you. At your level, a simple game or demo is probably what you should be looking into.


[edited by - jeeky on September 2, 2003 9:16:30 PM]

Share this post


Link to post
Share on other sites
Nazrix    307
The best thing to do is set out to create some small demo. You will encounter many specific problems that you will have to find the answer to. Basically you have to learn by doing.


A CRPG in development...

Need help? Well, go FAQ yourself.


"Just don''t look at the hole." -- Unspoken_Magi

Share this post


Link to post
Share on other sites
krez    443
quote:
Original post by vish40
hey guys,
I have been programming in OpenGL for about 6 months. I have read tutorials on several of the website. They were great, especially NeHe''s, but they only take to a certain level. I am at a level where I can create a 3d object and do alpha blending, lighting, texturing and all other low level stuff. I can''t seen to go anywhere from here.

So I have a question to ask you OpenGL programmers. How did you go about learn OpenGL and what step did you took to get to the level you''re at.

I would also like to know the following things:
I do i go about programming a level in OpenGL.
Are there any tutorials that I can help with this process.

Thanks for your replys.



to answer you instead of bashing you (yes, every once in a while i am on that side of the fence):

if you have followed and understood the NeHe stuff, your next step might be to put it all together. using the stuff you learned, work out a small project you want to do (or even just simple demo things to test your skills) and try to implement it.

there are books you can buy or download (depending on the book) to learn more about openGL. there are more tutorials and such on the internet, but most don''t go further then NeHe''s and aren''t as good anyway.

as for model loading, you will have to look up the file format you want to use (try the "wotsit" site affiliated with gamedev, i don''t remember the URL) and write a function to load such a file into memory and draw it with OpenGL. creating your own format might be simpler, but then you also have to write the editor program, or a plugin to export it from another editor, which is a pain.

after you have tried some of these things, more specific questions will hopefully be answered here for you in a nicer manner.

Share this post


Link to post
Share on other sites
zander76    122
Hey dude..

I have been working on a model format now. Its part of my engine for opengl. I have been using flexporter with 3dstudios. I would love some help with this. I have a fair amount done already. Email me at zander@echotech.ca

Later, ben

Share this post


Link to post
Share on other sites
zander76    122
Oh, almost forgot.

May i remind everybody about learning GL is a lot like learning c++. At first you are scared of it then after a few months you start to get a good grip, you have the syntex down and know a few things. At that point you start to wonder what seperates you from the game programers and have no idea how to get there. Its not until you have been doing it for the next few months and you are wondering why your copy of pong is not running as fast as quake as you start to realize that you don''t know anything and now is the time to really learn.
I am getting the feeling he is at the last stage. Hes got the syntex and starting to feel confortable and wants to know what the next step is.

Later, ben

Share this post


Link to post
Share on other sites
lobravo    122
Vish''s prob is the same of mine. I''m tryin to discover how to read models. I want to know the model first. After i try to use some ready code!

Share this post


Link to post
Share on other sites
starboarder    122
quote:
Original post by zander76
At that point you start to wonder what seperates you from the game programers and have no idea how to get there. Its not until you have been doing it for the next few months and you are wondering why your copy of pong is not running as fast as quake as you start to realize that you don''t know anything and now is the time to really learn.
I am getting the feeling he is at the last stage. Hes got the syntex and starting to feel confortable and wants to know what the next step is.


If he feeling comfortable with OpenGL why doesnt he start learning a little bit about culling?

here are some links:
http://www.gamedev.net/reference/programming/features/quadtrees/
http://www.flipcode.com/misc/SamuelRanta-Eskola_BSPTrees.pdf
http://crystal.sourceforge.net/csdocs/portal.html

Implamenting quadtree culling in your terrain renderer isnt as hard as you would think it is.




www.Vision-Software.org

Share this post


Link to post
Share on other sites
Nemesis2k2    1045
Well the first thing I did when I reached this stage was start making a project. I personally made a 3D solar system thingy, but you might prefer to make a game or something. Just choose something like remaking pacman or tetris or the like. You''ll find each project has it''s own set of challenges. With pacman for instance you might choose to look into some simple AI approaches to get your ghosts to navigate the maze. When you start making a full blown project, I can guarantee you''ll run into difficulties you wouldn''t have considered when running small test apps.

Once you''ve done a bit of playing around and made a few small projects (don''t underestimate how important it is to do this) I''d suggest learning about vector/matrix math, and all the cool stuff that flows on from that, like culling, ray tracing, and collision detection. Once you''re down with most of this, make your own set of classes to do this math, and build yourself a simple raytracer and/or collision system.

Share this post


Link to post
Share on other sites
cignox1    735
If some basic informations about a model are enaught for you (vertices, UV coords, textures uset by the model, normal, ...) you can try to write a simple script for 3DStudio. Some time ago I did this and I found it not too complex (10/15 hours to learn basic concepts and write the script). My script simply wrote a text file with those informations. Loading it is then very simple. You could do this till you feel to be ready for something more advanced.
Just to test your program with a differten model (bored by cubes?:-)
Good Luck!

Share this post


Link to post
Share on other sites
kenjin    122
I think its best just to get the concepts
of how open gl works and then to start doing
some projects using the opengl features.

Do a cool project wher you can display
an object then add texures and then environment mapping.
come up with your own coloring scheme. Also
study light physics such as reflection and refraction.
I thinks thats good for the basics. plus its fun.

Share this post


Link to post
Share on other sites

  • Partner Spotlight

  • Similar Content

    • By pseudomarvin
      I assumed that if a shader is computationally expensive then the execution is just slower. But running the following GLSL FS instead just crashes
      void main() { float x = 0; float y = 0; int sum = 0; for (float x = 0; x < 10; x += 0.00005) { for (float y = 0; y < 10; y += 0.00005) { sum++; } } fragColor = vec4(1, 1, 1 , 1.0); } with unhandled exception in nvoglv32.dll. Are there any hard limits on the number of steps/time that a shader can take before it is shut down? I was thinking about implementing some time intensive computation in shaders where it would take on the order of seconds to compute a frame, is that possible? Thanks.
    • By Arulbabu Donbosco
      There are studios selling applications which is just copying any 3Dgraphic content and regenerating into another new window. especially for CAVE Virtual reality experience. so that the user opens REvite or CAD or any other 3D applications and opens a model. then when the user selects the rendered window the VR application copies the 3D model information from the OpenGL window. 
      I got the clue that the VR application replaces the windows opengl32.dll file. how this is possible ... how can we copy the 3d content from the current OpenGL window.
      anyone, please help me .. how to go further... to create an application like VR CAVE. 
       
      Thanks
    • By cebugdev
      hi all,

      i am trying to build an OpenGL 2D GUI system, (yeah yeah, i know i should not be re inventing the wheel, but this is for educational and some other purpose only),
      i have built GUI system before using 2D systems such as that of HTML/JS canvas, but in 2D system, i can directly match a mouse coordinates to the actual graphic coordinates with additional computation for screen size/ratio/scale ofcourse.
      now i want to port it to OpenGL, i know that to render a 2D object in OpenGL we specify coordiantes in Clip space or use the orthographic projection, now heres what i need help about.
      1. what is the right way of rendering the GUI? is it thru drawing in clip space or switching to ortho projection?
      2. from screen coordinates (top left is 0,0 nd bottom right is width height), how can i map the mouse coordinates to OpenGL 2D so that mouse events such as button click works? In consideration ofcourse to the current screen/size dimension.
      3. when let say if the screen size/dimension is different, how to handle this? in my previous javascript 2D engine using canvas, i just have my working coordinates and then just perform the bitblk or copying my working canvas to screen canvas and scale the mouse coordinates from there, in OpenGL how to work on a multiple screen sizes (more like an OpenGL ES question).
      lastly, if you guys know any books, resources, links or tutorials that handle or discuss this, i found one with marekknows opengl game engine website but its not free,
      Just let me know. Did not have any luck finding resource in google for writing our own OpenGL GUI framework.
      IF there are no any available online, just let me know, what things do i need to look into for OpenGL and i will study them one by one to make it work.
      thank you, and looking forward to positive replies.
    • By fllwr0491
      I have a few beginner questions about tesselation that I really have no clue.
      The opengl wiki doesn't seem to talk anything about the details.
       
      What is the relationship between TCS layout out and TES layout in?
      How does the tesselator know how control points are organized?
          e.g. If TES input requests triangles, but TCS can output N vertices.
             What happens in this case?
      In this article,
      http://www.informit.com/articles/article.aspx?p=2120983
      the isoline example TCS out=4, but TES in=isoline.
      And gl_TessCoord is only a single one.
      So which ones are the control points?
      How are tesselator building primitives?
    • By Orella
      I've been developing a 2D Engine using SFML + ImGui.
      Here you can see an image
      The editor is rendered using ImGui and the scene window is a sf::RenderTexture where I draw the GameObjects and then is converted to ImGui::Image to render it in the editor.
      Now I need to create a 3D Engine during this year in my Bachelor Degree but using SDL2 + ImGui and I want to recreate what I did with the 2D Engine. 
      I've managed to render the editor like I did in the 2D Engine using this example that comes with ImGui. 
      3D Editor preview
      But I don't know how to create an equivalent of sf::RenderTexture in SDL2, so I can draw the 3D scene there and convert it to ImGui::Image to show it in the editor.
      If you can provide code will be better. And if you want me to provide any specific code tell me.
      Thanks!
  • Popular Now