Sign in to follow this  

Flowmaps distortion

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

I've implemented flowmaps based on the following article: [url="http://graphicsrunner.blogspot.ru/2010/08/water-using-flow-maps.html"]http://graphicsrunner.blogspot.ru/2010/08/water-using-flow-maps.html[/url]
For smaller values of flowSpeed everything is fine, but for larger values the water surface is getting extremely distorted. Is there any solution to this problem?
Here's how do the FlowMapOffset calculation:
[CODE]
flowMapOffset0 += flowSpeed * Time.deltaTime;
flowMapOffset1 += flowSpeed * Time.deltaTime;
if ( flowMapOffset0 >= cycle )
flowMapOffset0 = .0f;
[/CODE]

Small flowSpeed:
[img]https://dl.dropbox.com/u/16265778/Water_undistorted.jpg[/img]

Large flowSpeed:
[img]https://dl.dropbox.com/u/16265778/Water_distorted.jpg[/img]

Share this post


Link to post
Share on other sites
Not sure, but in the lower picture it seems as if you can see "tiles", where a tile is probably mapped on a single pixel of the flowmap. Using a larger resolution flowmap and having linear-filtering on that texture enabled helps? What doe you see if you directly draw the flowmap itself on the waterplane, instead of the water?

Share this post


Link to post
Share on other sites
My guess is that setting the offset back to 0 when it exceeds the cycle length is the culprit. At faster flow rates the offset will overshoot by more than with a slower rate, so there will be a more obvious discontinuity. Try subtracting cycle from the offset instead of setting it to 0.

Share this post


Link to post
Share on other sites
[quote name='Postie' timestamp='1355402409' post='5010175']
My guess is that setting the offset back to 0 when it exceeds the cycle length is the culprit. At faster flow rates the offset will overshoot by more than with a slower rate, so there will be a more obvious discontinuity. Try subtracting cycle from the offset instead of setting it to 0.
[/quote]
No luck so far... Any other ideas? Using higher resolution flowmap didn't solve the problem.

Share this post


Link to post
Share on other sites

This topic is 1859 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this