Author Topic: underwater Transition causes short glitch  (Read 57 times)

lordauriel

  • Newbie
  • *
  • Posts: 1
    • View Profile
underwater Transition causes short glitch
« on: June 16, 2018, 06:35:34 AM »
Hi!

I am using the underwater script on some cameras, and when I move the camera between above- and under water positions, it seems like the underwater FX script needs a bit to load ("activate") causing the issue seen in the screenshot. Instead of having a seamless transition between submerged and above water, I sometimes see - only for a fraction of a second, but long enough to be very noticeable - the terrain below the water surface as if there were no water at all.
Is there a way to avoid this, or maybe a workaround?

Suimono 2.1.5 (latest official)
Unity 2017.2.1f1 (64b)
« Last Edit: June 16, 2018, 06:37:21 AM by lordauriel »

Chingwa

  • Administrator
  • Hero Member
  • *****
  • Posts: 1587
    • View Profile
    • Tanuki Digital
Re: underwater Transition causes short glitch
« Reply #1 on: June 16, 2018, 10:07:43 AM »
Hi lordauriel,

The underwater transition is a switch between "on" and "off", so there is not a gradual transition, or ability to do a splitscreen type of effect (though this is something I'm working on for 3.0).  What you may be able to do in order to reduce or eliminate the obvious problem shown in your screenshot is to adjust at what height the transition kicks in.  You can do this on the Suimono_Module object under 'general settings' by lwoering the 'underwater transition threshold' setting.  This can be lowered to negative numbers if necessary.  I recommend trying something between 0 and -0.15.

This isn't a perfect solution.  Another possibility is to write a control script for your scene camera that keeps it lockd to a certain height above the water until it hits a certain underwater position, and then switching the lock to be underwater.  This is a bit involved, but is a common way underwater transitions are handled in games to avoid showing artifacts like this.

As mentioned this is hopefully something that I can completely eliminate in 3.0 version.  In my prototypes I've redone the water so it renders in screenspace and in that case there is much more control over how the transitions can be accomplished.  I don't have a projected release date for 3.0 yet, but it is something I am working diligently on.