Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

tcs

Landscape, Skybox, Water

This topic is 6442 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!