PDA

View Full Version : is it possible to have vertex normals or even face normals using triangle strips nt



wildeyedboyfromfreecloud
03-16-2002, 12:00 PM
nt

richardve
03-16-2002, 12:26 PM
yip.

wildeyedboyfromfreecloud
03-16-2002, 01:15 PM
i don't suppose you would care to elaborate by any chance, would you?

Gorg
03-16-2002, 01:22 PM
Please refer to a basic opengl book to get your answer.

wildeyedboyfromfreecloud
03-16-2002, 01:26 PM
some of us are not so priveledged to afford textbooks like they grow on trees. be a lamb and ablige me. or tell me something i don't know. no offense... i'll never understand people. forget it.

Gorg
03-16-2002, 01:36 PM
Sorry for your money trouble.

You know the internet is an amazing resource too.

Red book online. http://ask.ii.uib.no/ebt-bin/nph-dweb/dynaweb/SGI_Developer/OpenGL_PG/

wildeyedboyfromfreecloud
03-16-2002, 01:41 PM
so can people be if they want to. i really apreciate the link btw.

michael

ps: money causes money trouble. i'd rather do without more or less

[This message has been edited by wildeyedboyfromfreecloud (edited 03-16-2002).]

wildeyedboyfromfreecloud
03-16-2002, 01:47 PM
i've never seen an online textbook. a professor of mine told me it was illegal. i'm a real textbook nut. can't get enough of them. but the price tags keep me at bay. is there anywhere online with other types of textbooks.

wildeyedboyfromfreecloud
03-16-2002, 01:55 PM
i honestly couldn't find my answer there. can we be a little less esoteric and just spill the beans so to speak. a hint maybe. or is someone mocking me?

Gorg
03-16-2002, 02:06 PM
All right. You need to read between the lines.

The type of primitive you use has nothing to do with normals.

In Opengl, you can have one normal per-vertex you send.





//METHOD 1
glBegin(GL_WHATEVER);
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
glEnd();

//METHOD 2
float* arrayOfVertices = { x, y, z, .... };
float* arrayOfNormals = { nx, ny, nz };

glVertexPointer( ..., arrayOfVertices );
glNormalPointer( ..., arrayOfNormal );

glDrawArrays( GL_WHATEVER ) ;

METHOD3
ushort* indices = { i1, i2 ... }float* arrayOfVertices = { x, y, z, .... };
float* arrayOfNormals = { nx, ny, nz };

glVertexPointer( ..., arrayOfVertices );
glNormalPointer( ..., arrayOfNormal );

glDraw*Elements( GL_WHATEVER, ..., indices ) ;



Not sure why I typed all this. I must be too nice.

And if it is not already obvious : This really is basic understanding of the API.


[This message has been edited by Gorg (edited 03-16-2002).]

[This message has been edited by Gorg (edited 03-16-2002).]

wildeyedboyfromfreecloud
03-16-2002, 02:13 PM
you don't have to patronize me.
so you are saying what exactly. you can pass in an array of normals. and it will just go down the list for each vertex. like

glNormalfv(a)
glNormalfv(b)
glNormalfv(c)

glVertex3f(a)
glVertex3f(b)
glVertex3f(c)

so if i passed that down the glpipeline they would be matched with their respective character? or have i misinterperted you.

wildeyedboyfromfreecloud
03-16-2002, 02:22 PM
couldn't you just have shown me what it would look like for a triangle strip? like where you define a triangle. and then just the unique verticies from then on. where would you stick the normals? i'm having difficulty understanding how your code relates to triangle strips as in
glBegin(GL_TRIANGKE_STRIPS);

zen
03-16-2002, 03:49 PM
If you don't use vertex arrays all you have to do is supply one normal per vertex as usual.
like:
glBegin(GL_TRIANGLE_STRIPS);
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
.
.
.
glEnd();

Did you try that allready?As Gorg said the primitive you use is irrelevant.

fenris
03-16-2002, 04:07 PM
What you need to realize, Michael, is that OpenGL is a state machine. For example:



glNormal3f(nx, ny, nz);

glBegin(GL_TRIANGLE_STRIP);
for( ... ) {
// draw a bunch of vertices
}
glEnd();


