Water Shader Optimizations?

Started by dandelO, May 23, 2010, 10:37:19 AM

Previous topic - Next topic

dandelO

#15
QuoteAs far as I know, nothing

Well, I thought that, too. There's been no mention of anything being changed in the way it's rendered in any release notes, I don't think. ???
So, where are these horrid black artefacts coming from? They certainly never used to be there. Look at Marlin's sphere in the first post, I can't reproduce this effect at all now with a water shader. It used to be as easy as simply flattening the wave scales, removing patch and un-checking double sided(if an imported object was used). TG spheres, though, worked fine, without any edition.

The closest I can come to it is to try and not have any sky visible in the transparency and un-checking 'visible to other rays', as was mentioned earlier by swissAdA. This clears up any black artefacts on the terrain portions of the transparency but, it blacks out the entire portion that is occupied by the sky and, yes, I've also checked this with the background node both casting and not casting shadows, as this was also a feature that was changed a while back in the default project, (something to do with the ray tracer not working correctly before if the BG wasn't casting shadows), now that this is fixed, though, the BG node is no longer set to be casting shadows as default.
I don't actually use the default.tgd myself, I have my own(in which the BG was still set to cast, I thought this maybe was affecting my results so I unchecked it, same result). I'm now testing this with factory settings, still the same results.

When no sky is visible through your transparent object(camera looking down onto the object) AND when 'visible to other rays' isn't checked, then, the results are quite the same as when transparency was introduced.
But, you can no longer have a transparent sphere hanging in mid-air without the refracted sky being black and, when 'visible to etc...' is checked, the entire sphere is full of black specks...

dandelO

And, I was wrong earlier on something I said in this thread: that the reflective shader appeared to be rendering transparency at the same detail as the main renderer.
I'm finding now that this isn't true in my tests with default TG sphere objects. It looks just like the water shader, complete with black specks when 'VTOR' is checked.
Maybe imported objects, because of the 'RTO' setting perhaps, react differently?

Ahhh, man, I don't know, I hope that Matt has some advice on these things.

TheBlackHole

Try turning off Ray Trace Objects in the renderer settings. :P
They just issued a tornado warning and said to stay away from windows. Does that mean I can't use my computer?

dandelO

#18
Pfff! Don't you think that's one of the first things I tried? :D Cheers, man! ;)

I think the answer has been discovered, we just need to wait patiently on a fix coming. It seems the staff are on holiday for a few days(I don't blame them! I'd be running from us lot, too ;)). I've seen Jo floating about a couple of times but Matt would have to confirm what's actually happening here, I think.

Matt

It looks like there is a bug here, but I can't say any more than that without digging deeper. It's possible that I changed something in the transparency functions or perhaps in the way built-in objects are ray traced to fix some other problem. The ray tracer underwent lots of small changes for 2.1, so it might have happened then.
Just because milk is white doesn't mean that clouds are made of milk.

dandelO

Thank you, Matt. Hopefully it won't be a big deal to correct but I know nothing of writing these program functions so, good luck with that! :)

Oshyan

It would be helpful to have as much information and example files as can be provided to help diagnose this.

- Oshyan

bobbystahr

Quote from: Tangled-Universe on May 24, 2010, 06:34:27 AM
Quote from: Seth on May 24, 2010, 05:38:48 AM
nothing more...

the water shader does need some improvement as the detail of the underwater landscape s really ugly ;)

That's by design. There's a detail setting multiplier for the visible features under the water, and it's set to 0.5.



And where can I find this[bold face in quote]...which tab...it's nowhere in the water shader I can see
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

dandelO

It's a long-desired feature of mine, too, Bobby. I remember reading the bold part of Matt's message(in the first post of this thread, not Martin's one above) and have been eagerly awaiting it for a very long time. I really would love the option to trade render time for quality in the water shader.

I've read Matt saying a couple of times something along the lines of(*not directly quoted*) '...We could easily enable full quality in subsurface transparency rendering but, you wouldn't like the render time...'
I'd not like to have full quality as mandatory but at least, an option or a slider to control this level of render detail would be a very handy feature.

Oshyan, I'm don't have all of the older versions of TG2 saved to this computer at home but I think I have them stored somewhere. I'll try these water settings with v.1.9.xx and v.2.0 once I get my hands on them again.
I think I'm quite certain that this still worked up until the beta release, then when TG went 2.0, I'm not really sure at all. I'll get back to this thread ASAP...

Oshyan

Thanks dandelO, that would be great. I can provide you some older versions if necessary.

- Oshyan

j meyer

Hi there,
attached are two example files.One is made with the public beta 1.10.23.1
and the other one with the current version 2.1.18.1 as these are the ones
i have installed right now.Hope it's of use to you.

dandelO

Oshyan. I found an install.msi for TG.2.0.3.1 on a keydrive.

My default transparency shader(custom water shader) works fine on the TG2 internal sphere object in v.2.0.3.1 without any messing about and that's just one public release back from the current v.2.1.

Attached here first is an image of a default TG2 sphere, with only 'cast shadows' unchecked in v.2.0, and secondly, the same image from the same .tgd rendered in 2.1.

Both .tgd's for these images, first saved in v.2.0, second in v.2.1.18.1, are also attached beneath.

As you can see, the atmosphere or background object(whatever it is that's having problems displaying in 2.1 transparency) renders just fine, there was no black-out of atmosphere or any black render artefacts in the transparency in v.2.0.3.1. on the sphere object.

v.2.0.3.1:
[attachimg=#]

v.2.1.18.1:
[attachimg=#]

[attachimg=#]
[attachimg=#]

Hope these are of some help in diagnosing this bug between then and the current public release.

MGebhart

Martin,

Good catch. It's obvious there is a code issue between the releases.

I sure hope this is corrected in the next release if Planetside has the opportunity and time.

Since you turned off shadows I'm guessing there are no light caustics.
Marc Gebhart

dandelO

#28
Marc, leaving shadows enabled on water objects makes the object cast shadows on surfaces beneath it. The default lake has this option unchecked, too. If it's enabled in lakes/planes, the shadow is cast on the ground beneath the lake as if it were still an opaque object and you don't get to see the correct result.

It's not even required of a TG sphere to un-check 'cast shadows' when using a water shader because it is a one sided object anyway, and it wouldn't cast shadows on its own backfaces because they aren't there.
And, on an object import you'd need to disable backfaces to see transparency anyway, so it isn't required for .obj spheres either.
I'm not really sure why I un-checked it here! ??? :D

In the Bollox population image(http://forums.planetside.co.uk/index.php?topic=9988.msg104155#msg104155), the transparent glass balls still have their shadows enabled.
Probably I'm just used to doing it on plane objects when they are over a terrain, it isn't actually required here. Sorry.

bobbystahr

Based on the shape of the ground area in the bad render I'd hazard a guess that maybe IOR is involved with this bug.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist