Jump to content
  • Advertisement

Archived

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

adam17

Question about making water

This topic is 5391 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

im working on a water effect demo (not for the contest) and i need some opinions on what will work, or look better. i am using shaders for the surface to create the illusion of waves. the shaders take animated normal maps to control the refraction. i am left with an extra ray that i need to show the bottom under the water surface. how should i look-up the bottom? should i use a static cube map (will not look good at edges of pool) or is there a way to make it dynamic. when i say dynamic im saying you can place this texture onto any polygon and it will start refracting what is on the other side. make sense? thanks ahead of time.

Share this post


Link to post
Share on other sites
Advertisement
The water surface is essentially flat. Maybe you can do without a cubemap... uhm, there''s an ATi whitepaper on pbuffers and render texture you should take a look at (if you haven''t yet).

Share this post


Link to post
Share on other sites
i started thinking about this a little bit more. how is raytracing done? i was thinking that once i found the angle and the vector i could blend it to the texture color of the water surface. im gonna check the render to texture thing in the mean time.

Share this post


Link to post
Share on other sites
Raytracing is a very bad idea if you want a frame rate over 1 fps

I''ve seen nice water made with perlin noise (for waves) and cube map for a "reflective" look.

Share this post


Link to post
Share on other sites
i have been looking around for raytracing and have noticed that it is VERY inefficient like u said Krohm. i have also been researching rendering to textures. if im understanding it right i would have to do a gllookat for every pixel that the water exists on. i think im wrong... is there any way to make the refracted textures dynamic or am i stuck with cube maps? im especially going to need it if a guy falls into the water and hits the bottom. u cant see him if there are only static cube maps.

sry im being so picky

Share this post


Link to post
Share on other sites
quote:
i have been looking around for raytracing and have noticed that it is VERY inefficient like u said Krohm.

I didn''t said it... someone other did.
quote:
If im understanding it right i would have to do a gllookat for every pixel that the water exists on.

No, you are not wrong. You need to look up somewhere to recognize where the ray goes but it is not accomplished using gluLookAt - this is a variant property you have not access to and even if you would, performance would be a real pain.
If you''re using fixed function pipes you''re in bad troubles. If you can use ARB_vp + ARB_fp then you''re more lucky. NVSDK has some demos on refractive and reflective water which is dinamically computed on GPU using render targets. Translating to the new programmable pipelines should be fairly easy.
Once you thought at how you need to make everything work, you''ll figure out you''ll just need a texture indirection to lookup a cubemap (maybe it''s possible to use a 2D texture but I am not sure).
As for having dinamic texturing, this is just a problem of updating it properly every X frames (where X can be every frame). This won''t take so long since the "environment map" does not need to be high resolution (no one will ever pay too much attention on it).

Share this post


Link to post
Share on other sites
Useless response...

Sorry, but I couldn''t help but laugh when I read the thread title - ''Question about making water''...

Personally, I''ve always found mass quantities of beer to be the most productive...

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!