PDA

View Full Version : Nice background...



Teofuzz
02-06-2001, 11:51 AM
Hi...
I'd like to put on my ogl app a nice background. I already used a big textured quad that simulates the sky, and it works well.
But I want a background all around, like for a starships game... I move with 6 degrees of freedom.
I tried a mapped cube but there is some distortion that lets you discover where the cube edges are.
With a sphere the distortion becomes very ugly at the poles.

Any idea?
Thanks in advance
Fuzz

DFrey
02-06-2001, 12:10 PM
When drawing with the cube, did you disable lighting when drawing the cube? Also were your textures piece-wise continuous?

[This message has been edited by DFrey (edited 02-06-2001).]

Teofuzz
02-06-2001, 12:21 PM
Yes, sure, I disabled lighting and used well-drawn textures. That's the perspective projection that causes that...
Have I to use a ortho projection?

Michael Steinberg
02-06-2001, 01:07 PM
glOrtho or something like that.

DFrey
02-06-2001, 01:35 PM
I don't think you want to use an othographic projection. Instead you'll either have to make the texture less busy near the edges, or predistort the textures. Another option though more expensive would be to use just a fixed plane, and project the textures onto the plane. You would have to subdivide the plane of course for each texture that is to be projected at a given viewer orientation. Also with this approach an orthographic projection does make sense to use.



[This message has been edited by DFrey (edited 02-06-2001).]

Michael Steinberg
02-06-2001, 01:37 PM
Whoops, he meant to use that for skyboxes? Thought he wannted to do background... http://www.opengl.org/discussion_boards/ubb/smile.gif Predistorted textures work flawlessly, though I have a problem since I don't have this ONE program to do it so well. Forgot how it is called. It was something like a landscape renderer.

Punchey
02-06-2001, 06:38 PM
If anyone knows of a distortion proggy, please post a link to it as I think we would all benefit from it.

DFrey
02-06-2001, 07:32 PM
See this old thread for a wealth of info on skyboxes: http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/001481.html

Teofuzz
02-07-2001, 12:47 AM
Thanks guys, I'll try to distort my textures in some way...
I suppose that I have to 'compress' them at the edges...
Bye!
Fuzz