Landscape, Skybox, Water

Started by
18 comments, last by tcs 23 years, 5 months ago
Hi ! I''m facing a tough problem while making my new landscape engine. (also known as pic of the day generator for flipcode.com ;-)) I have quake 2 style skybox (a cube with six correct distorted textures). Now I want that my water fits seemless into the horizon. My terrain is an isle that is surrounded by this water. But I can''t get this look nice. When I make the water surface very very large, it logically looks like it would go till the horizon... but not really, when you raise your viepoint you''ll see the fake ;-) So my water surface must beof infinite size to archive the effect, damn ;-) Any ideas how to solve this ? btw: horizon, horizone, horizont ??? shame on me ;-)) Tim -------------------------- glvelocity.gamedev.net www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
Advertisement
Have you tried using fog or transparent blending?

To use fog at all I would need range based fog , and this is only supported on the ATI Radeon. I can''t use blending, because this would look artifical.

And even if those two methods would look good, they still wouldn''t solve my problem... When the cam y position changes, you would see how the finite water plane moves against the infinite skybox, that''s my problem...


Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
I have a funny idea.. might work, and then again maybe not .

If you solve the problem in screen space, then you can always draw to the edge of your screen and thusly, the person will never see the edge of your water . So first you need to calculate where the water intersects the screen edges, then draw that 4 sided poly. To find texture coords, perhaps raytrace the intersection points as an infinite plane and then let the hardware interpolate for you.. Of course, z info will be tough to come up with.. hmm.. interesting, I think the raytrace of the infinite plane would solve this also.

So, in summary, I have no idea if this works, but try solving for the intersection with screen edges using raytracing and then draw the four sided poly in screen space using the info that the raytracer returns.. Of course this could be garbage, but who knows . Good luck!

PreManDrake
Nope, I can''t do screenspace. If so, I had made the water part of the skybox. My water i just a plane somewhere in the landscape, I need to have it in object space.

Your approach looks interesting, but I can''t draw an infinite plane (glBegin(GL_INFINITE_PLANE) ;-) ) and I can''t make my water plane fit into this concept ;-)

Nice idea anyway...

Damn, does anyon know how somce commercial engines solve this problem ?


Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
When player move in commercial games, game move skybox with player.
Damn, does anyon know how somce commercial engines solve this problem ?

do u know of any screenshots of a comericial game doing this


http://members.xoom.com/myBollux
hey, I don''t have a problem with the skybox !?
I want to fade my water plane into the horizone. To do this I need to have the effect of an infinite large water plane without actually rendering one...

I guess this DGMZ demo or some flight sims need to do this..


Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
Slightly off topic, but how exactly do you distort the images for the sky box?
I''ve never actually done this, but it sounds like it should work. How about using a sphere instead of a box. This should work just as well, if not better, when you keep the sphere centered on the player. You horizon then would look correct no matter what direction you look.
<span class="smallfont">That is not dead which can eternal lieAnd with strange aeons even death may die.   -- "The Nameless City" - H. P. Lovecraft</span>

This topic is closed to new replies.

Advertisement