The first normal I passed at the beginning of that block of code will be used for each vertex i passed in the for() loop. It will only change if I submit another normal to OpenGL, and draw some more primitives. So for face/surface normals, you would pass GL the surface normal, and then draw the verts for the surface. Or for vertex normals, pass a normal for each vertex like:



glBegin(GL_TRIANGLE_STRIP);
for( ... ) {
glNormal3f(nx, ny, nz);
glVertex3f(vx, vy, vz);
}


Hope that helps.

wildeyedboyfromfreecloud
03-16-2002, 06:07 PM
i don't think anyone here understands at all what i am asking. i hate to be rude. but your replys are all very elementary and rather insulting to my intelligence. have any of you ever used triangle strips. for instance. say you provide 25 verts. that yield say oh around 23~24 faces. do the math. now ask yourself where in the code you are going to fit in say 75 normals... now maybe i hope you understand the delimma.

Gorg
03-16-2002, 09:00 PM
This is not what I understood from your question and it seems like everybody else did not either. So maybe your question was not that clear.

For your problem, you have 2 solutions :

1. You repeat the vertices when the normals are different.
2. You average the normals. Example : if you vertex is part of 3 faces, you average the normal of the 3 faces use it has the vertex normal.

richardve
03-16-2002, 09:31 PM
Originally posted by wildeyedboyfromfreecloud:
i don't think anyone here understands at all what i am asking. i hate to be rude. but your replys are all very elementary and rather insulting to my intelligence.

The reason I replied with 'yip' is because you did the same in your first post.

When asking a question on a forum it's usually normal to use the message body itself to explain what you'd like to know.
(in more than one line please)

I really don't understand why people are doing these 'no text' posts..
Are they just lazy?
Well, if that's the case, they should also expect a lazy answer.

I hope you can understand that.

wildeyedboyfromfreecloud
03-17-2002, 08:24 AM
well my apologies. no text posting is typical on most more casual boards i've frequented in the past. its actually an atempt to be considerate to the readers on the front end so that they are not required to follow up just to find that the subject has been reiterated and their time wasted. now richardve if you havet he answer i'm looking for i'd apreciate it. i assumed that anyone replying to the origional post would be familiar with triangle strips and have successfully utilized proper lighting normals in tandum with the triangle strip or even texture coordinates. i'm currently using the triangle strip. because it seems a highly effecient construct over the redundant vertex calls to opengl. but i'm not sure where to stick normals. and i can't find any documentation on the matter. and i really don't have the time to experiment with it to find an answer. if it is possible i would even consider writing a file exporter that saves my geometry in triangle strip format if possible. because i'm always trying to speed up my performance. i suppose i could just try in the case taht no one seems to know. i know glut uses triangle strips sometime for tesselation so the library must have some convention for applying normals. on that note. i'm just curious. how open is opengl. is the uncompiled source code available somewhere. i would really like to see that.
my sincerest apologies par usual

michael

davepermen
03-17-2002, 08:39 AM
not the time or not interested in finding it out yourself?

think about it again, its a statemachine.
what you wanna set in the states is your problem, and its ****in simple to find the solution http://www.opengl.org/discussion_boards/ubb/wink.gif

wildeyedboyfromfreecloud
03-17-2002, 08:48 AM
not the time to reinvent the wheel unnecesarrily. my apogies. i can only imagine what a state machine is. but i just don't see how it can be done. there is only one solution i can think of. and i don't think it could work.

glBegin(GL_TRIANGLE_STRIP)

//first triangle

glVertex()
glVertex()
glVertex()

//second triangle

glVertex()

//3rd triangle

glVertex()

//4th triangle

glVertex()

//5th triangle

glVertex()...


thats how it works. now tell me where to put the normals. i happen to think this is a very legitamate question.
never meant to offend,

michael

[This message has been edited by wildeyedboyfromfreecloud (edited 03-17-2002).]

kehziah
03-17-2002, 09:03 AM
Where's the 'crappy post' button?

wildeyedboyfromfreecloud
03-17-2002, 09:17 AM
would this work? assuming all like verticies all share the same texture coordinates. and have averaged normals

glBegin(GL_TRIANGLE_STRIP)

//first triangle

glNormal()
glTexCoord()
glVertex()
glNormal()
glTexCoord()
glVertex()
glNormal()
glTexCoord()
glVertex()
glNormal()

