Planetside Software Forums

General => Terragen Discussion => Topic started by: Dune on September 02, 2018, 05:21:03 AM

Title: Grain in murky water
Post by: Dune on September 02, 2018, 05:21:03 AM
I want to have murky water, but as soon as I add volume density, grain appears. I've noticed it earlier (years ago), but can't remember whether there's a solution (yet). Adding a 10% surface shader after the water shader adds a bit of murk, but it's not the same quality. Volume density is probably also calculated by depth.
Subdivision settings are already upped to 0.5, there's just a cirrus cloud. Detail and AA are 0.5 and 5 (for testing).

Anyone?
Title: Re: Grain in murky water
Post by: cyphyr on September 02, 2018, 06:08:53 AM
Are you using a vanilla volume density ( ... just upping the density with no modifier).
Maybe try a PF with very high frequency/low amplitude (basically white noise with low contrast). That in theory should give you a grain effect but if you get the settings right if could become so "fine" that it becomes un-noticeable.
Maybe it is a direction to experiment along ...
Title: Re: Grain in murky water
Post by: Dune on September 02, 2018, 06:54:18 AM
Vanilla volume density? I use just the density color and density without any mask. It should be even, I suppose.
This is a render with higher detail and AA, but still.....
Title: Re: Grain in murky water
Post by: cyphyr on September 02, 2018, 07:38:20 AM
My thinking(?) is that if it is just using the density colour without a mask it may be capped, but using a supper fine grained mask may force it to calculate at a higher detail/resolution than otherwise.
Title: Re: Grain in murky water
Post by: Dune on September 02, 2018, 07:58:14 AM
Capped? You speak in riddles  :o But I'll try a superfine mask (like 0.005/0.005/0.005?)......

EDIT: no difference. It strikes me that grain is very much worse if largest wave size is upped from 0.1 to 1. But it isn't less when reducing smallest size to 0.01. Soft shadows isn't the answer either. I'll just treat is as water debris then....  ::)
Title: Re: Grain in murky water
Post by: Matt on September 02, 2018, 12:41:10 PM
At the moment the only solutions are to use "Ray trace everything" or "Defer all shading" (the latter needs to be enabled by hand in the .tgd file, in it comes with the risk of corrupted buckets). "Ray trace everything" will be optimised later this year because it's needed for full scene Path Tracing.

Matt
Title: Re: Grain in murky water
Post by: WAS on September 02, 2018, 09:01:11 PM
Maybe try my merged volume setup. Noticed no noise even at 0.6MPD and AA6. Than again the geometry of a sphere and some objects is not as extreme as water. But it may help. It takes fiddling but works with the glass/water decay distance.

https://planetside.co.uk/forums/index.php/topic,25389.0.html
Title: Re: Grain in murky water
Post by: Tangled-Universe on September 03, 2018, 02:05:11 AM
Are you using soft shadows?
In my experience soft shadows create these type of speckles when using volume density for the water.
If so, how does it look without soft shadows?
Title: Re: Grain in murky water
Post by: Dune on September 03, 2018, 02:07:18 AM
Thanks Matt. I may try that and see what happens.

And thanks WAS. I tried that, but I wasn't quite satisfied with the transparency quality of the water up close. I used that method (few years ago already) to get light through waves when the light is low and behind. That works, but is only nice enough in the distance.
Regarding light through water, I also tried a Lambert shader, but that doesn't let any light through. Default shader does, but you can't turn off the main color. Would be great if that would be possible!!
Title: Re: Grain in murky water
Post by: Dune on September 03, 2018, 02:08:32 AM
Hi Martin, long time... no I didn't use soft shadows. Tried it to see what happens, but no difference.

Btw. forgot this close-up. Used a vdisp exr to get some 'sharkwake'.
Title: Re: Grain in murky water
Post by: WAS on September 04, 2018, 01:12:44 PM
I tried some default water with some density and ray trace everything, but that just seems to make the noise more tightly packed, doesn't remedy it. In fact it almost makes it more noticeable.

The only way I can remedy this is with merging with a default shader which breaks transparency and only lets light in.
Title: Re: Grain in murky water
Post by: Matt on September 04, 2018, 04:25:16 PM
Quote from: WASasquatch on September 04, 2018, 01:12:44 PM
I tried some default water with some density and ray trace everything, but that just seems to make the noise more tightly packed, doesn't remedy it. In fact it almost makes it more noticeable.

This would depend on the AA setting. The reason you might want to use this is so that higher AA can remove the noise.
Title: Re: Grain in murky water
Post by: WAS on September 04, 2018, 05:08:35 PM
Quote from: Matt on September 04, 2018, 04:25:16 PM
Quote from: WASasquatch on September 04, 2018, 01:12:44 PM
I tried some default water with some density and ray trace everything, but that just seems to make the noise more tightly packed, doesn't remedy it. In fact it almost makes it more noticeable.

