How to keep the water of a Lake object out of a closed form e.g. a row boat?

Started by KlausK, May 30, 2022, 07:39:12 PM

Previous topic - Next topic

KlausK

Hi,
does anyone have an idea how to mask the inner space of a object from water of a lake obj?
The pics show what I mean...
Any help appreciated - I cannot get the masking to work. Tried a lot of different combinations on the object and/or the Lake object.

CHeers, Klaus
/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 1070 TI / Win7 Ultimate . . . still (||-:-||)

WAS

Huh, opacity 0 should work masking in a default shader. That's how I've done it in the past. Unless something has changed?

Dune

Opacity doesn't work anymore (it used to). Now I just lower an area.

KlausK

The usual suspects to the rescue! ;D Thx a lot, guys.
I`ll try that asap.

CHeers, Klaus

ps:...one day, I swear I`ll make a compilation of these solutions, especially those which the not so TG savvy user expects to work out of the box, somehow. >:(
/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 1070 TI / Win7 Ultimate . . . still (||-:-||)

Hannes

Quote from: Dune on May 31, 2022, 02:12:57 AMOpacity doesn't work anymore (it used to)
I didn't know that. Weird.
It works in the preview, but not at rendertime. You always get a black area... :(

KlausK

Here is it now.
Quick and dirty with a rough Polygon mask inside TG.
Works well enough for a preview.

Thanks again for the help.

Of course, if you could parent / bind the mask to the object so that it
dynamically adapts to the position in the water...that would be much easier to handle.
When you change the pos/rot/scale of the obj you have to change the lake obj and the mask as well.
Imagine doing a lot of this inner volumes on/in water. Very time consuming.

CHeers, Klaus
/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 1070 TI / Win7 Ultimate . . . still (||-:-||)

Dune

Hannes; it does work with defer all, I think, or no defer at all.

Klaus; what I sometimes do is make a mask from the boat object (screenprint from Lightwave topview, then paint mask in PS). It takes some fiddling to get the exact waterlevel area painted white, and with rough waves you'll have a bit of a problem. So everytime I use that boat I also load that texture and give it the same locations to displace the water down.

Hannes

Quote from: Dune on May 31, 2022, 07:48:14 AMHannes; it does work with defer all, I think, or no defer at all.
It seems to work (at least a bit) by unchecking defer all shading.

Hannes

Quote from: Hannes on May 31, 2022, 08:02:58 AM...(at least a bit)...
Actually it works completely if you uncheck defer all shading. In my attempt it looked a bit strange, but I just forgot to set reflectivity to 0 in my default shader, that was responsible for opacity.
But I don't know, how unchecking defer all shading might affect the rest of the scene...

Dune

I think it's slower because stuff behind other stuff is also computed. Otherwise I don't know. But I tend to delete all opacity masks from older files anyway, because with defer all it's not needed to 'not compute all water under surfaces', so to speak. And oif I don't need water anywhere, like in Klaus example, I just lower it.

WAS

Maybe mix in the default shader with a merge shader, so no water shader is even there, just opacity 0 default shader. Nope seems to be the actual objects that have the issue.

Or use a imported hi-poly plane. But for some reason, displacement isn't working at all. Even with Force Displacement, or even trying to use mesh displacer. Just perfectly smooth hipoly plane.

Seems some improvement needs to be done somewhere. ::)

WAS

Quote from: Dune on May 31, 2022, 09:14:20 AMI think it's slower because stuff behind other stuff is also computed. Otherwise I don't know. But I tend to delete all opacity masks from older files anyway, because with defer all it's not needed to 'not compute all water under surfaces', so to speak. And oif I don't need water anywhere, like in Klaus example, I just lower it.

Lowing it may work for some stuff, in certain angles, but for others, you'll have a visibly noticeable square underwater reflection thing going on from the wall facing camera with water shader and displacement

Dune

Yes, it has its disadvantages, but in case of a boat, you could just lower it enough, at a bit of an angle (smooth step) or mask seabed color in under water level to make it less distinct.

KlausK

Here I used the Paint Shader directly inside TG.
It is fast, easy to do and can be handled a lot easier than an external image.
To adapt changing waves or roughness in the Lake object is easier to do by re-painting-erasing than to fiddle with a mask image.
But that depends on the use case I guess.

I think that works quite well.

CHeers, Klaus
/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 1070 TI / Win7 Ultimate . . . still (||-:-||)

WAS