Public Group

# New-b help needed

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

## Recommended Posts

I've been learning c++ and got it pretty well understood. I wanted to start game programming, and have made some little opengl applets. I do not understand how to load 3-d models from a modelling program ( I'm using blender3d ). I have been reading nehe's tutorial for loading milkshape models and can't comprehend it at all =S. Furthermore I am not entirely sure how to make an opengl object a variable (i.e: if I wanted to make the ogl object move). Any help would be greatly appreciated. Thx, Jdude :-)

##### Share on other sites
few questions:
how long did you do normal c++

did you do 2d? if not do that 1st

do you know the math for a 3d game? physics, calc and such

if you dont get opengl, do what I am doing, SDL. cone3d.gamedev.net SDL is an easier library than openGL.

##### Share on other sites
If you want to load a geometric model in your app you have many options. The most used is writing the loader for a specific format (i.e. 3ds -you will find thousands of them on Internet-). Another way is to write a plug-in (or a simple script, if supported) for the 3d-program you use, and store in a txt file the data you need (i.e. coords, normal, uv, texture name, surface properties). Loading it is then pretty easy.

If you want to create a OGL model that you can move, rotate etc. you need to store its vertices in model space (that is, in the local space, as you loaded them from the file) and its position in the world space (the scene-space containing all your objects). With the position you keep also the rotation. With these two values you build the transformation matrix (typically, for an object, pos, rot, scale) and apply it on the vertices. The result is the list of the transformed vertices, that is what you want.

Model Space --> Transformation Matrices --> World Space

##### Share on other sites
Quote:
 Original post by game mercenaryfew questions:how long did you do normal c++did you do 2d? if not do that 1stdo you know the math for a 3d game? physics, calc and suchif you dont get opengl, do what I am doing, SDL. cone3d.gamedev.net SDL is an easier library than openGL.

question 1: 3 years

question 2: no, I never really had an interest in 2d, but if you say it will help then o.k.

question 3: I have a pretty firm grasp of physics and am very good with mathematical calculations.

Quote:
 you need to store its vertices in model space (that is, in the local space, as you loaded them from the file) and its position in the world space (the scene-space containing all your objects). With the position you keep also the rotation. With these two values you build the transformation matrix (typically, for an object, pos, rot, scale) and apply it on the vertices. The result is the list of the transformed vertices, that is what you want.Model Space --> Transformation Matrices --> World Space

Uhhh....I have no idea what you are talking about (no offense), but could you use real world analogies.

##### Share on other sites
Quote:
Original post by jdude

Quote:
 you need to store its vertices in model space (that is, in the local space, as you loaded them from the file) and its position in the world space (the scene-space containing all your objects). With the position you keep also the rotation. With these two values you build the transformation matrix (typically, for an object, pos, rot, scale) and apply it on the vertices. The result is the list of the transformed vertices, that is what you want.Model Space --> Transformation Matrices --> World Space

Uhhh....I have no idea what you are talking about (no offense), but could you use real world analogies.

Model space and world space are basically two ways of describing where things are located. In object space, things are described relative to that object. For example, there is a mini-fridge on my desk next to my computer. Relative to me, that object is located forward and a bit to the left. But world space, things are located relative to the world. So the fridge, instead of being forward and to the left, is described as being in the basement of the building where I work.

A transformation is a matrix that can switch a representation from object space to world space. When you specify your model, you specify it in object space. Then, you apply a transform that will place that object in a desired place in your world space.

##### Share on other sites
thanks for the translation, I get it now :-):-)

##### Share on other sites
Sorry if my reply was a bit criptic: It was late (here in italy). If you need to get into graphic look for some free avaiable resources on Internet (search for Zed3D).
Anyway if you have good math. skills, you will have no problems (of course, I've had a lot of problems :-(
Good luck!

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631781
• Total Posts
3002319
×