//second triangle

glNormal()
glNormal()
glNormal()
glTexCoord()
glVertex()

//3rd triangle

glNormal()
glNormal()
glNormal()
glTexCoord()
glVertex()

//4th triangle

glNormal()
glNormal()
glNormal()
glTexCoord()
glVertex()

//5th triangle

glNormal()
glNormal()
glNormal()
glTexCoord()
glVertex()...

thats the only solution i can imagine. and it is so implausable i don't even feel like trying it.

[This message has been edited by wildeyedboyfromfreecloud (edited 03-17-2002).]

wildeyedboyfromfreecloud
03-17-2002, 09:33 AM
not to be rude but this is getting rediculous. if you do not know the difference between GL_TRIANGLES and GL_TRIANGLE_STRIP... then please don't comment. no offense. its not like it matters if you know or not. but obviously you can't very well answer my question if you don't.
same goes with GL_TRIANGLE_FAN. i hear that ROAM algorithms can be further optimized with this. but i'm not sure how you would implement normals. hm i don't know. i will just try using the same normals from my previous vertecies and see what it looks like. may be good enough.

zed
03-17-2002, 09:41 AM
>glNormal()
glNormal()
glNormal()
glTexCoord()
glVertex()<<

mate u do obviously need to read the red book. (buy it i still use it even now 4 years after i brought it nearly every day)
anyways with vertex arrays + tri_strips having face normals is NOT possible (for obvious reasons) having vertex normals is

wimmer
03-17-2002, 09:45 AM
You cannot specify separate normals for the triangles in a triangle strip. Think of a triangle strip as a bunch of {normal/texcoord/vertex}-bundles. So, each new vertex you specify goes with exactly one normal. If you need different normals for the vertices, you can't use a triangle strip (e.g., in the case of hard edges). You can't triangle strip a lit cube, for example...

Michael

wildeyedboyfromfreecloud
03-17-2002, 09:47 AM
thanks. thats why i posed it as a simple question. yeah i wish i had a copy of the red book. but i wish i had a lot of things. but i have priorities. and then their is reality. circumstances are not always perferct know what i mean. maybe someday. but i get by.

also if someone would have said origionally that it is not possible. i would have been satisfied. what about shadow maps. i honestly don't know what those really are. haven't looked into them.

also in my humble opionion it would be pleasant if this boards denizens were a tad less condescending. and no i did not imagine for a second that formulation would work zed. and i gather the red book is just a bunch of common sense for the most part.

[This message has been edited by wildeyedboyfromfreecloud (edited 03-17-2002).]

kehziah
03-17-2002, 09:55 AM
this is getting ridiculous

You are ridiculous posting these kind of questions in the advanced forum (yes, your question about back face culling was as inadequate as this one for the advanced forum).

And everybody has priorities. Having your own does not give you the right to consider contributors being at your service.

wildeyedboyfromfreecloud
03-17-2002, 10:07 AM
no comment

davepermen
03-17-2002, 10:11 AM
you dont have a copy of the red book?
everyone has..
its online, on the web, for free

where? i dont tell you, i dont have time to do so..

and learn what a ****in statemachine is, its soooooooo easy http://www.opengl.org/discussion_boards/ubb/smile.gif

and why asking simple questions in the advanced board all the time?

knackered
03-17-2002, 10:16 AM
He was given a link to the online red book by gorg near the beginning of this ridiculous thread.
I don't know, I must be getting old.

wildeyedboyfromfreecloud
03-17-2002, 10:22 AM
you know this is probably why i'm not terribly fond of people. who knows? crowded places give me the creaps. i need a sabatical from this board. sayanora minasan

talk amongst yourselves.
no hard feelings

painterb
03-17-2002, 12:17 PM
wildeyed....

Hopefully you found the answer in this thread. It's in there (barely), though I notice not one single person gave you a useful, simple reply.

Zen was the most useful by giving you this code:
glBegin(GL_TRIANGLE_STRIPS);
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
.
.
.
glEnd();

To make the pattern more obvious, you do it this way:
glBegin(GL_TRIANGLE_STRIPS);
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
glNormal3f( nx,ny,nz );
glVertex3f( x, y, z );
.
.
.
glEnd();

Now when OpenGL reuses 2 vertices from the strip, along with a 3rd vertex you just sent it to draw a triangle, it will *also* reuse the 2 normals (and 2 sets of tex coords) that were associated with those vertices. You don't have to worry about resending those normals.

Now, if you actually *want* two different normals for one vertex (for example, two adjacent faces of a cube), you can't use a single tri-strip. You will need to use multiple tri-strips, one to draw each face.

I hope that's clear enough. If not, tell me and I will try again ... happily I might add.

It's too bad you didn't pose this question a year or two ago. Back then, this forum was frequented by mostly very pleasant people. Over the last 3 or 6 months though, the quality and friendliness of the people and replies seems to have dropped through the floor. It seems everyone here (well, at least the vocal ones) would rather play "Advanced OpenGL topic"-police and stroke each other, than to actually HELP someone. That's a shame. Afterall, they spend far more time typing a hateful reply than they would pressing the down-arrow key to scroll to the next question.

I do understand their frustration ... there have been many "non-advanced" questions posed here lately. But there is a right way to respond (nicely, patiently pointing people in the right direction) and a wrong way to respond (what you got, which sadly now seems to be the norm on this board). The mailing list for wxWindows (wxwindows.org) could be used as an example of how to politely handle beginner questions.

I would like to suggest perhaps an "Intermediate OpenGL questions" forum, to go with the Beginner and Advanced forums. Maybe that would help alleviate some problems? What was that moderator's email address again? I no longer have it, but I would happily suggest it.

If you have any more OpenGL questions, go ahead and email me directly (see profile). I may not have all the answers for you, but at least I won't be a jackass about it.

You may also want to try asking at openglforums.com (I believe it is new). I'm hoping the attitude there will be significantly more adult than it is here.

Good luck with your coding!

Brett

painterb
03-17-2002, 12:20 PM
Oh, nice tip about the Red Book being online Gorg!

I never would have guessed it would be available electronically. My own copy is getting worn out almost beyond use.

davepermen
03-17-2002, 12:40 PM
about the lovely online redbook
nearly everyone of us started somehow with nehes tutorials, or at least have seen them.
on his page are tons of nice links to helpful opengl-pages, one of those links is called RED BOOK, one BLUE BOOK
guess where they href to?

about the not friendly post of mine above
sorry for not beeing friendly. its just annoying to see such a tone in this forum right from the beginning..

and, not bad ment, wildeyedboyfromfreecloud, but most of the questions don't sound very advanced, not important if they are for you or not. and your tone is sort of arogant, too. this _sounds_ like a newby wanna sound big.. wich is, as you know yourself, not accepted anymore in the advanced forums in opengl.org..

but i see the problem myself as this post is getting bigger and bigger.. if i get some more "motivation" i'll write tutorialpages about the most asked questions in this ****in forum..

it was so cool before nvidia had such nice extensions and everyone moved here in http://www.opengl.org/discussion_boards/ubb/wink.gif opengl is now much too mainstream http://www.opengl.org/discussion_boards/ubb/smile.gif

Gorg
03-17-2002, 12:41 PM
Originally posted by painterb:
Oh, nice tip about the Red Book being online Gorg!

I never would have guessed it would be available electronically. My own copy is getting worn out almost beyond use.

Yes it is nice. The blue book is also online by the way.

ecarter
03-17-2002, 01:04 PM
Gorg,

Is the red book for OpenGL 1.2 online by any chance?

knackered
03-17-2002, 02:33 PM
Painterb said:-


though I notice not one single person gave you a useful, simple reply.


Err...I believe the number of useful replies is in double figures for this thread.
I was bored this evening, so I've read 'em all...sound advice was delivered with a cautionary rhetoric, all trying to steer this guy into doing *some* research into the subject of opengl.
Is that unreasonable?

Please, explain to me about the flowers - how do they know when to grow?
Books?! You're saying people have written books on the subject?!! Wow. But once again, please tell me about the flowers, how do they know when to grow? Don't shout, I'm only asking about the flowers....

It's like talking to a mental patient.

Mind you, it's entertaining enough, when you've nothing better to do - but it will annoy me the next big deadline I get.