This would depend on the AA setting. The reason you might want to use this is so that higher AA can remove the noise.

That would make sense, the noise being much more compact would definitely blend well with higher AA. I can't achieve this so probably why it's just more noticeable with AA6.
Title: Re: Grain in murky water
Post by: Matt on September 04, 2018, 05:20:09 PM
I'd think that RTE + AA 6 should be sufficient to remove any subsurface noise. If it's not, can I see a TGD?
Title: Re: Grain in murky water
Post by: WAS on September 04, 2018, 06:44:30 PM
Quote from: Matt on September 04, 2018, 05:20:09 PM
I'd think that RTE + AA 6 should be sufficient to remove any subsurface noise. If it's not, can I see a TGD?

Here is the TGD I'm testing in. Another thing I notice is water displacement turns into a polygon show. x.x

One thing I forgot that is omitted in this setup is was using a smoothing shader to smooth the water displacement so I could see dark areas better, as with rougher disp you can't actually see fuzzy zones that well, they are masked. So may need to lower water settings/use smoothing to really see problem.
Title: Re: Grain in murky water
Post by: Matt on September 05, 2018, 12:03:05 AM
Quote from: WASasquatch on September 04, 2018, 06:44:30 PM
Quote from: Matt on September 04, 2018, 05:20:09 PM
I'd think that RTE + AA 6 should be sufficient to remove any subsurface noise. If it's not, can I see a TGD?

Here is the TGD I'm testing in. Another thing I notice is water displacement turns into a polygon show. x.x

The noise Ulco is talking about occurs when an object casts a shadow into the volume. Your scene doesn't have any of that. With Ulco's scene this technique should remove the noise he had.

The reduced micropolygon resolution is because of the default "Ray detail multiplier" of 0.25. You can control this using Subdiv Settings on the Advanced tab. Normally this only affects shadows, reflections and transparency rays, but when you enable RTE it affects primary rays too.
Title: Re: Grain in murky water
Post by: WAS on September 05, 2018, 12:10:13 AM
Quote from: Matt on September 05, 2018, 12:03:05 AM
Quote from: WASasquatch on September 04, 2018, 06:44:30 PM
Quote from: Matt on September 04, 2018, 05:20:09 PM
I'd think that RTE + AA 6 should be sufficient to remove any subsurface noise. If it's not, can I see a TGD?

Here is the TGD I'm testing in. Another thing I notice is water displacement turns into a polygon show. x.x

The noise Ulco is talking about occurs when an object casts a shadow into the volume. Your scene doesn't have any of that. With Ulco's scene this technique should remove the noise he had.

The reduced micropolygon resolution is because of the default "Ray detail multiplier" of 0.25. You can control this using Subdiv Settings on the Advanced tab. Normally this only affects shadows, reflections and transparency rays, but when you enable RTE it affects primary rays too.

I had to remove my shark object as it's not shareable. You could use a sphere.  Second park makes total sense, I had thought of increasing that too to see if it helped.
Title: Re: Grain in murky water
Post by: Dune on September 05, 2018, 02:41:35 AM
I have to test your setup`on my other machine, but I don't think translucency works if the color of the default is black. I used at least a very dark color (0.01). Further; if you input the water shader into the default, the merge will double the waves, but that's an aside. And does transparency of 2 add to a transparency of 1 (which I believe would be 100%)?
Anyway, nice to give water another shake.
Title: Re: Grain in murky water
Post by: WAS on September 05, 2018, 02:13:09 PM
Quote from: Dune on September 05, 2018, 02:41:35 AM
I have to test your setup`on my other machine, but I don't think translucency works if the color of the default is black. I used at least a very dark color (0.01). Further; if you input the water shader into the default, the merge will double the waves, but that's an aside. And does transparency of 2 add to a transparency of 1 (which I believe would be 100%)?
Anyway, nice to give water another shake.

Since the mix is 0.5, you actually would get half the wave height without mixing with itself 0.5 + 0.5  = 1. Specifically why I added that input.

Additionally yes, translucency like I mentioned is just not there. Only for light. It would be super helpful if the default shader could have it's colour disabled and act somewhat like a surface layer and just be translucent. I'd imagine in that event it may help, but may also just bring back the fuzz problem.

This fuzz also seems to be present in shadowed reflections I've noticed when testing the reflections on spheres.
Title: Re: Grain in murky water
Post by: Dune on September 06, 2018, 02:38:17 AM
You're right. If displacements are added, it would be 1+0.5 though.

I wondered about the transparency above 1, and indeed it is not 100%. Pulling it even higher has some strange effects, interesting.

I made a comment about color disabling in default shader somewhere too, would indeed be very handy (if translucency would then still work in water shader).

Turning off shadows of the sharks was the easiest way to get rid of the grain, btw.