Search Unity

SUIMONO 2.0 - Interactive Water System

Discussion in 'Assets and Asset Store' started by chingwa, Jan 6, 2015.

  1. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    @Birdiesign I'm only able to recreate this error when selecting "webplayer" in the build platform list. Are you sure you have it set to "PC, Mac and Linux Standalone"?

    I was able to export to webplayer without errors by switching the code around to always return a value, though I'm not able to test the build because I no longer have a browser that supports webplayer. Try the following code, replacing that entire function:

    Code (CSharp):
    1.  
    2. public int PresetGetNum( string mode, string pName){
    3.  
    4.    int setMode = -1;
    5.    int setFolder = -1;
    6.    int setPreset = -1;
    7.  
    8.    #if !UNITY_WEBPLAYER
    9.  
    10.    if (mode == "folder"){
    11.        //get preset directories
    12.        tempPresetDirsArr = new List<string>();
    13.        dirInfo = new DirectoryInfo(dir+"/").GetFiles("SUIMONO_PRESETS_*");
    14.        if (new DirectoryInfo(dir+"/") != null){
    15.            for (d = 0; d < dirInfo.Length; d++){
    16.                tempPresetDirsArr.Add(dirInfo[d].ToString());
    17.            }
    18.        }
    19.        tempPresetDirs = new string[tempPresetDirsArr.Count];
    20.        for (dn = 0; dn < tempPresetDirsArr.Count; dn++){
    21.            tempPresetDirs[dn] = tempPresetDirsArr[dn].ToString();
    22.            tempPresetDirs[dn] = tempPresetDirs[dn].Remove(0,dir.Length);
    23.            tempPresetDirs[dn] = tempPresetDirs[dn].Replace("SUIMONO_PRESETS_","");
    24.            tempPresetDirs[dn] = tempPresetDirs[dn].Replace(".meta","");
    25.            if (tempPresetDirs[dn] == pName) setFolder = dn;
    26.        }
    27.        setMode = setFolder;
    28.    }
    29.  
    30.    if (mode == "preset"){
    31.        //get preset files listing
    32.        tempPresetFilesArr = new List<string>();
    33.        pdir = dir + "/SUIMONO_PRESETS_"+presetDirs[presetFileIndex];
    34.        fileInfo = new DirectoryInfo(pdir).GetFiles("SUIMONO_PRESET_*");
    35.        if (new DirectoryInfo(pdir) != null){
    36.            for (f = 0; f < fileInfo.Length; f++){
    37.                tempPresetFilesArr.Add(fileInfo[f].ToString());
    38.            }
    39.        }
    40.        px = 0;
    41.        for (nx = 0; nx < tempPresetFilesArr.Count; nx++){
    42.            if (!tempPresetFilesArr[nx].ToString().Contains(".meta")) px++;
    43.        }
    44.        tempPresetFiles = new string[px];
    45.        ax = 0;
    46.        for (n = 0; n < tempPresetFilesArr.Count; n++){
    47.            if (!tempPresetFilesArr[n].ToString().Contains(".meta")){
    48.                tempPresetFiles[ax] = tempPresetFilesArr[n].ToString();
    49.                tempPresetFiles[ax] = tempPresetFiles[ax].Remove(0,pdir.Length);
    50.                tempPresetFiles[ax] = tempPresetFiles[ax].Replace("SUIMONO_PRESET_","");
    51.                tempPresetFiles[ax] = tempPresetFiles[ax].Replace(".txt","");
    52.                if (tempPresetFiles[ax] == pName) setPreset = ax;
    53.                ax++;
    54.            }
    55.        }
    56.        setMode = setPreset;
    57.    }
    58.  
    59.    #endif
    60.  
    61.    return setMode;
    62.  
    63.  
    64. }
    65.  
     
    Birdiesign likes this.
  2. Birdiesign

    Birdiesign

    Joined:
    Feb 13, 2019
    Posts:
    10
    Yes, it's definitely set to "PC, Mac and Linux Standalone", but during the compile process which we start via the CourseForge plugin, the Unity window border info switches to "webplayer..." for some time, in the end it shows "PC, Mac and Linux Standalone" again. I never cared about this as everything was running fine. And i think it's the way it has to be as the CourseForge devs (in the beginning) had plans or wanted the option to make their game also browser playable or whatever. They also have other golf related software going on and maybe it also has something to do with this that the webplayer is still in play.
    I have to say i wrote these lines after just making a quick search for "webplayer" on their forum so probably i don't understand the whole logic behind this webplayer thing...
    I just think it's no error or something wrong with it when it shows "webplayer" during the compile process.

    I will give your code a try now...

    Thanks a lot!
     
    chingwa likes this.
  3. Birdiesign

    Birdiesign

    Joined:
    Feb 13, 2019
    Posts:
    10
    Update...

    With your new code the compile process seems to run normally!!

    Will report back later because one build takes about 7-10 loooong minutes...
     
    chingwa likes this.
  4. Birdiesign

    Birdiesign

    Joined:
    Feb 13, 2019
    Posts:
    10
    So far i can't get it to work on my course build. Maybe there are some functions which are not supported by the sim.
    But i also couldn't get the preset saving to work as expected after reading the tutorial for sure. Also the scaling of the mesh gets reverted here and there no matter if saving in play mode or in "stop" mode, scene view or game view and and and...
    But i keep on testing...
     
  5. Birdiesign

    Birdiesign

    Joined:
    Feb 13, 2019
    Posts:
    10
    I think the problem could be that there seems to be no support for additional cameras or certain camera scripts in our golf sim.
    I also tried to add image effects and some assets depending on their own cams or cam scripts these days with no success.
    If you have another tip or workaround I could try feel free to tell me, I can try after the weekend. Maybe to get the water basically working without some advanced features or the need of cam scripts. But that's probably impossible I guess...
    Anyway thanks for your great support!
     
  6. Untitl3d

    Untitl3d

    Joined:
    Jun 20, 2019
    Posts:
    7
    Hi
    Any news in regards to the all-new Suimono v3? hoping it supports the new Unity render-pipeline!
     
    Vincent13122 likes this.
  7. wumn

    wumn

    Joined:
    Jan 11, 2018
    Posts:
    25
    Does SUIMONO Water System support HDRP?
    另外,你似乎会中文?
     
  8. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    No, It does not support HDRP.
    Suimono 3 is in development, but I have not done any development for HDRP at this time.

    对不起,我不会说中文,但我会说日语。
     
  9. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    99
    Am getting a persistent error:


    IndexOutOfRangeException: Index was outside the bounds of the array.
    Suimono.Core.SuimonoObject.PresetLoad (System.Int32 ppos) (at Assets/SUIMONO - WATER SYSTEM 2/SCRIPTS/SuimonoObject.cs:1392)
    Suimono.Core.SuimonoObject.ReloadData () (at Assets/SUIMONO - WATER SYSTEM 2/SCRIPTS/SuimonoObject.cs:479)
    Suimono.Core.SuimonoObject.Start () (at Assets/SUIMONO - WATER SYSTEM 2/SCRIPTS/SuimonoObject.cs:424)


    Any idea what this means?

    Any assistance is greatly appreciated!
     
  10. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    Seems related to loading presets but I'm not exactly sure why you are seeing this without more info. If you set the preset to -NONE- in the preset list do you still get this error? Also what is the selected platform in your project build settings (try PC/mac/linux if it isn't already)?

    Let me know your version of Unity and Suimono and I'll see if I can recreate this issue on my end.
     
  11. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    99
    Actually- I discovered the solution to that issue- but:

    I seem to now have this issue where the ocean seems to randomly jump up every couple of minutes, leaving the camera underwater for a half-second- the water goes down again, but there are the droplets on the camera.

    Essentially, it looks like the water plane just changes position for a farction of a second.

    BTW:

    I am using the latest Suimono, and Unity 2019.2.0f1
     
  12. eblumrich

    eblumrich

    Joined:
    Nov 12, 2015
    Posts:
    99
    This is an example of what I am speaking about:

     
  13. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    @eblumrich Well I see from your 1-star review bomb on Suimono and Tenkoku and from your email that you simply want a refund. If you still want to troubleshoot this ocean problem then let me know, though I must say I feel you really jumped the gun and over-reacted. In any case good luck on your project.
     
    John-G, PROE_ and Vincent13122 like this.
  14. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    Hello,

    how can i make water sound quieter ? Love this Asset :)
     
  15. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    @w0rksgames you can control the overall volume on the SuimonoModule object using the "max sound volume" slider under General Settings.
     
  16. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    Ah that helps a lot, thanks for Your fast back writing !!
     
  17. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    Hello again, : )

    I have no material at the Buoy and it is completely white and I see in the example Video that it has material there :/

    Why is the buoy white in my Asset ?

    Would interest me ^^
     
  18. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686

    Sorry but the buoy object is not included. (there is a white placeholder in the demo scene).
     
  19. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    Okay, that explains it / thank you anyway ^^
     
  20. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    847
    Any updating news for Suimono?
     
  21. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    @Harekelas No pics yet of version 3. Development is progressing though I think that a Tenkoku beta will be ready before Suimono is.
     
  22. Efril

    Efril

    Joined:
    Aug 31, 2013
    Posts:
    71
    Hello @chingwa . Is it true that Suimono 3 will not be ready till the end of this year (even beta) and/or it will not work with old Unity rendering system (not LWRP/HDRP)?
     
  23. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    @Efril It will not be available by December I don't think, though I should have more info about it fairly soon. It's being developed in the normal/standard Unity renderer and that is my current target. Once it is at a more complete state I'll investigate an LWRP version, and possibly an HDRP version whenever HDRP actually becomes feasible to develop for, but that still has lots of problems.
     
    Vincent13122 and Rotary-Heart like this.
  24. Efril

    Efril

    Joined:
    Aug 31, 2013
    Posts:
    71
    @chingwa can I ask you about some of its features or you are not ready to answer for sure yet?
     
  25. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    @Efril Send me a PM please, I'd prefer not to verbally commit to anything in public until I'm 100% sure of what will be making the cut.
     
  26. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    49
    This looks like an amazing asset. Wonderful effects!

    Before i buy it, I'd need to know whether it supports my usecase:
    Can you do air pockets in a 2.5D perspective with it?
    That would mean having a cut-through mesh that forms a cave. That cave shall be half-filled with water and thus have a surface inside. Outside the mesh should be water too and most importantly, when seen from the side, the "see through water" effect should not be applied to the air pocket itself.

    Huge thanks!
     
    Last edited: Nov 26, 2019
  27. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    @DragonCoder I'm having a little trouble visualizing exactly what you might need, but I suspect this is probably too specific for Suimono to render properly at least "out-of-the-box". Layering water surfaces inside each other as in an underwater cave will not work without some kind of trigger system to turn off the outside water surface once you enter the cave (and turn it back on when you leave the cave). Suimono doesn't have anything like this built-in. Actually cutting a hole through the water surface is not possible at this time, unfortunately.
     
    Teila likes this.
  28. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    Hello ^-^,

    - how do i get this error message away ?
    https://ibb.co/zhLLdGc


    would be very happy if this is no longer displayed !!
     
  29. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    @w0rksgames I've not seen this error before. Was this on a new install, or did you move Suimono from a separate project?
     
  30. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    I've always had this error message, I thought that would be normal because everything works fine.

    This error message annoys me a bit, why is that so ? °°

    no i dont install it from new / no seperated project.
     
  31. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
  32. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    I have now found the Error :) !!

    This Error-Message only comes because I renamed the folder " SUIMONO - WATER SYSTEM 2 " to " Water "

    after that this Message does not come anymore.

    Too bad I wanted to rename it "Water" so that I can orientate myself better : /
     
  33. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    That's great to hear, glad you found the issue! Unfortunately the way Suimono is currently setup you can't rename the folder without some problems occurring. I'll see about fixing this for a future update.
     
  34. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    That would be awesome if I can rename Asset folders at will ! !

    you can not move the Asset Folder to another folder, then this error message will appear again.

    It's really annoying !! that absolutely has to be changed °o° !!

    That would make me happy if you change that :)
     
  35. CrowaL

    CrowaL

    Joined:
    Jan 25, 2016
    Posts:
    460
    [edit] Nevermind.. i noticed i had to press the "+" button and create a "NEW" preset. Really different from the current Unity prefab workflow.. but oh well.


    Hi @chingwa

    Suimono 2.1 doesn't seem to save my settings.. they always reset back to the prefab settings.

    During runtime I

    1) "Copy component"
    2) Then paste them back into the gameobject as values afterwards.
    3) Press apply
    4) But it still reverts back to the original prefab settings when I play the game once again.


    I even check in the Resources folder to make sure it's the new values. But after playing it reverts back to the original values.

    Do you have any suggestions on how to fix this?

    Thanks
     
    Last edited: Dec 21, 2019
  36. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    Glad you got it working! Yes the current preset method is now a bit outdated. I'll likely be moving it over to use Scriptable Objects, which seems to be the modern preferred method of doing such things in Unity.
     
    CrowaL likes this.
  37. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    Where can i find in the Script " Suimono Object " Surface Blend Color ? ?
    in which lines ?
     
  38. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    This should be the "blendColor" variable...

    Code (CSharp):
    1. Suimono.Core.SuimonoObject suimonoObject;
    2. suimonoObject = GameObject.GetComponent<Suimono.Core.SuimonoObject>();
    3. suimonoObject.blendColor = new Color(1f,0f,0f,1f);
     
  39. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    ok, but . . in which lines ? °° I don't want to search for long.
     
  40. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    Hmm? I'm not sure what you're asking, can you rephrase the question or tell me what you're trying to do?
     
  41. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    I want to change "Surface Blend Color" under "Water Surface settings". As soon as i change the Blend color it puts it always back when i am starting the Scene : (
     
  42. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    Ah I see, you probably want to check the presets section and set it to "none" otherwise it will load whichever preset is selected when starting the scene. Setting it to none will allow you to edit the surface settings while in edit mode. You can save a new preset from your current settings once you are happy with them (either in edit or play mode).
     
  43. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    where can i select "none" °° ?
     
  44. w0rks-Dev

    w0rks-Dev

    Joined:
    Feb 28, 2018
    Posts:
    60
    ok now i found it ! !, now i feel stupid, because I haven't seen it. Thanks for Your help !!
     
    chingwa likes this.
  45. CrowaL

    CrowaL

    Joined:
    Jan 25, 2016
    Posts:
    460
    Hi @chingwa

    I notice the FPS drops by 15-20 when I'm using the water.

    I tried disabling a few of the options, including Enable Advanced Caustic FX. But the FPS usage was still pretty high. I disabled everything and still noticed the master module takes 10fps.

    I'd like to use multiple water modules in a scene, but it just compounds the FPS drops :eek:

    Do you have any tips on how I can get a better FPS?

    Thanks
     
  46. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    @indieDoroid The main place to look for performance bottlenecks is the transparency and reflection settings on the module object. These two functions re-render your scene at different positions to calculate each effect, so you need to be careful how much of your scene is being rendered for each. It's also recommended to optimize your scene as much as possible as any problems already occurring in your scene will only be compounded by these two functions.

    Typically for transparency you should only render game layers/objects that appear below the water surface, and should set the transparency layers to as few objects as possible.

    Similarly the dynamic Reflections setting should only render layers/objects that you need to be reflecting in the water surface. You can choose to use a static cubemap or a solid color for reflections instead which should save even more performance in this area (at the cost of some visual fidelity).

    You also may try reducing the tessellation settings which should also help improve performance.

    Note that you should only have one Module object in your scene at a time. Having multiple modules is unnecessary and will certainly compound performance problems. You can have as many surface objects as you like.
     
  47. CrowaL

    CrowaL

    Joined:
    Jan 25, 2016
    Posts:
    460
    Great! Ok I'll give these a try. Yea I think currently the module is rendering the default layer.

    I'll let you know if I run into any other issues! Thanks :)
     
  48. nikix22

    nikix22

    Joined:
    Jan 16, 2015
    Posts:
    24
    Hi :) I had previously error in asset on scene load and I finally founded what was the issue and it is FIXED NOW! :)
    Error was:
    Assertion failed on expression: 'ptr == NULL || !HAS_ROOT_REFERENCE(GET_CURRENT_ALLOC_ROOT_REFERENCE()) || GET_CURRENT_ALLOC_ROOT_REFERENCE() == GET_ROOT_REFERENCE(s_MonoDomainContainer, kMemMono)'
    UnityEngine.GUISkin:OnEnable()

    This was happening always on project opening.

    Problem was because presented Suimono prefab was in the scene BUT without prefab connection to original prefab from assets. You should just place prefab in the scene and take care that there is always connection with the prefab presented.

    Greets!
     
  49. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,686
    Hi @nikix22 Thanks for the report. Can you tell me what version of Unity you saw this error message with?
     
  50. nikix22

    nikix22

    Joined:
    Jan 16, 2015
    Posts:
    24
    Hi :) current version is 5.6.7f1 and it was hapening in all version before.
     
    chingwa likes this.
unityunity