Planetside Software Forums

General => Terragen Discussion => Topic started by: Dune on December 13, 2010, 12:19:03 PM

Title: default transparency under water doesn't work
Post by: Dune on December 13, 2010, 12:19:03 PM
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.
Title: Re: default transparency under water doesn't work
Post by: cyphyr on December 13, 2010, 12:35:32 PM
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
Title: Re: default transparency under water doesn't work
Post by: Dune on December 14, 2010, 02:21:32 AM
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.
Title: Re: default transparency under water doesn't work
Post by: dandelO on December 14, 2010, 08:12:57 AM
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...
Title: Re: default transparency under water doesn't work
Post by: Dune on December 14, 2010, 08:24:45 AM
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.
Title: Re: default transparency under water doesn't work
Post by: dandelO on December 14, 2010, 09:15:53 AM
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.
Title: Re: default transparency under water doesn't work
Post by: dandelO on December 14, 2010, 10:31:41 AM
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?
Title: Re: default transparency under water doesn't work
Post by: neuspadrin on December 14, 2010, 10:33:57 AM
Wow that looks awesome dandelO.  Cool work.
Title: Re: default transparency under water doesn't work
Post by: dandelO on December 14, 2010, 10:50:41 AM
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.
Title: Re: default transparency under water doesn't work
Post by: Dune on December 14, 2010, 10:51:55 AM
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!
Title: Re: default transparency under water doesn't work
Post by: Matt on December 15, 2010, 01:13:16 AM
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.
Title: Re: default transparency under water doesn't work
Post by: 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.
Title: Re: default transparency under water doesn't work
Post by: Tangled-Universe on December 15, 2010, 03:43:41 AM
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.
Title: Re: default transparency under water doesn't work
Post by: dandelO on December 15, 2010, 03:55:46 AM
No. Try it.
Title: Re: default transparency under water doesn't work
Post by: Tangled-Universe on December 15, 2010, 05:09:46 AM
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)
Title: Re: default transparency under water doesn't work
Post by: Dune on December 15, 2010, 05:15:07 AM
I've got another riddle for you...


By the way, you can simulate ice shelves and trapped air with an extra plane (with some surface layers) just underneath the lake, as long as you get the ground colors as the main input of the first surface layer. But if you drop a shark into the water, it won't be visible.
Title: Re: default transparency under water doesn't work
Post by: Henry Blewer on December 15, 2010, 08:12:54 AM
The shark is an imported object. The plane is an object generated directly by the program. I wonder if these get calculated differently?
Title: Re: default transparency under water doesn't work
Post by: dandelO on December 15, 2010, 08:43:50 AM
I was confused about exactly why unchecking 'vtor' was showing the plane with opacity patches, until I realised this;
Quote from: dandelO on December 14, 2010, 10:50:41 AM
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.

As soon as any object with opacity values in its shader is placed under a transparent object, the opacity effect is completely lost and the subsurface object is rendered as solid again. Transparency appears to completely cancel out the opacity of a secondary object below it.
Although, on a single object, you can still make it have opaque patches and then make those patches transparent.
I confused things earlier by wrongly saying that unchecking 'vtor' appeared to fix the problem, when I got closer to the objects, I realised that only parts of it that were above the transparent surface were visible at all.
I thought I'd cleared that up in the above quote. Should have been clearer. Sorry, folks. :/
Title: Re: default transparency under water doesn't work
Post by: Dune on December 15, 2010, 10:51:10 AM
Right, so the only way to have underwater ice shelves is to throw loose objects in. Here's my result so far with the faked shelves... the transparent ice looks 'deep', but isn't. Any object under the ice or the lake bottom is invisible. Too bad.
Title: Re: default transparency under water doesn't work
Post by: Hetzen on December 15, 2010, 03:10:40 PM
This is where I got stuck Ulco.
Title: Re: default transparency under water doesn't work
Post by: Henry Blewer on December 15, 2010, 06:07:05 PM
The new clouds might be an option. They get cutoff now above and below parameter altitudes, flattening them. If the hardness and density was high enough, they could look solid.
Title: Re: default transparency under water doesn't work
Post by: Dune on December 16, 2010, 03:25:01 AM
Henry, that played in the back of my mind as well, but I think it'll be heavy on the computing, and hard to control. But as long as you don't have rocks or objects under water faking it is not too bad. Now I need to find a way to make the ice shelves that stick out nicer...