Author Topic: Underwater CAM upside down + GUI Error  (Read 17737 times)

wnt51

  • Newbie
  • *
  • Posts: 17
    • View Profile
Underwater CAM upside down + GUI Error
« on: June 25, 2015, 09:31:47 PM »
Hi, using Unity 5.1.1f1 with Suimono 2.1.0, Linear and Deferred and DX11. Ran into a weird problem, my underwater CAM mysteriously reflects all the images upside down, I have no idea why it does this at all, it works fine in the demo scene. Additionally I'm getting the following error spam in Console: GUI Window tries to begin rendering while something else has not finished rendering! Either you have a recursive OnGUI rendering, or previous OnGUI did not clean up properly.

I saw this in another thread, but I'm not using terrain composer. I'm just testing this with an example demo scene from the Big Environment Pack.

Finally I'm also getting a null ref exception for the transition b/t underwater and above. NullReferenceException: Object reference not set to an instance of an object
SuimonoModule+$checkWaterTransition$244+$.MoveNext () (at Assets/SUIMONO - WATER SYSTEM 2/SCRIPTS/SuimonoModule.js:870)
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
SuimonoModule:StoreSurfaceHeight() (at Assets/SUIMONO - WATER SYSTEM 2/SCRIPTS/SuimonoModule.js:546)
SuimonoModule:Awake() (at Assets/SUIMONO - WATER SYSTEM 2/SCRIPTS/SuimonoModule.js:243)

Any idea what's going on here. I like this package a lot, I really hope some of this stuff can be fixed. Thank you

wnt51

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Underwater CAM upside down + GUI Error
« Reply #1 on: June 25, 2015, 09:50:09 PM »
I have to say this underwater CAM is a really weird bug. Because it came out of nowhere (literally I changed nothing) and I've been messing around with my scene, haven't touched SUIMONO or the cams at all and miraculously the cam is rightside up underwater now. No idea whats going on. GUI Window Error is still occurring.

Chingwa

  • Administrator
  • Hero Member
  • *****
  • Posts: 1704
    • View Profile
    • Tanuki Digital
Re: Underwater CAM upside down + GUI Error
« Reply #2 on: June 25, 2015, 10:23:40 PM »
Upside down underwater is usually a symptom of Forward rendering.  I'm not sure why it would be happening to you in Deferred, but you may want to make sure that both the Unity settings AND your scene camera are both set to deferred (rather than the "use player settings" on the camera).  You can also try using the "use uv reversal" setting on the Suimono_Module if it continues to happen to you, however I'm not sure if this will work in deferred.

As for the OnGui error this is a mystery to me.  I remember someone else bringing this up before, but it was undetermined as to why it occurred, and possibly may be related to another asset.  There are no OnGUI calls in the core Suimono code (there is in the demo scene, but this shouldn't affect the normal suimono objects).

The nullReference error means it can't find the underwater plane object.  Do you have any other errors that show up in your console before this? 

wnt51

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Underwater CAM upside down + GUI Error
« Reply #3 on: June 25, 2015, 11:25:45 PM »
re: upside down underwater cam - It's all fixed now but I will check the camera settings if it ever happens again, thanks for the tip.

Yes you addressed the OnGui error in another thread. You decided that it related to the terrain. The gentleman in the other thread was using terrain composer so when you deleted that it solved it. I'm not using terrain composer however it is definitely related to the terrain somehow because if I turn the terrain off the error goes away. I'm not using terrain composer at all, I literally just stuck the water into a demo scene from the Big Terrain Pack 1.5.

If you find out what is causing this please let me know -- again it doesn't seem to be effecting anything it is just flooding console with the error, and is real annoying.

The nulRef error occurred (along with all the OnGui errors but thats it) by itself so I don't know why - it was also occurring then the cam was upside down so maybe that had something to do with it. It hasn't occurred since.

There are 3 additional questions I was curious about:
1) The splash/ripple effect is a very dark color almost black, is there a way to get this more of a blue color in line with the water.
2) I'm using a model of a Lion in the water and I noticed that it's shadow on the water is the same texture as the wave/caustics (the white foam), is there a way to make this more of a shadow or reflection even. Right now it just looks like white foam in the rough shape of my lion.
3) The transition effect with the water/screen wipe. It works well on 50 FOV, but on 60FOV it looks too small - it comes out to be a square. I read in your manual to adjust the FX Offset but the lowest it goes down is 0.1 -- if I adjust higher it becomes an even smaller square on the screen. Is there anyway to get this to take up the whole screen on 60?


