OpenGL Confusion

Member
Posts: 277
Joined: 2004.10
Post: #1
PowerMacX Wrote:* The texture path shouldn't be absolute!!!!! Otherwise the game will only run on players with the same username as the developer >Relative paths<
* Why do you need an "$endface" when $Face already indicates the number of vertex?
* Why use such long "tag" names?
* Why use @s and $s?
* ASCII format is interesting, but it's unrealistic to expect writing your 3D models by hand in a text editor, so it doesn't need to be so "verbose" (ie. in obj you use "v" for vertex, "t" for texture, and so on)



That was just an example...

this is what something OpenGL compatible would be like...

$Face=4 means that there are 4 vertices per face... (multiple faces in object)
the bones would be constructed that all faces that were "BoneSet" would be
a part of that bone.

Direct Translation of $Face=4:
glBegin(GL_QUAD);
.
.
.
.
glEnd();


Basicly the "example" would have a direct translation...
(except the bone which would need a library Smile)

There would also be no text it would just be binary...
(and you could write an exporter for it)

I put it in plain terms so that everybody would look at it and go
THAAAAATS BAAAAAD!!!!!!!! Grin

Most direct translations of binary, OpenGL, etc. etc. don't look good.

The $ meant a closing tag needed.
and @ meant uses current tags.

as, for the texture path that would be relitive of the objects current location.

I learned that scaring poeple with really bad coding, is that they look at
stuff more closly LOL

Global warming is caused by hobos and mooses
Quote this message in a reply
Member
Posts: 277
Joined: 2004.10
Post: #2
cheetah3d Wrote:Binary rules

I do, don't I LOL


