But since this is more a general UE4 issue. i hope i get more luck in posting here.
I made a small test boat for ark and i was woundering how i can mask out the water in my boat.
looks like a sinking boat.
Yea it does
Dunno if itâs gonna help but if you enable collision on your boat or on the water? Seems like now they are merging and collision may not let that happen. Just a thoughtâŚ
That wont work
You could try this:
in your water material you have to use a node which is called âdepth fadeâ. With that you can choose the opacity of your water material depending on the depth -> so set the depth to a low value and change the opactiy to nearly invisible. () This method is used to simulate âshore effectsâ and other things.
But depending on your level it will also cause problems when you do it like that -> the water directly at the coast will also be nearly invisible when you do it like that -> so you will have to create pretty steep shores
Saw a post a couple of months ago similar to this, they were creating a submarine game and had the same issue. Somehow with custom depth or something they managed to make the water not render if inside that particular volume, think they got answers from the same guys that worked on Bioshock infinte with the same issue. Search around the forum for something about that.
Seems like a lot of work and the solusion does not seem like a good one for Ark. (i dont want to make a tc mod, just a standar stackeble mod).
Im just going to make a new boat instead. One where everything is above the waterplane.
Anyway thanks guys.
You could use custom depth but it would require splitting the inside of the boat to be a separate mesh since you can only change customdepth per mesh. otherwise the water wonât draw over the outside of the boat either and that will look like the boat is floating. Once you have that, you just check in the water material if the pixeldepth is greater than the customdepth and if so return 0, otherwise return 1.
This depends on the water.
Transparent materials come with a sort priority.
Non transparent materials do not. And you can only mask them with stencils.
A catchall is to create a boat mesh that has 2 separate hulls as 2 separate meshes.
The outer hull is under water and affected by the waves etc.
The inner hull is stencil masked, so water is never drawn on top of it, giving the illusion to be âdryâ.
If you make the mesh right youâll really never norice anything wrong until you purposuly try and sink the boat.
To sink the boat you have to parametrize and change the stencil value that the water material uses to ignore.
Or, in c++ you can setCustomDepthStencil to change the value of the mesh itself which when it works is a little cleaner of a solution
I agree with you but I have realised that this is so far most reliable way to do this because of:
When you run fluid sim on ocean surface that is affecting terrain thereâs annoying problem when water surface starts to go down the drain during the simulation. Thatâs why I keep my ocean level fixed.
Iâve got FAQ from customers with some models of AMD graphic cards that ocean surface is looking like a glitch when I was doing hull masking with realtime scene capture. This technique works on every platform, even in VR.
With distance fields you can easily generate coastal waves and ripples.
Iâve got better frame-rates by using distance fields instead of realtime scene capturing especially when you have a lots of boats in the scene.
I prefer to make my own terrain instead of being limited to water brush manager.
I followed this tutorial and I got it (almost) working for me.
My Problem is that the inside of the boat is not completly masked somehow.
Almost everything of the ocean is masked except for some kind of details from the gerstner waves and the bright top reflaction of the waves passing by. Those are shimmering through as you can see in the image.