Get 25% off your next order from the Unity Asset Store: YW86GYBU8S.
Forum begins after the advertisement:
Problem with getting the Underwater Effect working in the YouTube short
Home › Forums › Video Game Tutorial Series › Creating an Underwater Survival Game in Unity › Problem with getting the Underwater Effect working in the YouTube short
- This topic has 4 replies, 3 voices, and was last updated 11 months ago by
A_DONUT.
-
AuthorPosts
-
October 4, 2023 at 4:23 am #11984::
I am working with the water creation video on Unity however by following this one perfectly I do not have the expected result I’m supposed to have a fog or at least a semblance of water but I only have water and not its contents underneath. I show you this just below and tell me what the solutions are thank you again.
October 4, 2023 at 2:30 pm #11985::Hi Gaetoush, there are a few things you want to check:
- You need to start Play-in-Editor for the effect to show up. In your recorded video, your game doesn’t seem to be playing.
- Ensure that you have a child GameObject under the Water Body. This GameObject should contain a plane that is facing downwards, opposite of the direction of your Water Body’s surface, and it should be assigned to the Water Surface layer.
- Make sure your Water Body GameObject is set to be under the Water layer. This isn’t mentioned in our video.
- Another thing that isn’t mentioned in the video is the Depth Layers property under the CameraUnderwaterEffect component needs to be set to select everything except the Water layer. See the screenshot below for reference.
Let me know if this helps!
October 10, 2023 at 7:04 pm #12051::Hello thank you for helping me I return the changes you advised me (I tried to show you the changes made) however even when launching my game, it did not change anything
October 11, 2023 at 12:59 pm #12067::Hi Gaetoush,
In your
CameraUnderwaterEffect.csscript, can you remove the following lines and see if the effects apply?//This is where the image effect is applied private void OnRenderImage(RenderTexture source, RenderTexture destination) {if (material && inWater){ //Update the depth render texture depthCam.Render(); //We pass the information to our material material.SetColor("_DepthColor", depthColor); material.SetFloat("_DepthStart", depthStart); material.SetFloat("_DepthEnd", depthEnd); //Apply to the image using blit Graphics.Blit(source, destination, material); }else { Graphics.Blit(source, destination); }}November 29, 2024 at 3:45 pm #16606 -
AuthorPosts
- You must be logged in to reply to this topic.
Advertisement below:
Get 25% off your next order from the Unity Asset Store: YW86GYBU8S.