One question,
are the objects going to be placed exactly where shown (glVertex3f(1.02, 5.487, 9.486))
or translated to the spot that they lay. (glTranslatef(1.02, 5.487, 9.486)Wink
Huh

Global warming is caused by hobos and mooses
Quote this message in a reply
Member
Posts: 277
Joined: 2004.10
Post: #3
Are you drawing:
Code:
glBegin(whatever);
glVertex3f(Object.face[1].Point[1].x, Object.face[1].Point[1].y, Object.face[1].Point[1].z);
glVertex3f(Object.face[1].Point[2].x, Object.face[1].Point[2].y, Object.face[1].Point[2].z);
glVertex3f(Object.face[1].Point[3].x, Object.face[1].Point[3].y, Object.face[1].Point[3].z);
glVertex3f(Object.face[1].Point[4].x, Object.face[1].Point[4].y, Object.face[1].Point[4].z);
glEnd();

Or is it going to be:

Code:
glTranslatef(Object.face[1].x, Object.face[1].y, Object.face[1].z);
glRotatef(Object.face[1].xRot, Object.face[1].yRot, Object.face[1].zRot);
// (if we want to rotate)




Why I'm asking is about the veiwing methods
(do I need to use trig or glRotatef for my veiw methods)

FreakSoftware Wrote:You translate to where you want the center of your model to be, and each vertex would map directly to a glVertex call.

Yes, I wanted to know if the objects will be placed with a glVertex call or a glTranslatef?

This is the difference of how you implement a camera. (needed in "most" 3D games)

Global warming is caused by hobos and mooses
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
Ignore Spike, he doesn't know what he's talking about, but feels compelled to make inane noise anyway.

Spike, before you make even more of a fool of yourself, go away and learn OpenGL.
Quote this message in a reply
Member
Posts: 277
Joined: 2004.10
Post: #5
I was just asking if this file format will set the location by glVertex or glTranslatef???

That will mean the difference on the camera ???

if you use glVertex then the center of the object is 0,0,0 if you use glTranslatef the center of
the object is where the center of the object looks...

OneSadCookie Wrote:go away and learn OpenGL.

So, I don't know how to use fog... Huh

Global warming is caused by hobos and mooses
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
BinarySpike Wrote:I was just asking if this file format will set the location by glVertex or glTranslatef???

the mere fact that you would ask that question, whatever it might mean, shows clearly that you don't know what you're talking about.

the only way to make a vertex in OpenGL is with glVertex or equivalent. glTranslatef does not make vertices.

the file format will not know anything about glVertex or glTranslatef; those are the province of a renderer for the format.

roughly speaking, the file format will provide the data to be passed by a renderer to glVertex.
Quote this message in a reply
Member
Posts: 715
Joined: 2003.04
Post: #7
OSC don't be a giant gaping ass. I know its hard, but rub around the edges and you'll tighten up a bit.
Quote this message in a reply
Member
Posts: 277
Joined: 2004.10
Post: #8
OneSadCookie Wrote:the only way to make a vertex in OpenGL is with glVertex or equivalent. glTranslatef does not make vertices.

I want to know how you move the object with a simulated camera...

glVertex means (without translation) where the objects vertexes lay,
glTranslatef means where the vertexes lay AFTER you call glVertex.

Lets say I create four cubes about 1.0 away (on all four sides), will
the cubes be translated to that spot (meaning the center is at the center of the cube)
or will they just be drawn there (meaning the center is at 0,0,0)???

I would have to use some math functions on the vertex locations if
they aren't translated (for a camera).
But if they are translated to the spot wanted I just have to use glRotatef.


Basicly is this format going to use glVertex calls to locate its objects
or is it going to use glTranslatef (glRotatef too) to locate its objects???

(*locate* NOT create vertexes)

BinarySpike Wrote:This is the difference of how you implement a camera. (needed in "most" 3D games)

Global warming is caused by hobos and mooses
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #9
BinarySpike Wrote:Basicly is this format going to use glVertex calls to locate its objects or is it going to use glTranslatef (glRotatef too) to locate its objects???
Is there any 3D model format that stores its models with an absolute location and rotation? Why would one even want to?
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #10
BinarySpike Wrote:Basicly is this format going to use glVertex calls to locate its objects
or is it going to use glTranslatef (glRotatef too) to locate its objects???

(*locate* NOT create vertexes)
All formats specify vertices of models in what is called "model space". That is specifying all coordinates of the model in relation to 0,0,0 as far as the model knows. glVertex is what you call to specify model coordinates. glTranslate, rotate, and scale are what you call to tell OpenGL how you would like those model coordinates transformed into "world space" coordinates, including how you would like to simulate where your virtual camera is. The format can also specify where you would like to have the model "located" (as you say) in world space, but that has nothing to do with how the model's vertices are specified. There are many, many threads here at iDevGames where the process of specifying coordinates and using them in OpenGL is discussed. We're not trying to do that here, so take a shot at searching for it instead, or start a new thread. I'm sure there are more than a few people around here that can explain it to you or lend a link or two.
Quote this message in a reply
⌘-R in Chief
Posts: 1,260
Joined: 2002.05
Post: #11
BinarySpike Wrote:I want to know how you move the object with a simulated camera...

glVertex means (without translation) where the objects vertexes lay,
glTranslatef means where the vertexes lay AFTER you call glVertex.

....


No, you have this all wrong. This also has nothing to do with the thread topic. Please create another thread if you want to continue asking questions about this.


Quote:Basicly is this format going to use glVertex calls to locate its objects
or is it going to use glTranslatef (glRotatef too) to locate its objects???

From what you're saying, it's clear you have no real idea what glVertex and glTranslate do. I don't mean to be rude, but please stop asking in this thread about this. Refer to OneSadCookie's post.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL/C confusion spsweet 7 4,540 Mar 21, 2007 06:54 PM
Last Post: OneSadCookie
  Confusion about -isFlipped in Cocoa ThemsAllTook 7 5,863 Mar 31, 2006 07:55 AM
Last Post: ThemsAllTook
  Confusion about native pixel format tigakub 3 5,820 May 14, 2002 02:45 PM
Last Post: OneSadCookie