Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

PlayWay Water - high quality water system

Discussion in 'Assets and Asset Store' started by zuzzu, Oct 9, 2015.

  1. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    I've been testing this a little bit now, and the main reason I bought it was the Water Volume support... sadly, however, the moment I add a simple 80 triangle mesh collider to an object and the Water Volume Subtract script to it, the performance just tanks.

    I get 15fps, and even though I'm on the deck of the ship, I see a strange, white shadow through solid materials of where, I think, the water is hitting the collider.

    If I instead try to follow some of the included samples and use the Static Water Interaction script, regardless of what options I choose, my Mesh Collider gets completely ignored.

    Note: My ship is a static object. I am not interested in any physics at all. I just need the waterline to be at an accurate height when viewed from the deck and to be able to go down into the interior without having it flood. :)

    Anyone encountered this?

    PS. If I chose "Ocean (No Local Effects)" some seemingly new shadows start to flicker like crazy. And I don't use realtime nor baked lighting. With ocean full settings, everything looks normal.
     
    Last edited: Mar 21, 2017
  2. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    I'm back with a new beta version. It's probably the last beta and there will be one or two release candidates in a few weeks before the final release. It's being uploaded right now, you will be able to download it through the "latest beta" link in a few hours.

    PlayWay Water 2.0b8 changelog:
    • Further performance improvements. Please remember that the new samples use a postprocessing and direct performance comparisons are not accurate. I've benchmarked both versions with the same setup - Unity Postprocessing, Fantastic preset, shadows and similar water settings. Results clearly point that the beta is faster:
    GTX 780 - 108 stable / 151 uncached beta / 158 cached beta
    GTX 980 - 133 stable / 205 uncached beta / 223 cached beta
    GTX 1070 - 200 stable / 280 uncached beta / 300 cached beta
    GTX 1080 - 230 stable / 348 uncached beta / 380 cached beta
    • Water frames caching. From now on it's possible to avoid FFT computations on the GPU each frame and loop pre-cached water animation. It's a work in progress though, using this may cause differences with the physics computations. Physics may be cached for a performance gain too. I'm going to correct this for the next version.
    • DX9 compatibility restored.
    • Mac compatibility restored. Water seems to work, but there may still be some issues. I would appreciate bug reports.
    • Foam is now displayed correctly when local effects are not used.
    • Subsurface scattering improvements. It's now consistent between forward and deferred water render modes.
    • I've included textures for the wave, splash and trail particles. They are located in the "Surface Particles" directory along with a Substance Designer file, if you would like to improve or customize them. Samples for the particle features will be included in the upcoming RC version.
    • It's now possible to draw arbitrary renderers (like Unity's built-in particles) into the water maps - displacement, normal, mask and foam. To use this feature, you have to enable it on the water, put objects on a hidden layer and add WaterSurfaceOverlay components on them. As an example of shaders that use this feature please take a look into "Shaders/Particles" directory.
    • Particle shader used by the new Unity Technologies particles package wasn't fully compatible with the water. I've included a modified soft particles version at "Shaders/Particles" directory.
    • Caustics bugs in inspector and shader were all fixed.

    I'm working on a new documentation and sample scenes for 2.0. I'm going to include them in the upcoming RC version.

    I've tried moving some computations from the vertex to the tesselation stage as I promised before. It didn't worked out really and was just a waste of time (no performance gain). Luckily, some other optimizations were possible and they may positively contribute to the overall performance a bit.

    I'm catching up with my correspondence for a few days, please stay patient just a bit longer, if you need anything. I deeply apologize for this situation.
     
    GuinUK, GMax, zmaxz and 5 others like this.
  3. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    240
    That sound great zuzzu, looking forward to test the new beta version.
     
  4. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,409
    Thanks so much for your development efforts :)
     
    zuzzu likes this.
  5. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    What was the FPS before using this feature? Possibly there is some error spam in the log.

    Sometimes lights without the "important" flag are being pushed into the vertex shader by Unity, checking that option may be worth a try. Additional lights are very performance heavy in the forward render mode though as they require a whole sea to be redrawn. If they are needed I strongly recommend to use deferred water render mode on WaterCamera with the latest beta.

    May I ask for a reproduction scene? I can also connect through a TeamViewer to debug it fast without using much of your time.

    Well.. things are always more complicated than they look from the outside.

    Writing a response doesn't take seconds for me as I'm not a native speaker. It also often starts a long conversation that consumes really great amounts of time, definitely not seconds.

    It's easy to deduce by the name of this asset, that despite me being it's sole author, it's legal owner and main beneficient is PlayWay. I can't fully handle the user support part with a growing popularity without having resources for additional people to help me with that.

    I'm going to develop this asset for a long time in my own pace and will continue to do my best to be helpful for it's users, but please remember that it's a side activity for me (like for many other Asset Store authors) and situations like this are sometimes inevitable despite my best intentions.
     
    Zaki_X, panFX, elbows and 2 others like this.
  6. panFX

    panFX

    Joined:
    Aug 18, 2014
    Posts:
    15
    Hi zuzzu,

    was trying to migrate beta8 into my project, starting with new shader profile and new water settings, but couldn't get it to work. Unity throws an exception:

    NullReferenceException: Object reference not set to an instance of an object
    PlayWay.Water.WavesRendererFFT.Dispose (Boolean total) (at Assets/UnityAssets/PlayWay Water/Scripts/WindWaves/WavesRendererFFT.cs:395)
    PlayWay.Water.WavesRendererFFT.OnCopyModeChanged () (at Assets/UnityAssets/PlayWay Water/Scripts/WindWaves/WavesRendererFFT.cs:257)
    PlayWay.Water.WavesRendererFFT.Enable () (at Assets/UnityAssets/PlayWay Water/Scripts/WindWaves/WavesRendererFFT.cs:117)
    PlayWay.Water.WindWaves.ResolveFinalSettings (WaterQualityLevel quality) (at Assets/UnityAssets/PlayWay Water/Scripts/WindWaves/WindWaves.cs:422)
    PlayWay.Water.WindWaves..ctor (PlayWay.Water.Water water, PlayWay.Water.Data data) (at Assets/UnityAssets/PlayWay Water/Scripts/WindWaves/WindWaves.cs:116)
    PlayWay.Water.Water.CreateWaterComponents () (at Assets/UnityAssets/PlayWay Water/Scripts/Water.cs:609)
    PlayWay.Water.Water.OnEnable () (at Assets/UnityAssets/PlayWay Water/Scripts/Water.cs:134)
     
  7. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    My bad, thank you for a report. I'm uploading a fixed version.
     
    panFX likes this.
  8. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    @zuzzu please reply to your private messages. I believe there are many people waiting to get access to the beta.
     
    GuinUK likes this.
  9. panFX

    panFX

    Joined:
    Aug 18, 2014
    Posts:
    15
    @zuzzu

    thanks for the re-upload. Foam is working again, yay! Nice work man. Now i have to check the performance optimizations...
     
  10. CHADALAK1

    CHADALAK1

    Joined:
    May 7, 2013
    Posts:
    11
    @zuzzu , I was curious if there is a way with Playway to fix the Planar Reflections in VR? I've noticed it culls out from the left eye and in the bottom peripheral depending on the VR Camera's rotation. Is there a way to increase the FOV on the reflections camera?
     
  11. GuinUK

    GuinUK

    Joined:
    Feb 27, 2017
    Posts:
    44
    @zuzzu hey man any chance I can get the beta download. I purchased it about 2 weeks ago

    Thanks man,

    Guin
     
  12. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Everybody will get beta links soon ;) I'm sending them in chunks since morning.

    What water version do you use? If you use stable version, please send me your Invoice No in a private message and I will respond with download links to the latest beta release. No worries, it's completely safe to use in case of VR.
     
  13. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    533
    Hi @zuzzu

    I send PM with link to download the scene. a greeting
     
  14. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    300
    On a Mac Pro 6,1 12-core Xeon w/dual AMD FirePro D700 GPU's, and running macOS Sierra, here's what I'm getting:

    In Unity 5.5.2p2
    PlayWay 1.1.6 (release version), looks great, runs smoothly, Physics Stress Test consistently gets to >40fps after dropping over 100 cubes into the water.
    PlayWay 2.0 latest beta (downloaded today) looks great, runs smoothly... but at lower frame rate. Physics Stress Test only gets to 29-33fps after dropping over 100 cubes into the water.

    In Unity 5.6.0f1
    PlayWay 1.1.6 (release version), causes the machine to lock up and requires a cold boot (using power button)
    PlayWay 2.0 latest beta (downloaded today), same result, very hard crash.

    I was hoping to see an increase in performance under Unity 5.6 (which adds Metal support for Mac users), and was hoping that both assets would work (especially with the Unity 5.6 release expected in a little over a week).
     
  15. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Yes, physics are expected to be around 25% slower. There was a bug in drag computations that sometimes caused unexpected behaviour. The only way to fix it was to add a square root into the computations.

    Do you experience those crashes in all sample scenes or is it just the physics stress test?
     
  16. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    300
    All the sample scenes, unfortunately. The first frame of the scene loads, the sound starts to play, and then the machine locks up. Spinning beach ball cursor can move about the screen, but no task switching, no force quit, it requires holding the power button down for several seconds to force shutoff, then restart a few seconds later.

    Hopefully you'll be able to leverage Metal (low level API) to help with calculations on the GPU.
     
  17. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Samples worked for me on Unity 5.6, but I haven't tried Metal I think. I will do my best to fix this for the next version.
     
  18. pat_trick

    pat_trick

    Joined:
    May 23, 2016
    Posts:
    20
    Thank you for the updates! I had sent a PM regarding the 5.5 compatible beta; are links still being sent out?
     
  19. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    300
    The Unity 5.6 installation I tested on was a fresh install, and new project with only two other assets installed - Voxeland and Relief Terrain Pack. None of those were in use in the scene, though. If I get the time and chance to shut everything else down (to minimize impact of such a hard crash), I'll delete and re-install again.
     
  20. Zaki_X

    Zaki_X

    Joined:
    Jul 5, 2016
    Posts:
    55
    I've managed to solve almost all my issues that I had and that I'd described above with beta version provided by zuzzu. Thank you very much! This asset is simply worth every penny! Best water system for Unity for sure.
     
    elbows likes this.
  21. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    651
    I have attempted to move up from Unity 5.4.1f1 to 5.5.1f1. I use Unistorm, which worked fine with PlayWay in 5.4.

    Now, in Unity 5.5 I encounter this:
    PlayWay in Unity 5.JPG
    1. There is a big dark shadow in the vicinity of my player.
    2. Fog is behaving strangely.

    Any suggestions?

    PS I like PlayWay Water, but I need to go up to 5.5 for it's additional capabilities.

    EDIT: I just tried another time of day asset, Instand Good Day, in Unity 5.5 with PlayWay, and the same issues are present, so it seems they are related to PlayWay Water, and not the time of day assets.
     
    Last edited: Mar 26, 2017
  22. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    651
    @zuzzu

    I cannot get PlayWay working in 5.5. I get a dark (sometimes undulating) area on the ground near my camera/character, and the fog does not work properly. I tried PlayWay with two different time of day assets, got the same problem with both. Is this problem resolved in the new beta? Do I need the beta? I would be happy to let you know how my testing goes if you can get me a copy. The issue is as shown in the post above.
     
  23. Ryan687

    Ryan687

    Joined:
    Sep 6, 2016
    Posts:
    2
    Hey zuzzu, great water system ya' got here. I've been playing with the Curved Worlds by VacuumShaders asset as well, and came across the same question as Superflat in February 2016. You had mentioned in a reply to that post that support might get added. Did anything ever come of this? (if not, I wanted to express interest in this, as your water system is just the best :) )
     
  24. TheTrollPlays

    TheTrollPlays

    Joined:
    Feb 26, 2017
    Posts:
    2
    Hi, my water is pink and flat and I am getting this message:

    Shader error in 'PlayWay Water/Variations/Water _ALPHABLEND_ON _CUBEMAP_REFLECTIONS _INCLUDE_SLOPE_VARIANCE _NORMALMAP _PLANAR_REFLECTIONS _VOLUMETRIC_LIGHTING _WATER_FOAM_WS _WATER_REFRACTION _WAVES_FFT': undeclared identifier 'samplerunity_SpecCube1' at Assets/PlayWay Water/Shaders/Water/UnityGlobalIllumination.cginc(186) (on d3d11)
    Compiling Vertex program with DIRECTIONAL _WATER_FRONT _WAVES_FFT
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP

    Please help!
     
  25. wise_hbg

    wise_hbg

    Joined:
    Nov 19, 2015
    Posts:
    3
    Hi!
    We have discovered an issue/bug with how PlayWay Water manages its quality settings in the Unity Editor.

    Our Unity project is version controlled using a Git repository. PlayWay Water automatically creates an asset (ScriptableObject) for its quality settings (in Assets/PlayWay Water/Resources/WaterQualitySettings.asset) which is also tracked by the Git repository.

    The Git repository does not track the project's Library directory so when somebody checkout and opens the Unity project for the first time, Unity has to process all the assets. During this phase we observe that WaterQualitySettings.asset gets modified and the quality levels within in it is cleared. This is a problem on our build server because when this happens our project is built with the incorrect (empty) quality settings. PlayWay Water malfunctions when it is fed an empty quality level (such as zero for some parameters).

    The bug that causes this is located within the ScriptableObjectSingleton class. During the "asset processing phase" when first opening the project, the method WaterPlanarReflection.OnValidate() is called and will causes the static method LoadSingleton<WaterQualitySettings>() method to be called. The call to Resources.Load<T>(typeof(T).Name) will return null even if the asset is actually present in the project folder (my guess is that it just hasn't been loaded by the resource manager yet). This in turn causes the code to call AssetDatabase.CreateAsset() which effectively replaces the present asset with a new empty one.

    I've included our modified version of ScriptableObjectSingleton.cs that solved the issue for us. Feel free to include it in future releases.
    Note! It raises an exception just to indicate what happened in the Editor log. It should be safe to ignore though.
     

    Attached Files:

    zuzzu and ftejada like this.
  26. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    I'm back for good this time and apologize for delayed responding earlier. I need to catch up with my work right now, but I will do my best to visit here on a regular basis.

    I will release one more beta version with new features before I will start pursuing a stable 2.0 release for the Asset Store.

    Such behavior had been reported a few times in the past, but I couldn't reproduce it on my end. Thank you for your effort. I will include your fix in the next update.

    I recognize that error. It looks that you use an outdated water and Unity 5.5+.

    If you use the latest water, you may just need to rebuild its shaders (there is an option for that in Water component context menu).

    It looks like you would use a version of water that doesn't comply with Unity 5.5 reversed depth buffer. You may try to re-download this asset from the Asset Store to be sure.

    If that won't help please send me a private message with your Invoice No. and I will send you back a beta link. Beta will work fine with these weather assets.

    I tried 5.6.0f1 recently and was experiencing such crashes too on that specific version, but they seem to be completely fixed now in 5.6.0f2. I'm not sure, if we have experienced the same problem though.
     
    wood333 and iddqd like this.
  27. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    I'm aware of a team that modified my shaders for such use case.

    They said that it was a simple task, but I think that porting underwater masks, physics and all other features may be pretty challenging. I will probably get to that point eventually, but for now I need to concentrate my efforts to finish a version 2.0 of this asset.
     
  28. CletusVandamme

    CletusVandamme

    Joined:
    Nov 3, 2015
    Posts:
    3
    Hi,

    We are noticing a rendering glitch on Intel HD 520 graphics laptops (works great on all other cards) when using the latest 1.1.6 release available on the Asset Store. There are also a number of Shader Unsupported messages that get logged to the web player log. Since this project needs to target the webplayer we are still using Unity 5.3.6.

    Attached are the dxdiag, web player logs, and below is a screenshot of the issue.

    Has anyone else run into this? Any ideas?

    Thanks!

    PlayWay waterbug intel520.png
     

    Attached Files:

  29. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    Can you uncheck an setting marked below in Water settings and run a test on that card again? If this will help, be sure to check this again and I will add that card to the internal mipmap blacklist.

    upload_2017-3-29_23-22-20.png
     
  30. CletusVandamme

    CletusVandamme

    Joined:
    Nov 3, 2015
    Posts:
    3
    Hey Zuzzu,

    Thanks for the quick response!

    Just ran a test with the "Allow Floating Point Mip Maps" option disabled and it did make the flicking boxes issue go away. Is there any harm leaving this option disabled in the short term or would it be better to wait for a full fix to roll out?

    Also was curious if Unity 5.3 is still on the list for support in the upcoming v2.0 of PlayWay water. We have tried the latest beta and looks to need 5.4+

    Thanks!
     
  31. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    No worries, I will send a patch tomorrow. Disabling this setting may be bad for performance on NVidia cards, it's here mostly for debugging.

    Yes, v2.0 will be compatible with Unity 5.3.
     
  32. paulHouard2017

    paulHouard2017

    Joined:
    Mar 29, 2017
    Posts:
    3
    Hi,

    I want to do something really simple that is to change the waves in real time (getting more waves or less) but it seems to be complicated. Even if I need to call CreateSpectrum(wind) to regenerate the wave spectrum this is a must needed function.

    Or having a component that does what your demo is doing fading one component to another, in a simple way. I am going to check how you are doing in the demo, but I think that this very basic feature should be exposed in the Ocean script.

    thanks
     
  33. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    651
    Finally got it working. Re-downloading did not do the trick. I upgraded from Unity 5.5.1f1 Unity to 5.5.2f1 Imported Playway and Unistorm and the fog issues seemed resolved, but I still had water (layer?) issues. The clue to the fix (in 5.2.2f1 was related to Unistorm, the sky was suddenly inexplicably gray and the sun was missing. I removed PlayWay and the sky was still wrong, so not PlayWay's fault. The solution: Re-import standard assets "effects".

    Bam! Blue sky. I re-imported PlayWay, set it up and viola, success!

    So the fix involved a fresh upgrade of Unity, fresh downloads of Unistorm and PlayWay, and then also, re-import the standard assets from Unity 5.5.2f1. Whew! Oh, and a final note, the sun asset is remaining assigned. All good now.
     
  34. cweisbaum

    cweisbaum

    Joined:
    Mar 23, 2017
    Posts:
    3
    @zuzzu Having trouble figuring out how to get bow and stern waves to work in latest beta. Can you give some more hints at how to get this working?
     
  35. Fraconte

    Fraconte

    Joined:
    Dec 6, 2013
    Posts:
    327
    You can try this minimal scene in the file below.
    In this scene I have it working with the camera rendering path set to deferred. If you set the camera to forward it works in an inversed way.
    If you set the camera to forward and the render mode of the WaterCamera script to image effect forward, it crash. But only if you have the WaterVolumeSubtract script on the boat active. When it crash, Unity seems frozen but you can still access the menu and close it.

    Note that the Y position of the water must be set to 0 to play in sync with the particle effect. Perhaps it works at different height too, if you use a Unity particle system.

    In the same project I have another scene working in forward, with render mode in the WaterCamera script set to default and a WaterVolumeSubtract script active, but I'm not able to get what the differences are. Apparently all use the same water settings.
     

    Attached Files:

    Last edited: Mar 31, 2017
  36. cjcatrix

    cjcatrix

    Joined:
    Jun 8, 2014
    Posts:
    13
    Hi everyone, just thought I'd pass on an issue/fix I've found with Unity 5.5 and above, and the latest beta version of PlayWay water (as of 1st April - no this isn't an april fool's :))

    Edit: just to be clear, this is an issue with the GlobalFog out of the Legacy Image Effects package (water samples just use it) - likely superseded in the new Post Processing Stack package - I haven't tried that yet, I would imagine it has been corrected - but I'll leave this here in case others fall into the same issue with the legacy package.

    I was getting the fog occluding my skybox (fog coloured black here to stand out).
    This is just a vanilla swell demo with the standard asset dependencies also loaded.
    FogIncorrect.png

    I read about the depth values being flipped in 5.5 so traced this down to the GlobalFog.shader - line 141 in the ComputeFog method was:
    // Do not fog skybox
    if (rawDepth >= 0.999999)
    fogFac = 1.0;

    I flipped the test to "if (rawDepth <= 0.00001)"

    This gets this result instead (fog still black for testing - now showing distance fog on the horizon but not the skybox):
    FogFixedBlack.png

    With the fog colour selected to match the skybox horizon colour, this now comes out as:
    FogFixed.png

    Hope this helps, and great appreciation to zuzzu for an awesome plugin and the amazing amount of support he gives.

    Regards, Craig
     
    Last edited: Apr 1, 2017
    hopeful likes this.
  37. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    300
    Thanks for the response, @zuzzu. I just installed 5.6.0f3 and the latest 2.0 beta, and am happy to report that on Mac it runs in OpenGL mode. In fact, the physics stress test performs even better now, 43-50fps with 100+ objects dropped into the water.

    Unfortunately, however, enabling Metal support in the editor still leads Playway to lock up the entire system when I hit play on any of the test scenes. Hopefully it won't be too difficult to add support for that, as it would mean a significant performance boost for most users on that platform.
     
    Last edited: Apr 1, 2017
  38. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    I'm working on a sample scene for the next update. I will upload it in 1 to 2 weeks.

    Yes, that would be very helpful, if you could send a reproduction project. I'm not sure what may be the cause of the first issue. Do you use a Standard shader for the platform?

    Regarding underwater effect, you need to attach UnderwaterIME to your camera to see it.

    Metal support may be problematic to support for me at this moment. My 2008's MacBook from PlayWay seems to be way too old to support this API. I will try to get a better device from them soon.
     
  39. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    342
    Just to add my voice to the others: Metal compatibility on Mac is essential.
     
  40. Ruben_Chris

    Ruben_Chris

    Joined:
    Mar 10, 2013
    Posts:
    94
    Is it possible to get a player demo or something? I'm having some troubling with the transition between land and water with my player. The water height calculations are not 100% accurate even when I set precision to 1.0 so I don't really know how to check if the player is able to swim or not.

    So far I've had best luck grabbing the WaterLevel float from the WaterCamera on my player and checking that with the position of my player. If it qualified to be swimming I then activated the water float script, but that makes everything lag and the camera shakes all over the place. You can see my code below (the code is inside the Update function).

    Code (CSharp):
    1.  
    2.         waterLevel = GetComponentInChildren<WaterCamera> ().WaterLevel;
    3.  
    4.         if (waterLevel > transform.position.y + 0.3f) {
    5.             swimming = true;
    6.             GetComponent<WaterFloat> ().enabled = true;
    7.         } else {
    8.             swimming = false;
    9.             GetComponent<WaterFloat> ().enabled = false;
    10.         }
    Any suggestions?
     
  41. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    533
    Hi @zuzzu

    He asked me for a copy of my scene to see the problem and I sent it by PM. I also sent a copy of the bill in that PM to have access to the latest Beta.

    Did you get the private message?

    regards
     
  42. Fraconte

    Fraconte

    Joined:
    Dec 6, 2013
    Posts:
    327
    Perhaps your camera's shaking is caused by the loop of activating WaterFloat when under water and deactivating it when floating above. Look at the code in WaterFloat to just get the water height without setting the position.

    Edit: On second thought, because you just seems to get the correct height, just try to set the height bonus on the WaterFloat script to a negative value. Just to be sure you stay underwater.
     
    Last edited: Apr 2, 2017
  43. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,409
    Hard system lockups can be indicative of a bug Unity need to fix with Metal. I've been using metal for other things throughout the 5.6 beta and I would note that support for Metal inside the editor is still classed as experimental in 5.6.

    So the first question is whether it also locks up outside the editor - if you build a playway water scene does the built game also crash the system?

    I will do some testing myself soon. Whether I will be able to help depends if there are any clues about what part of the system is causing the problem.
     
  44. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,409
    I just tried this myself and I do not get the hard lockup at all - could be down to different graphics card or some other factor I guess?

    The errors I get with metal show themselves visually in various ways, but luckily there are also various warnings in the console that may help to narrow down the issues.

    I get these type errors as soon as I switch to metal in editor:

    Metal: Vertex shader missing texture binding at index 0 (_DisplacementsMask / PlayWay Water/Depth/Water Depth)

    Metal: Vertex shader missing texture binding at index 0 (_DisplacementsMask / PlayWay Water/Variations/Water _ALPHABLEND_ON _CUBEMAP_REFLECTIONS _INCLUDE_SLOPE_VARIANCE _PLANAR_REFLECTIONS _WATER_REFRACTION _WATER_OVERLAYS _WAVES_FFT)

    And when entering play mode I get a lot of these:

    Metal: Shader[PlayWay Water/Utility/ShorelineMaskGenerate]: Pixel format [MTLPixelFormatR32Float] of texture [TempBuffer 772 1024x1024] bound at index 0 is incompatible with texture parameter [half _MainTex]. Compatible types [float]

    Metal: Shader[PlayWay Water/Utility/ShorelineMaskGenerate]: Pixel format [MTLPixelFormatR32Float] of texture [TempBuffer 773 1024x1024] bound at index 0 is incompatible with texture parameter [half _MainTex]. Compatible types [float]

    Metal: Shader[PlayWay Water/Spectrum/Water Spectrum]: Pixel format [MTLPixelFormatRGBA32Float] of texture bound at index 0 is incompatible with texture parameter [half _TileSizeLookup]. Compatible types [float]

    Metal: Shader[PlayWay Water/Utility/ShorelineMaskRender]: Pixel format [MTLPixelFormatR32Float] of texture bound at index 0 is incompatible with texture parameter [half _MainTex]. Compatible types [float]
     
  45. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    651
    dark underwater.JPG It seems too dark underwater. Can this be adjusted?
     
    Last edited: Apr 4, 2017
    mariamism likes this.
  46. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    240
    Hi zuzzu, I have a problem with the bow wave emitter. How can I change the position of the bow wave emitter?


     

    Attached Files:

  47. zuzzu

    zuzzu

    Joined:
    Feb 2, 2013
    Posts:
    404
    You should be able to simply move that emitter into the desired location. It's best to use a child object for that purpose.

    Yes, properties that have impact on the brightness under water are diffuse and transmission color on your water profile. In the beta releases scattering and shore color affect it too.

    Thanks, errors that appear during play mode should be easy to fix, but I'm not sure about the first two. Do they appear just once or get constantly spammed?
     
  48. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,409
    There are 30 or so messages but they only appear in one go when switching to metal, not when reloading the scene in the editor etc. I'm guessing some shader recompilation or some other reinitialisation occurs when switching graphics API and this is when they come up.
     
  49. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    240
    Thx zuzzu looks great now.
     

    Attached Files:

    gibmation likes this.
  50. _alphaBeta_

    _alphaBeta_

    Joined:
    Aug 8, 2014
    Posts:
    37
    zuzzu,

    It's great that you're back. I had two questions a few pages back:

    This wave jitter / acceleration is still quite an issue for me.
    If you need a resend on the beta access PM, please let me know (original may still be in your queue from about a month ago). I'd really like to take a look.