Lastly, thank you for all your help. This seems to be the best water solution on Unity I've found so far. I left a great review on the asset store for you!



wnt51

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Underwater CAM upside down + GUI Error
« Reply #4 on: June 26, 2015, 02:04:02 AM »
Sorry, I wanted to follow up with 2 things that I noticed - was wondering if you could give me pointers b/c I noticed it in the demo also. Sometimes the whole water plane flashes white (like it glitches into foam for a second) then goes back to normal - this happens in both my scene and the demo scene, any idea what this is about and how to stop it?

The second thing I noticed is where I first start out the scene there is a lot of foam along the shore and then it spontaneously resolves about 10-30 seconds later until a smooth flowing shore line. Is there any way to bypass this short period where the foam extends and obscures the water at the beginning of a scene (I'm wondering if this just happens in the editor).

Chingwa

  • Administrator
  • Hero Member
  • *****
  • Posts: 1704
    • View Profile
    • Tanuki Digital
Re: Underwater CAM upside down + GUI Error
« Reply #5 on: June 26, 2015, 08:27:16 AM »
Thank you so much for the Asset Store review!  It really helps me a lot and I really appreciate you taking the time to do so :)

1) the ripples have been fixed in the next update (meaning they actually show refraction effects now).  I'm not sure why your splash fx would be black... can you post a screenshot?  Also I assume you have a directional light in your scene, correct? the water and splashes are affected by scene lighting so without this it's possible they are getting too dark...?

2) This sounds like a depth/ foam generation issue and not specifically a shadow problem.  You can adjust which layers generate this effect by going to the depth generation and setting specific game layers... and I recommend removing any layers tat are not underwater.  So if your lion object is on a separate layer you can remove this layer from the depth generation and it should fix this.  In the next update I'm reverting back to the previous foam generation techniques (for deferred rendering) so this probably won't be so much of an issue.

3) I never considered anyone would need to go below 0.1.... but you can edit the code for this to give you a lower minimum tolerance.  Open up the Suimono/Editor/suimno_module_editor script file and change line 152... at the end of this line you can see the tolerance range, currently between 0.1 and 5.0.  You can edit the bottom part of the range to 0.001 should give you enough additional range.  I don't recommend setting this to 0.0 though.  I'll lower this tolerance in the next update so you won't have to worry about this going forward.

The momentary flashes you are experiencing when you move around is a known bug with the depth/foam generation.  I'm working on an overall fix for this in the next update.  In the meantime the only real way to prevent this from happening is to lower the alpha value of the foam color setting down to 0. (of course, this removes all foam from your water :( )

Regarding the foam on startup delay... I don't think I've seen this on my end.  Does the foam update after a certain period of time without any input, or do you have to move around the scene first before it will update?

wnt51

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Underwater CAM upside down + GUI Error
« Reply #6 on: June 26, 2015, 02:56:49 PM »
Hey! Sorry I wasn't sure if it was the ripples or the splash or both, so it must have just been the ripples (a black circle).

The Foam Bug after initial Play, updates only after movement, I can move to a certain area and then it looks like it recalculates and normalizes. If I don't move around though it will never go to normal. I don't need to go in the water necessarily for it to fix itself, sometimes if I just run up the beach it looks normal after a few seconds. I can make a video if it will help.

Any idea when the next update is going to be available? I was thinking of making a video to pitch my game, I would like to use the next update cause it has so many promising features - but if it will be a while I can always just cut out some of the flashes etc..

Also thanks for the tips regarding the other issues, I will put them to good use!

wnt51

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Underwater CAM upside down + GUI Error
« Reply #7 on: July 05, 2015, 11:14:03 PM »
That GUI error thing is possibly the most annoying error in the world - it floods the console with messages. Hopefully this doesn't happen in the new fix. This is the second scene it is happening to me on.

Chingwa

  • Administrator
  • Hero Member
  • *****
  • Posts: 1704
    • View Profile
    • Tanuki Digital
