Author Topic: Water rendering issue (and workaround)  (Read 4886 times)

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Water rendering issue (and workaround)
« on: January 17, 2007, 02:45:10 AM »
I've been trying to isolate a problem I've been having with stippling in shallow water.

Original render. Camera -> water distance = 100km
916-0

  • Terrain is a 2049 TER (2,600km wide)
  • Set all wave options to 0
  • Removed fractal detail on terrain
  • No change on increasing render quality settings

Files temporarily available at: http://www.path.unimelb.edu.au/~bernardk/demo/new_zealand_test.zip (6.7Mb)

I had thought that it was related to the distance between the camera and the surface of the water as it appeared to get better as I lowered the camera angle but I'm not convinced that this is the sole factor.

Camera -> water = 6km
918-1

Camera -> water = 1km
920-2

Camera -> water = 2m
922-3
« Last Edit: January 29, 2007, 11:26:48 PM by bigben »

Offline StickerSticker

  • Member
  • *
  • Posts: 15
    • My Deviantart Page
Re: Water rendering issue
« Reply #1 on: January 17, 2007, 05:04:03 PM »
Check out this weird one:


I fixed it as soon as i changed some settings, musta been a fluke but it looks scary, lol.

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: Water rendering issue
« Reply #2 on: January 17, 2007, 09:20:59 PM »
Do you remember what settings you changed?

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 12968
  • Holy snagging ducks!
Re: Water rendering issue
« Reply #3 on: January 19, 2007, 04:47:09 AM »
I believe you're correct about distance being a factor. As best I recall this is related to accuracy issues in the occlusion system, determining which surface is "on top". If you can increase the difference between the water height and the underlying surface this should be solved. Alternatively you could just use a water shader on the terrain rather than a lake object; that should avoid those errors since the surface itself is water shaded, rather than being a plane over another differently colored surface. However I may be mistaken in how you're doing this.

Please do update us if you continue to experiment with this and get new results. This is something we will fix for the final version at least.

- Oshyan

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: Water rendering issue
« Reply #4 on: January 23, 2007, 12:23:32 AM »
Thanks Oshyan

I tried this, but from the preview render it's not having the desired effect. I do get some extra reflection in the distance but the subsurface Here's my TGD (basic surfaces), the TER is in the original post above.
* new_zealand.tgd (22.9 kB - downloaded 164 times.)

What I'm trying to do is to show the underwater terrain through the water (or at least get ready for it when we can adjust the transparency of water). TG0.9 comparison: http://www.ashundar.com/plug.php?e=coppermine&album=558

I can wait for a fix. There's plenty of other stuff for me to learn  ;)

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: Water rendering issue (and workaround)
« Reply #5 on: January 29, 2007, 11:40:53 PM »
I knew this workaround when I had the problem but I was still learning. Here 'tis now. If the problem's related to the ratio between the camera to water distance vs. the water depth, then increase the water depth....

* below_water.tgc (2.28 kB - downloaded 186 times.)

  • Create a shader that has the same distribution as the water.
  • In the displacement tab, set the direction to vertical and the multiplier to a large negative number (I start at -1000)
  • Create a new distribution shader for the displacement function, with the same distribution as the water

... or use this clip file  ;)
1338-1

For other terrains, I'll be using an image mask for the water distribution/displacement function which brings me to another water issue, but I'll start a new post for that one.
« Last Edit: January 29, 2007, 11:58:40 PM by bigben »

Offline §ardine

  • Member
  • *
  • Posts: 110
Re: Water rendering issue (and workaround)
« Reply #6 on: January 30, 2007, 01:23:53 AM »
Hey thanks for following up on this bigben!
I ran into this problem some time ago and your solution is getting me thinking again about that project.
No doubt this will prove helpful to others also.

 

anything