Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Game development Questions. LOTS!


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 SteelBlue   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 August 2001 - 04:36 AM

Ok, what i want to know is, how do you get to manipulate 3d models created in other modeling programs with OpenGL. Do you use OpenGL to do the animation of the models? What exactly does OpenGL do in a game environment? What can a game engine programmed in OpenGL do? Tha Funkalicious one

Sponsor:

#2 Azrael   Members   -  Reputation: 128

Like
Likes
Like

Posted 22 August 2001 - 05:17 AM

Well that depends on the model you are using and what kind of models you want to load. Let me start with the bad news there is no "native" model format for opengl, that means opengl itself doesnt have functions to load and animate models, now those are the bad news. The good news are: they are several programs and examples to do this, check out this site:

nehe.gamedev.net

Specially the game programming tutorials are useful.

Now how to handle those models once they are loaded is a diferent history, but you can find help for that here.

http://www.wiz3domain.com/

Check out the tutorial making a fighting game in 7 days is probably the best tutorial on the subject.

however and just not to answer this question with a bunch of links, the process is something like this.

-You start opengl

-load the model data into an structure (you can use any model format you like, 3ds, msh, mdl, md3, etc) including textures, this structure must have a matrix as well.

(unless you want to use a -model -instance system like power render, which means you will be able to show the same model lots of times as diferent instances, in this case, your matrix must be in the instance instead) so you can store is orientation, scale and position.

-start the main rendering process.

-Whenever you want to render your model you should transform every vertex in your model structure by is model matrix also you should use its texture coordinates to render its textures as well. (simply bind the apropiate texture and render the model with textures on)

-Whenever a control key is pressed, a change in the model matrix must be made, per example the simple resident evil control set
left right rotate the model, up/down keys move the model forward, back wards. (you will need to move the model by its orientation vector)

-repeat until the escape or quit key has been pressed.

this may sound dificult, but since you will have functions, or objects members to do this, once you have them it may be as simple as.

model= new pmodel("ufo.3ds")

model.move (0,0,0);
model.rotate (0,35,0)
model.render

free model

cool uh? =)

start reading those links and check if you find answer to your questions (like vector orientatios) on gamedev article and resources, It will take a bit of time, but eventually you will manage to load and render models for some cool games.

Remember to help gamedev.net donate whatever you can to keep forums such as this up.

Hope that helps.





#3 Azrael   Members   -  Reputation: 128

Like
Likes
Like

Posted 22 August 2001 - 05:17 AM

Well that depends on the model you are using and what kind of models you want to load. Let me start with the bad news there is no "native" model format for opengl, that means opengl itself doesnt have functions to load and animate models, now those are the bad news. The good news are: they are several programs and examples to do this, check out this site:

nehe.gamedev.net

Specially the game programming tutorials are useful.

Now how to handle those models once they are loaded is a diferent history, but you can find help for that here.

http://www.wiz3domain.com/

Check out the tutorial making a fighting game in 7 days is probably the best tutorial on the subject.

however and just not to answer this question with a bunch of links, the process is something like this.

-You start opengl

-load the model data into an structure (you can use any model format you like, 3ds, msh, mdl, md3, etc) including textures, this structure must have a matrix as well.

(unless you want to use a -model -instance system like power render, which means you will be able to show the same model lots of times as diferent instances, in this case, your matrix must be in the instance instead) so you can store is orientation, scale and position.

-start the main rendering process.

-Whenever you want to render your model you should transform every vertex in your model structure by is model matrix also you should use its texture coordinates to render its textures as well. (simply bind the apropiate texture and render the model with textures on)

-Whenever a control key is pressed, a change in the model matrix must be made, per example the simple resident evil control set
left right rotate the model, up/down keys move the model forward, back wards. (you will need to move the model by its orientation vector)

-repeat until the escape or quit key has been pressed.

this may sound dificult, but since you will have functions, or objects members to do this, once you have them it may be as simple as.

model= new pmodel("ufo.3ds")

model.move (0,0,0);
model.rotate (0,35,0)
model.render

free model

cool uh? =)

start reading those links and check if you find answer to your questions (like vector orientatios) on gamedev article and resources, It will take a bit of time, but eventually you will manage to load and render models for some cool games.

Remember to help gamedev.net donate whatever you can to keep forums such as this up.

Hope that helps.





#4 SteelBlue   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 August 2001 - 06:52 AM

Thanks man. That did help a bit. Just another thing, what books do you recommend i read to learn all that good stuff you just mentioned?

Tha Funkalicious one

#5 sjobergh   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 August 2001 - 10:24 AM

I would say the book of "playing-around-with-the-code-yourself"

#6 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 22 August 2001 - 11:58 AM

You DIDNT READ THIS BOOK: "OpenGL Game Programming" by Kevin Hawkins and Dave Astle(GDNet owners!!)???? You better get it!

Its the best book around. By chapter 5 you are already making (lego looking) 3D models. It will answer tons of your questions. If you dont read it, then you dont succeed! lol. No, thats the best book to teach yourself, and its also a good reference.

#7 sjobergh   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 August 2001 - 08:14 PM

Yeah, I''m getting that book next month, woho! :D




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS