|
-
Nov 30th, 2004, 02:25 PM
#1
Thread Starter
PowerPoster
Heights Map - Quads/Right to Left vice versa
Currently I am using a triangle list to render the terrain.
Almost all the tutorials I am reading teach a method of loading the terrain so you can use quads.
Do I want to use quads??
Next.
People keep telling me to run through each row Like right to left and then the next column left to right.
Why and is this how it has to be done? What for?
All I do for storing the vertices is run y 0 to mapsize and x 0 to mapsize.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
Nov 30th, 2004, 02:33 PM
#2
Thread Starter
PowerPoster
When it comes to openGL what is the difference between:
glBegin(GL_QUADS);
glBegin(GL_TRIANGLE_STRIP);
What is the D3D equivelants?
Some of these OpenGL tutorials read and render the vertices in the same function....This is stupid.
TriangleList with indices means 3 points for each triangle right?
TriangleStrip with indices means 4 points for each quad right?
LineList/Strip is the same deal, cept it shows wireframe.
Explain trianglefan?
Last edited by Halsafar; Nov 30th, 2004 at 02:53 PM.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
Nov 30th, 2004, 06:41 PM
#3
Re: Heights Map - Quads/Right to Left vice versa
Originally posted by Halsafar
Currently I am using a triangle list to render the terrain.
Almost all the tutorials I am reading teach a method of loading the terrain so you can use quads.
Do I want to use quads??
Reading OpenGL tutorials are we? Well, if I am not wrong I think that quads are have more or less the same speed as triangels. I think the drivers are doing the quad to triangle transelation for you or something like that.
Originally posted by Halsafar
Next.
People keep telling me to run through each row Like right to left and then the next column left to right.
Why and is this how it has to be done? What for?
If you don't then the first triangle/quad on the next line will use the last or few last vertices from the triangle on the other side, and you will stretch that one from one side of your terain to the other one. You can end the drawing after you have gone from one side to the other, and then start again on the other side again. Like you are doing in open gl with glBegin() and glEnd pair.
-
Nov 30th, 2004, 06:43 PM
#4
Originally posted by Halsafar
When it comes to openGL what is the difference between:
glBegin(GL_QUADS);
glBegin(GL_TRIANGLE_STRIP);
What is the D3D equivelants?
Some of these OpenGL tutorials read and render the vertices in the same function....This is stupid.
TriangleList with indices means 3 points for each triangle right?
TriangleStrip with indices means 4 points for each quad right?
LineList/Strip is the same deal, cept it shows wireframe.
Explain trianglefan?
If you don't know what the ground primitives looks like, I think you should stop for a moment, and learn some of the basics of DX before you move on.....you also asked about the texture mapping question that is pretty basic compared to what you are trying to pull off. But if you can wait 5min, I will try to make some drawings for you so you can see what they look like.
PS: I will make better images once I get the time to start on my DX tutorials after X-mas.
-
Nov 30th, 2004, 07:10 PM
#5
-
Nov 30th, 2004, 07:15 PM
#6
-
Nov 30th, 2004, 07:19 PM
#7
-
Nov 30th, 2004, 07:23 PM
#8
-
Nov 30th, 2004, 07:34 PM
#9
-
Nov 30th, 2004, 07:37 PM
#10
-
Nov 30th, 2004, 07:41 PM
#11
-
Nov 30th, 2004, 07:43 PM
#12
OGL: (gl_triangle_fan):
-
Nov 30th, 2004, 07:44 PM
#13
-
Nov 30th, 2004, 07:48 PM
#14
Did I forget any? Or did I do something wrong...well this is all from the top of my head...and I am tired again. So let me know if something is wrong here..
-
Nov 30th, 2004, 11:39 PM
#15
Thread Starter
PowerPoster
You should know that out of all the topics I've read. None have showed such beautifully simple diagrams.
I could picture TriangleStrip and TriangleList in my head, I understand how to orient them properly.
Thanks.
I must say my knowledge of how the 3d environment is made is still a little primitive. I understand a lot of more than I did before. But the majority of my knowledge is in game engine design around everything but the extreme details of how the rendering goes.
Like playing with Renderstates and TextureStageStates is somewhat beyond me. I don't understand W Buffers and what Stencil Buffers are. But that will all come in due time.
As for openGl.
It is suprisingly simple so far.
Way easier than direct x...So far..
Although I think I am not goona go to far into it, I enjoy D3D for now.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
-
Nov 30th, 2004, 11:48 PM
#16
Thanks for the compliments. I hope the next pictures for the tutorials will be better tho...
I liked OpenGL too when I tried it. Wrapping up the Western game I made didn't take much time, and I have never looked at OpenGL before. But something is still holding me back from using it. DX is in my heart...
-
Nov 30th, 2004, 11:54 PM
#17
I love OpenGL. It's more flexible than DirectX and it's syntax makes it more readable too. I just created a program that uses both DX8 and OpenGL. Only I used DirectX8 to switch to Fullscreen/Windowed mode (as well as DirectInput and other things). I did it like that because I wanted to be able to switch to fullscreen even when the Forms borderstyle is Sizable. OpenGL's fullscreen mode left the border there and I didn't like that. Would have been ok if I didn't have a hybrid of Fullscreen/Windowed. Only way I could have avoided that was to create a Win32 Window rather than using a Form so I could have more control then over my window. That would leave another problem though. No DirectInput for the mouse then since a form is required.
But yeah, OpenGL rocks.
-
Dec 1st, 2004, 12:30 AM
#18
Thread Starter
PowerPoster
So again on a side note.
I record my vertices row by row left to right only.
I then store the indices of each triangles properly, I know it is properly.
Unless.
A bmp width of 128 in DC form is that 0-127 or 0-128.
If it has pixels between 0-127 then I am recording everything fine.
Switching between linestrip and list took a minimal ammount of indices relisting, which I just did and recompiled.
Next is to figure out the nice way to get a mountain texture on cliffs and grass everywhere else....Where to start.
"From what was there, and was meant to be, but not of that was faded away." - - Steve Damm
"The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm
"When you do things right, people won't be sure if you did anything at all." - - God from Futurama
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|