Jump to content
  • Advertisement
Sign in to follow this  
caldiar

Questions about 3d Structures and .bmp binding

This topic is 4748 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey everyone I have a couple questions about 3d structures and loading up .bmp files to bind them to the shapes that are drawn to the GLUT window using the vertice information. I have structures made to hold the vertices information, polygon information, texture coordinates information, and object information (the last structure joins together the previous three to make it more manageable) I have a function to load up a bmp file written. My issue is Ill start off a new day knowing EXACTLY what Im going to do and how Im going to do it. I jump into the project and wade my way through the code. However, I get lost and suddenly lose track of what I planned to do and I end p rewriting code over and over again because I think I was going to do one thing and end up doing something else to it that I need to fix. It confuses me a lot and I just want to get a room to load up and get textures bound to the visible surfaces. Because I get confused I get tired of trying to hunt down what it was I was actually going to be doing and then get it done, I get less and less motivated and eventually stop working on it for about a week then get remotivated because I play a game like Zelda Ocarina of Time =) Any suggestions on how to help my confusion and keep me going through this part of my project? I think ill write a step by step design document to get my thoughts in order. Ill also take the current step and write out what Im going to do and what needs to be done before I get to work. Perhaps it will help. Again, any other suggestions are greatly appreciated. Thanks for your time, Brandon Haston

Share this post


Link to post
Share on other sites
Advertisement
Try describing your problem/error in a little more detail, so we can get an idea of what is going wrong.

I find design documents are very nice, but I never write them myself. Where I work, I'm almost always working from a doc, but that's writing business web services in Java. Usually, what I do to keep focused is make a little TODO section whenever you sit down to start coding. Just a list of all the things you want to accomplish. Of course, it is very easy to get sidetracked, especially when you get bugs that are hard to track down... A lot of this will get a lot easier to understand as you gain experience.

My advice would be to just start from a nehe tutorial, maybe the .OBJ file tutorial, or the .3DS one. Or you can write your own file format, which I think you did, but getting a modeling program/etc to write to that format is added work.

Share this post


Link to post
Share on other sites
Thank you for the reply. I got called from the computer by another student and accidently changed the subject of what I was going to say lol.

Anyways what I said above, I get distracted easily and I wanted some suggestions on how to fix that =) Sort of hard to compile a game that is composed of fragmented functions due to getting sidetracked during the writing lmao.

As for file format the structures were originally created not to creat my own format but to tell OpenGL that there is a 3d environment. I found a nice 3ds loader that works great but I suppose I want to edit that loader so that it loads up the map file from lesson 10 of nehe.gamedev.net's tutorials.

If you would like I could send you the source code and maybe you could help me out a little more?

Thanks again for the reply =)

~Brandon Haston~

Share this post


Link to post
Share on other sites
Quote:
Original post by caldiar
Thank you for the reply. I got called from the computer by another student and accidently changed the subject of what I was going to say lol.

Anyways what I said above, I get distracted easily and I wanted some suggestions on how to fix that =) Sort of hard to compile a game that is composed of fragmented functions due to getting sidetracked during the writing lmao.

As for file format the structures were originally created not to creat my own format but to tell OpenGL that there is a 3d environment. I found a nice 3ds loader that works great but I suppose I want to edit that loader so that it loads up the map file from lesson 10 of nehe.gamedev.net's tutorials.

If you would like I could send you the source code and maybe you could help me out a little more?

Thanks again for the reply =)

~Brandon Haston~


no, i think we get the point. try opening the file in nehe's tutorial in notepad and looking at the fields and figuring out what they mean. after you figure what each field means you should be able to develop a simple loader. if not try this: develop a text file that you can load and display vertices in an opengl program. after that improve the loader/format to include texture coordinates, after that add normals and after that materials. after all this i promise that you will be able to load any text (and most binary) file formats just by looking at them (except for .x, which is a crack head file format and you must smoke the crack to be able to load).
trust me. it's not hard, but you must dig in to understand the 3D file formats that are around.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!