Zak McKrakem
03-17-2002, 02:34 PM
This guy, wildeyedboy..., is going to ignore your suggestions about posting in the beginners forum (he is doing it from his first post). He is also ignoring your links or suggestions about the red book, nehe tutorials or similars. He just want you to write the code so he has nothing to think.
This question can be answered by most of the beginners programmers.
The only suggestion I can do about him is to ignore his questions.

Gorg
03-17-2002, 02:46 PM
Originally posted by ecarter:
Gorg,

Is the red book for OpenGL 1.2 online by any chance?

I don't think so.

wildeyedboyfromfreecloud
03-17-2002, 05:41 PM
what is this, a gentleman lurks in your midst. i will have to take you up on that painter. i'm not much for adressing crowds. too many people in one place... there's bound to be something not good afoot. purely in defense of myself. i've glossed over much of the topics on this board just to see if i might catch some good ideas. and i must admit i didn't see a single one that seemed more beginner or more advanced to me. and the majority were what i can only describe as well below the cognitive level of this query which by the way originated as an offshot question of whether or not opengl supports any type of method of supplying normal data to triangle strips. which is logical to think that it might. i mean somewhere the origional verts have to be reiterated. so it wouldn't be a far cry to supplement normal data somewhere. and i wouldn't be surprised if it is possible. and none of the self ordained advanced crowd are unaware of. i could as well add that seemingly only 15% of your crue seemed to be able to discern the difference between GL_TRIANGLE_STRIPS and GL_TRIANGLES. but i fear i'm being ugly. so i digress. my sincerest apologies for any transgressions. i place the blame entirely upon my ignorance.
i gave up pleasing everyone a long time ago.
ciao

michael

wildeyedboyfromfreecloud
03-17-2002, 05:44 PM
btw... can the opengl source code be procured anywhere?

zeckensack
03-17-2002, 05:51 PM
Originally posted by wildeyedboyfromfreecloud:
btw... can the opengl source code be procured anywhere?

OpenGL is just a spec these days. Most implementations are hardware drivers and not available as source. You should try to get a hold of the Mesa (http://www.mesa3d.org/) sources, that's the only open source implementation that comes to mind right now. Maybe even the sources for the old SGI software implementation are still floating around, but I doubt it.

wildeyedboyfromfreecloud
03-17-2002, 05:59 PM
hey that looks really cool. i will look into it. so much to do so little time http://www.opengl.org/discussion_boards/ubb/frown.gif. i've heard and read of mesa in the past. well honestly thats about all i have to say about that. thanks i really apreciate. is the opengl liscense not really free. or is it just discontinued?

wimmer
03-17-2002, 10:09 PM
yes, the SGI OpenGL Sample Implementation is still online, and it's probably the best place to look if you want to get a glimpse inside the API:
http://oss.sgi.com/projects/ogl-sample/

Michael

zen
03-18-2002, 09:03 AM
michael:
I don't mean to be rude or anything but maybe it is you who doesn't completely understand the difference between GL_TRIANGLE_STRIP and GL_TRIANGLES.See no matter what primitive(as in GL_TRIANGLE_STRIP,GL_TRIANGLES,GL_QUADS,etc.)you use all you do is supply vertices and possibly normal and tex. coordinate data.Every time you issue a glNormal* command you change the state of the current normal(hence the state machine stuff).All vertices you supply in the future with glVertex* will now use the normal you supplied untill you issue another glNormal* command and change the state again.Same goes for glTexCoord*.Do no think of glNormal* as supplying a normal.A normal by itself would be useless.Rather when you issue a glVertex command a vertex is supplied with the coords you give,the current normal and current texcoords.In the case of GL_TRIANGLES you have to supply 3 vertices per triangle.With GL_TRIANGLE_STRIPS you supply 3 vertices for the first and after that every vertex tyou supply will create a triangle together with two of the previous vertices you supplied.That means that the normals you supplied for these previous vertices will also be used.If you need to supply new normals then you mustn'y use a strip.That's why,as someone else said,you can only use vertex normals(1 per vertex) and not face normals.
This is the best explanation I can give you.I thought you propably new all this,that's why I didn't say it to begin with.I can't afford to buy any books either,with the prices they have, but there's a lot of info online,like the red book,and a lot of links in the documentation section here on opengl.org(IIRC there's one about the opengl as a state machine).
Anyway I hope this helped.

davepermen
03-18-2002, 10:30 AM
ok.. lets try it like this:

struct OPENGLVERTEX {
vector4d position;
vector4d normal;
vector4d texturecoord0;
vector4d texturecoord1;
vector4d color0;
vector4d color1;
};

now you have a queue where you add your current vertices you want to draw:

Queue<OPENGLVERTEX> vertex_queue;

and you have a current vertex:
OPENGLVERTEX current;

implementation of glTexcoord, glColor and glNormal are all the same:

glColor3f(float r,float g,float b) {
current.color0 = vector4d(r,g,b,1); // is it one, i dunno http://www.opengl.org/discussion_boards/ubb/wink.gif
}

glNormal3f(float x,float y,float z) {
current.normal = vector4d(x,y,z,0);
}

and glVertex IS THE MAGICAL FUNCTION:

glVertex3f(float x,float y,float z) {
current.position = v4(x,y,z,1);
vertex_queue.push_back(current);
}

only glVertex adds a new vertex to the list, and it uses the last settings of glNormal,glTexcoord,glColor etc..


now what does the driver do?

depends on what he has to do.. if he has GL_POINTS, he simply takes out every vertex for its own:

driverRenderPoints() {
while(!gl_end) { //as long as we are between glBegin and glEnd..
OPENGLVERTEX cur_to_draw = vertex_queue.pop_front(); //waits if there is nothing coming..
gpuDrawThisPoint(cur_to_draw);
}
}

others are driverRenderTriangles (started with glBegin(GL_TRIANGLES);

driverRenderTriangles() {
while(!gl_end) {
OPENGLVERTEX cur[3];
cur[0] = vertex_queue.pop_front();
cur[1] = vertex_queue.pop_front();
cur[2] = vertex_queue.pop_front();
gpuDrawTriangle(cur);
}
}

now as you know the GL_TRIANGLE_STRIPS and GL_TRIANGLE_LISTS or FANS or what ever do reuse vertices.. but its simply another function like this one above..

the vertex-queue is the same, it will only pop_front some of them and save them for reusing.. i'll think about how this function could be written, but i hope it helped..

oh, and, for any others.. the pop_front function automatically calls the vertex_program/vertex_shader for this vertex, and if there is no one, it sends it to the hardware or software t&l unit with its matrix-transforms, texgens etc..

writing a pseudo opengl-architecture is somehow funny and helps alot http://www.opengl.org/discussion_boards/ubb/wink.gif

Coconut
03-18-2002, 10:40 AM
Michael,

I understand the books could be too expensive for students(I was a full time student once!).
Even many people always refer to Red book as their ultimate guide, it is the OpenGL spec itself the ultimate resource of OpenGL.
The spec has an online version and it is absolutely legal.
Please look at: http://www.opengl.org/developers/documentation/specs.html

davepermen
03-18-2002, 11:16 AM
i never had a book myself. only a mathbook, wich is very useful. webresources are terribly just because of the nice notations.. once you got them in a book its just so nice to read. and math takes loooong to understand.

the web has everything. i started at nehe.gamedev.net and never really moved away. the sources i used the most are:
nehe.gamedev.net and its links
flipcode.com
opengl.org and its lots of nice links at the mainpage, and the forums of course
developer.nvidia.com, tons of pdf's and powerpoint presentations about lighting,shading,and other stuff grafics/opengl/dx etc related..
ati.com (is it developer.ati.com? dunno, always use the link there http://www.opengl.org/discussion_boards/ubb/wink.gif), great resource, too, not that big as nvidia, but by far the most advanced gpu today..

wildeyedboyfromfreecloud
03-18-2002, 03:02 PM
i don't know what assumptions you guys are operating upon regarding my character. and i unfortunately i hate saying this but i don't have time to defend myself. i don't understand why you all insist on expounding upon these rudamentary facets of opengl architecture. i hope it isn't for my sake no offense but just please don't exert yourselves on my behalf. personally if i would have written opengl i would've provided some means of passing normals to triangles strips. if you insist that verticies are pushed back on a queue. then why not push back normals for future use. not that it matters. listen say what you will in light of me. i could care less honestly. cheers.

my apologies for
always apologing,

michael

zen
03-18-2002, 04:02 PM
jesus michael,noone's accusing you of anything,we're just trying to help.We're typing tons of stuff here and you think we're doing this to somehow punish you for not knowing your opengl architecture stuf???
What I and davepermen are trying to tell you is that you don't specify normals.Normals on their own are useless.With glNormal* you specify the normal to be used for the next vertex.Thus when you issue a glVertex* command a vertex is added to your scene(pushed down the stack) complete with normals and texture coords.When vertices are reused with strips or whatever they're resused together with their normals,etc.That's why strips are faster.If you need to assing new normals don't use strips or use multiples strips.
I don't like the attitude of these forums either.So instead of trying to defend yourself please read what we're posting to get the answer to your question,and not with the prejudice that it is just another flame.That architecture stuff *is* the answer to what you're asking ,we're not posting it for kicks.

Also:


personally if i would have written opengl i would've provided some means of passing normals to triangles strips

Normals are passed to vertices and vertices are passed to strips.Therefore normals are passed to strips.

wildeyedboyfromfreecloud
03-18-2002, 04:17 PM
i understand opengl architecture perfectly well. i can't believe i'm typing this but. know i want type this. and i will opt to not state the truth here so not to damage anyones ego or offend. lets drop it. i'm in a corner i have nothing nice to say so i will say nothing at all. actually i'm applying for a computer science/graphics patent in about a week and computer science is just a hobby of mine. i think it is you who misunderstands the cituation. please don't hold it against me. take a breath and assess the situation. you are speaking well below my programming level. i've just tried to accomodate you pleasantly. now lets just let any reference to me end. if you've ever been between a rock and a hard place. please forgive my words.

michael

john
03-18-2002, 05:30 PM
You don't know what a statemachine is, nor do you know how to munge one to meet your needs, but everyone else is below your programming level?

Didn't I see someone post a paper here with SIGGRAPH plastered in a picture?

wildeyedboyfromfreecloud
03-18-2002, 05:44 PM
i've made it this far without knowing what a state machine is i imagine. i imagine a lot of things. or maybe i'm using a state machine right now??? if i can't speak chinese then should a chinese man assume i know nothing. if i need a state machine i'll make one if i don't find one first. but why look if i have no function for it. there is useful knowledge and useless knowledge. thats not to say that all knowledge is useful or useless but you can't seperate the function from the context. what is a state machine... in all reality it is a string of characters which may or may not mean anything intelligible to the reader. you must seperate the symbols from the symbolized. blah blah blah you don't know what a jaberwawky is thats rather humiliating. what if i told you it is right under your nose. no not that. the other thing. ha ha look at the fool. never seen a jaberwawky. its humbling isn't it. now imagine what you would ever do without a jaberwawky. sorry i got no time for games. back to work.

later gator




[This message has been edited by wildeyedboyfromfreecloud (edited 03-18-2002).]

BadMmonkey
03-18-2002, 06:29 PM
by the pickles on my sandwich, what the hell more could you want?!

I have followed this thread with what started as amusement... amusement slowly turned to confusion... then it kicked back towards a nice combination of incredulity and amusement.

Don't take this as a personal attack (I don't know enough about you to warrant that), but I imagine that many posters on this thread are a hair's breadth away from having the men in white coats come and drag them away... you have asked a question (the initial phrasing was somewhat poor, but you seemed to 'justify' that), and a veritable ****load of replies have flowed in, most of which are re-iterating the same points...

Surely if you have such a phenomenal grasp of graphics and OpenGL architecture, you would have seen the logic behind what they were saying, and (dare I say it) tried it out for yourself. Instead you fell over yourself apologising on behalf of everyone who 'misunderstood' you... wouldn't it have been easier to rephrase your question in the hope of enlightening us to your purpose?

In answer to your question (so that this post is not completely off-topic and pointless):

In OpenGL, it is not possible to specify "face normals". Normals are specified per-vertex, as this allows polygonal surfaces to better simulate smooth/parametric surfaces, but face normals can be simulated by specifying the same normal for each vertex of a face. In immediate mode, this means one glNormal call before the vertices of a face. Using vertex arrays, this means having a corresponding normal array with the normal for each vertex being the face normal (the equivalent of calling glNormal with the same value for each glVertex call of the face).

In the case of a triangle strip, because each vertex (following the inital three) defines a new face, you cannot even simulate a face normal, as the normal you specified for the previous vertices are retained... specifying a new normal will only affect the next defined vertex.

Sorry if this was not clear, or was 'too far below your programming level' (a comment that I'm sure was received none too favourably by most people who took the time to reply to you, I'm sure). This is mostly just my interpretation of the same thing everyone else has been trying to tell you.

If you have question in future, don't be afraid post it, but remember that the clearer you make your question (and that includes giving a short background/context if need be), the more chance you have of getting a useful reply...
People are also generally much more helpful if you give some indication that you have already tried to solve a problem on your own...

well... back to work 'fore I get an ass-whupin' from the boss http://www.opengl.org/discussion_boards/ubb/smile.gif

wildeyedboyfromfreecloud
03-18-2002, 06:40 PM
well i didn't try anything they suggsted because i've done it somewhere in the ball park of a million times. i agree this is all madness. but such is life on planet earth. wish i had some words of wisdom that applies to this situation. but i'm coming up blank and i don't think its my fault. i take it all back. ok folks theres nothing to see here. just go back to whatever you were doing before.

i think its best

micahle

ps: well i will definately think twice if not 4 or 5 times before posing a question on this board.

[This message has been edited by wildeyedboyfromfreecloud (edited 03-18-2002).]

Ysaneya
03-18-2002, 11:53 PM
I'm really tired of all that crap. When i post an *advanced* question into this forum, i'm lucky if i get *one* reply. I see why now.. everybody's busy answering newbies's questions. I'm seriously starting to wonder if i will post again.

Y.

knackered
03-18-2002, 11:58 PM
well i will definately think twice if not 4 or 5 times before posing a question on this board


Halleluiah! Some good has come out of this thread.
BTW, I hope english isn't your first language, otherwise you're in real trouble.

T2k
03-19-2002, 12:23 AM
maybe you guys should open an irc channel for such threads ... ?!

richardve
03-19-2002, 12:31 AM
Originally posted by knackered:
Halleluiah! Some good has come out of this thread.


Have a look at this (http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/005929.html) thread.. http://www.opengl.org/discussion_boards/ubb/mad.gif

Sigh.. where are those moderators when you need them.. http://www.opengl.org/discussion_boards/ubb/frown.gif

knackered
03-19-2002, 12:48 AM
Mmm, I've had one eye on that thread too. I think PK gave him good advice.
There must be something wrong with *me*, because I can't help but read this drivel - it's like watching a car accident scene - rubbernecking, I believe it's called.

painterb
03-19-2002, 09:40 AM
BTW, I hope english isn't your first language, otherwise you're in real trouble.

I know everyone is tired of this topic and probably wildeyed too, but *please* people, let's all keep the personal insults to ourselves and clean this place up a bit. I honestly don't believe I've ever watched "professionals" act so immaturely as they do on this forum.

Has everyone heard the expression "If you can't say something nice about someone, don't say anything at all"? Good advice, I believe.

richardve
03-19-2002, 10:56 AM
Originally posted by painterb:
I know everyone is tired of this topic and probably wildeyed too, but *please* people, let's all keep the personal insults to ourselves and clean this place up a bit. I honestly don't believe I've ever watched "professionals" act so immaturely as they do on this forum.

Pro's are also human you know..


Has everyone heard the expression "If you can't say something nice about someone, don't say anything at all"? Good advice, I believe.

There's one person in this topic.. agh.. never mind..

All your sucky English are belong to us!

knackered
03-19-2002, 01:48 PM
Painterb,
wildeyedboy... is an idiot, don't lower yourself to defend him.
He's a sponge. He deserves to be insulted - I've seen enough of his posts to know that for sure.
I encourage people to insult him - better to insult him than someone who genuinely deserves help. If we all insult him enough - personal or professional - he may move on to another forum. I liken this to carpet bombing.
It's good to vent your spleen, so long as you reserve it for someone who deserves it. Don't let psychiatrists tell you any different.



I honestly don't believe I've ever watched "professionals" act so immaturely as they do on this forum


You really should get out more! http://www.opengl.org/discussion_boards/ubb/smile.gif
This is nothing compared to what I've witnessed on other forums.
It's all good fun.

Eric
03-19-2002, 11:42 PM
If you want to see some good flaming, search for posts by "IronDuke" on this very forum. Now, have fun !

Regards.

Eric