default transparency under water doesn't work

Started by Dune, December 13, 2010, 12:19:03 PM

Previous topic - Next topic

Dune

Long title, but can anybody tell me why this clip doesn't work? Patches of white (ice flows), which surroundings are made transparent with a default shader, just underneath a lake. Without the top lake it works and you'll see the ground, with it doesn't  ??? :-[ >:( And it would be so nice!

By the way, here's a frozen lake without the patches.

cyphyr

#1
I'm not quite sure what your after and its difficult to see without the full file ...
but
try plugging the warp shader into the child rather than the main input of the surface layer ...
Dose this work?
:)
Richard
hmm, scratch this, not a solution ...

ps you might have more luck following up dandelO's Breaker thread since this is basically a volumetric effect
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

Dune

If you import this tgc in a new world and find the lake or just locate them at 0/0/10 and the upper one (water) at 0/0/10.2 you can see what happens. The transparency of the 'default line' is there without the top water, but gets milky (all white) when you turn the water on.
I don't think Dandel0 ever put a nice tgd in his thread, but I'll check it out and see what I can distill. Thanks.

dandelO

I don't think anything I've done in the Breaker thread will be of any use here. I opted out of using opacity to remove the edges(which is maybe what Richard is meaning, as I mentioned it somewhere there, I think). I was going to try to apply opacity values to remove the square edges of the plane. Instead, I just used a round lake object.

I can tell you, however, that in your clipfile, Ulco, un-checking 'visible to other rays' in the 'ice under water' node fixes the opacity problem. But if you wanted to add translucency/specular/etc. to that layer, I think that may not work as well as you'd need, as those elements wouldn't be seen, would they?

I think there's a better way than this, though. Having a play with it just now, I'll come back if I find anything...

Dune

Hey, thanks man. Haven't thought of that yet. It's just I wanted to simulate remaining ice shelves under the ice, like in this reference.

dandelO

#5
I'm quite close to making it work and, using only one water object.
There are bugs, namely, holes with no opacity on the white ice. I think it's something I've done while editing the clipfile, that can be fixed. I'll repost the clip when(if :D) I fix it.

Here's where I'm at just now;
[attachimg=#]

*** EDIT: FIXED IT! ;) Back shortly...

*** EDIT: The holes were because the colour was warped but the original voronoi function creating the opacity wasn't.

dandelO

Sorry, I've destroyed your setup. :/

Deleted the second ice object.
Replaced the 3D cell scalar with a 3D diff scalar.
Reduced warp displacement from 5 to 1.
Rearranged the layout to fit it all onto one surface with a self-masking method.
Removed the opacity layer completely and pretended the ice is melted at the edges with the water density inputs.

:D This isn't what you had in mind, I don't think because the actual ice isn't a separate object under the water but it's working better for me than using 2 objects is.

I had 2 final methods, I like the second one best so, I've left it that way in this edited clipfile.
To get the result of image 1, just use the node 'adjust quantity' as the water functions, instead of the original voronoi that it modifies.

Attempt 1;
[attachimg=#]

Attempt 2;
[attachimg=#]

[attachimg=#]

Any use?

neuspadrin


dandelO

I don't think opacity works at all underneath transparent surfaces. Even when 'visible to other rays' is unchecked, you only ever see opaque parts that are above water. I was seeing them to begin with because the waves of the water shader are higher at some parts of the ice object than others. Anything above the surface can be seen in the first clipfile, below it is completely omitted, apparently.

* Cheers, Neuspadrin.

Dune

That's an interesting result, I'll check your tgc. I've been at it myself as well, but not yet quite there. My shelves are more modest, but can be adapted, no doubt. Here's the tgd (for anyone interested). The two water bodies indeed don't work, but this does!

Matt

I'm not sure I follow 100%, but if I read correctly you have an object with "visible to other rays" turned OFF, and that object is under water. For any object to be visible under water it needs to have "visible to other rays" turned ON. The renderer shows objects under the water by casting transparency rays through the water, and these fall under the category "other rays", along with reflection rays and GI rays.
Just because milk is white doesn't mean that clouds are made of milk.

Dune

Well, it's not my fault, but Dandel0's idea  :P  We're trying to figure out why a semi transparent (through default shader) plane won't be transparent anymore when put just underneath a lake.

Tangled-Universe

Quote from: Dune on December 15, 2010, 02:10:07 AM
Well, it's not my fault, but Dandel0's idea  :P  We're trying to figure out why a semi transparent (through default shader) plane won't be transparent anymore when put just underneath a lake.

Isn't this because the opacity isn't working with grey-scale values yet?
So it's opaque when opacity is <0.5 and completely transparent when opacity is >0.5.


Tangled-Universe

Quote from: dandelO on December 15, 2010, 03:55:46 AM
No. Try it.

No. I believe you :)
(The reason I wondered is because the semi-transparency still doesn't work for objects)