Re: Underwater CAM upside down + GUI Error
« Reply #8 on: July 06, 2015, 07:06:18 PM »
Sorry wnt51, I didn't realize you were still experiencing this OnGui error....  The only code in Suimono that includes any OnGui calles are a few scripts in the demo scene.  The entire Suimono "_Demo" folder can be deleted from your project, and I'd be interested to hear if this have any improvement on the error?

I haven't had any other reports yet of missing water, but I'll see what other reports come in the next couple of days and see if I can track down what might be causing this.

Chingwa

  • Administrator
  • Hero Member
  • *****
  • Posts: 1704
    • View Profile
    • Tanuki Digital
Re: Underwater CAM upside down + GUI Error
« Reply #9 on: July 06, 2015, 07:27:19 PM »
Actually, see this post by ddnharris here...

http://tanukidigital.com/forum/index.php?topic=608.msg1846#msg1846

I can confirm the same on my end following his steps.  This seems to only be a problem in 5.1.1, since Unity did some funky changes to the dx9/dx11 handling.  This may be an error specific to this Unity version, I'll investigate.

wnt51

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Underwater CAM upside down + GUI Error
« Reply #10 on: July 06, 2015, 07:45:40 PM »
I tried deleting the _demo folder but I am still getting the OnGUI error. I've tried this on 3 different demo scenes (with terrain). If you start with a terrain from scratch it doesn't occur - but I've gotten other errors this way.

The invisible water plane has to do with the transparency - if you turn off transparency the water comes back although it is quite ugly at that point. The other thing to do is turn off image effects - quite a few things are now interfering with suimono
-Amplify Motion
-SSAO Pro
-TOD_Shadows (Time of Day)
-TOD_Scattering (Time of Day)
-TOD_Rays(Time of Day)

what doesn't interfere:
Amplify Color
Ultimate Bloom
Deluxe Tonemapper

Turning off half of my image effects unfortunately really isn't an option.



Chingwa

  • Administrator
  • Hero Member
  • *****
  • Posts: 1704
    • View Profile
    • Tanuki Digital
Re: Underwater CAM upside down + GUI Error
« Reply #11 on: July 06, 2015, 08:38:50 PM »
I've tested with Amplify motion and it should be working.  There must be something else going on here.  Have you tried a complete uninstall (removing all suimono objects from scene, and then deleting suimono folder from project), and then re-install of suimono 2.1...?

I don't want to frustrate you, I'm just trying to narrow down what might be contributing to the problem.  :)

wnt51

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Underwater CAM upside down + GUI Error
« Reply #12 on: July 06, 2015, 08:44:57 PM »
Your not frustrating me at all, I'd rather get to the bottom of this because aside from the random errors, I think this is the best water system out there -- it'd be a lot harder for me to start from scratch I'd rather just figure out what was wrong. I went into your demo scene and attached all the effects and none of them caused the problem with the water so I'm going back to my original scene and seeing ifI can figure out what is going on.

Edit: Err wait sorry I reimported the experimental version. I gotta reimport the newly released version and see if I can confirm.
« Last Edit: July 06, 2015, 08:46:31 PM by wnt51 »

wnt51

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Underwater CAM upside down + GUI Error
« Reply #13 on: July 06, 2015, 08:54:56 PM »
You must not have tested it recently. Here is how to recreate issue (5.1.1p3)
Import Suimono (latest release)
Import Amplify Motion (latest release)
Open Suimono Demo Scene
Add Amplify Motion Effect to Camera
Hit Play and Watch water magically disappear.

Also just a side note, this is a terribly unstable game engine, must be difficult creating something like this with it. I plan to switch to Unreal as soon as I can.
« Last Edit: July 06, 2015, 08:58:36 PM by wnt51 »

Chingwa

  • Administrator
  • Hero Member
  • *****
  • Posts: 1704
    • View Profile
    • Tanuki Digital
Re: Underwater CAM upside down + GUI Error
« Reply #14 on: July 06, 2015, 09:03:55 PM »
 :-[

You're right.  I just tested this in 5.1.1 and it's just as you describe. :'(
Previous Unity releases didn't have this problem.  This is a serious error, and it's almost certainly related to the graphics api handling, like in the other thread.  I'll see if there's anything I can do on the Suimono end about this...