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,790
    @DavidMiranda It looks like the layer assignment got messed up. I recommend resetting the Suimono layers by doing the following:
    1) Disable both Surface and Module objects in your scene.
    2) Delete all 3 Suimono-specific project layers.
    3) Re-enable surface. It should re-initialize the Suimono layers properly.
    4) Re-enable surface.
     
    P_Jong likes this.
  2. JDrem1

    JDrem1

    Joined:
    Jun 24, 2017
    Posts:
    199
    @chingwa

    Hello.

    I was going to ask about VR, but read above that it is not (nor can be) supported with proper reflections, or transparency.

    Does it work with some concessions made, reflections turned down or off?
    and what is the performance hit please?

    Also one last question, any idea on timescale and price of Suimono 3 please.

    Thank you for any help.

    Andy.
     
  3. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Hi @Dayn1 you can turn reflections and transparency off and VR should work ok. The problem is that these two functions render your scene from a single select position and these do not render properly on both of the VR cameras, which results in rendering errors in VR. These two functions are also some of the leading performance bottlenecks of Suimono... so if you are ok without having dynamic reflections and transparency thenit should be fine. Personally, I wouldn't be fine without these, which is why I don't recommend Suimono for VR in it's current state.

    As for timescale of a Suimono 3.0 update, this is unclear and is too early for me to speculate, but it won't be soon. Pricing might have an increase, or it might stay the same, I am still undecided on that. It really depends on what the final form of the update will be and how much improvement I feel it offers to customers.
     
  4. JDrem1

    JDrem1

    Joined:
    Jun 24, 2017
    Posts:
    199
    Hi @chingwa

    That was a really great, and honest, and really disappointing.. lol. Reply.

    And thank you for the info on Suimono 3. OK so its not coming out like next month.

    Im stuck now. I cannot find another asset with ocean that looks as great as Suimono. (I down loaded the demo.)
    I have seen on the Ceto water system with no reflections, and no transparency in the past. And I personally thought it looked great, and that as without VR.

    In this case...
    Can I ask one more thing please. (and this may be of benefit to us both, and others.)
    Is there any way you could post a quick video of Suimono in the best settings it could possibly achieve.- (So all the bells and whistles) -But with no settings that would upset VR. So I guess no transparency, or whatever reflections dont work in VR.

    I feel that not only would this be really beneficial to me. But with the growing demographic of VR gamers, and users migrating to Unity and looking for the definitive water system. It would be a great showcase for what they could expect, and achieve.
    Even more so as Suimono3 is a ways off yet.
    And also there must be other VR users who read this forum, and are not as tenacious.. (AKA a pain in the neck as me.;) And they move, when they possibly would not if they see what could be achieved.

    And Remember that "VR users" expect (or realistically should) to have to compromise a little anyway.

    I really hope you can help.

    And thank you again.

    Andy.
     
  5. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Dayn1 I've posted a video below showing the differences between having Suimono rendering all Transparency and Reflections, and alternatively setting these functions to not render any game layers.

    In the case of the Reflections, when not rendering game layers it will default to only rendering the background skybox. Because of this, you might not see too much difference between having reflections on or off. However, the transparency function is the real culprit, and how much this affects your scene will be determined by the amount of objects that would normally be visible through the water.

    The first demo scene is set in the middle of the ocean, and thus turning transparency off doesn't have much effect on the overall visuals. The second scene is set near the shore, and in this example you can see the drastic affect of turning off transparency. I hope this is helpful!

     
    P_Jong likes this.
  6. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Hi. How is mobile performance? I'm looking for 60+fps on a high end (latest) iPad.
     
  7. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @eco_bach sorry, mobile is not supported and is not a planned feature.
     
  8. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,488
    Hi, I am considering to buy your good looking asset but could you let me know, can I make rivers with flow maps with your asset?
     
  9. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    khos likes this.
  10. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Hi, I'm using RenderTexture for my main camera to capture a scene and using another camera to render the RenderTexture. Everything works fine except the shoreline moves crazy when I rotate my main camera vertically(horizontal rotation doesn't seem to affect).

    Weird thing is if I change any parameter on the main camera's inspector(like allowHDR, allowMSAA,clipping planes, view port Rect, anything) MANUALLY, the shoreline starts to work alight. But if I change them via script it doesn't fix the shoreline.

    Do you have any idea what's wrong?
     
  11. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @noanoa it sounds like it could be a timing issue between cameras. Suimono uses it's own internal cameras as well, so perhaps they are not syncing. in your camera-->renderTexture script you could try rendering the camera either in LateUpdate() or FixedUpdate() to see if either give an improvement.
     
    syscrusher likes this.
  12. noanoa

    noanoa

    Joined:
    Apr 17, 2014
    Posts:
    225
    Brilliant! I changed the camera depth to see if it helps with the syncing and it fixed the problem. Thanks for the quick reply.
     
    syscrusher and chingwa like this.
  13. Magentaunity

    Magentaunity

    Joined:
    Feb 26, 2015
    Posts:
    1
    Hi, we've updated to use 2017.2.0b8 and I'm having a strange issue with renaming gameobjects in the hierarchy when SUIMONO_Surface is enabled. This is in editor when the game is not running. When SUIMONO_Surface is disabled I can rename things, when enabled as soon as I start typing it loses focus and it is no longer possible to rename anything in the hierarchy. This only appears to happen when the scene window is visible. It looks like when I start typing the scene window updates, the water moves slightly and focus shifts away from the hierarchy.

    Admittedly we are on the beta version so this may well be a Unity issue but the current work around appears to be to disable SUIMONO?
     
  14. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Magentaunity that is definitely a strange situation. I make a point of not supporting Unity betas specifically because of crazy issue such as this, there are just too many problems caused by Unity moving their code around. Thinking about the Suimono code, I can't imagine a reason why anything in the Suimono code would cause this. However one temporary solution might be to open up the SuimonoObject.cs code file and comment out the [ExecuteInEditMode] flag near the top... just be aware that doing so will cause some issues with water rendering, and preset availability while in Editor mode. I guess you'll have to decide which issue is more annoying for you until the beta gets a little further along. Sorry for the frustration!
     
    syscrusher likes this.
  15. Xype

    Xype

    Joined:
    Apr 10, 2017
    Posts:
    339
    Ok just due to the price and being burned on water already, need to ask this before I purchase...is this going to foam the shoreline and work with voxel terrains, which are not really terrains....
     
  16. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Xype Yes it includes depth-based foam which will render on any intersecting ibject, and also shoreline generation function which can render foam based on specific game layers. I haven't personally tested with voxel terrains, but there shouldn't be any reason it doesn't work.
     
  17. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    hey @chingwa - my custom boat keeps capsizing, seemingly no matter how many buoyancy objects i add to it. What could i be doing wrong?
    Suimono Capsized boat.png
     
    Last edited: Sep 3, 2017
  18. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Drowning-Monkeys It's hard to say for sure, but there are a few things to be aware of. First is that the buoyancy objects apply force to the boat object's rigidbody, and if the boat's center of rotation is off you can really get unexpected results. In general the 0,0,0 origin point for the object should be close to where the center-of-mass would naturally fall... in a boat this would be perhaps the middle of the hull.

    Conversely, If the origin of the object is located in the mid point of the object (for example midway beween the hill and the top of the masts) then the rigidbody center of mass will be off and you are going to get some stability issues. Open up the Suimono buoyancy demo and look at the sample buoy object... you'll notice that if you set the object to position 0,0,0 the origin of the buoy mesh is actually directly centered on the base, instead of being in the overall center of the object.

    So that's the number one step for object stability but I also recommend going to the boat rigidbody settings and increasing the angular drag a little bit to keep some of the rotational movement from getting too crazy. The default drag settings are usually don't give enough force opposition, especially in a larger boat object.

    Also you can "fudge" some of the buoyancy objects so there is a wider separation on the side of the boat which should provide more lateral stability. I think the way you have set it up where you place them around the hull is good, but you could probably do with a few less without any ill effect, and instead re-position a couple further out from the side of the ship... almost like it's wearing floaties :D

    Hope this helps!
     
  19. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    Hi chingwa,

    can you show us a "real life" example of a nice implementation of a river and a waterfall? ;)
     
    Stormy102 likes this.
  20. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    Hi, I was looking at this package with the thought to possibly purchase, but there's one big problem I see when I tried the demo:




    This ugly artifact halo around the character when drawn over the water. I realize maybe the demo is old and this problem has been fixed, so I'd like to know if this is still an issue with the package? or any other information about cause and solution. because I couldn't use the package if it does this.
     
  21. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @ceebeee This is mainly due to how Suimono handles transparency and depth, and is exacerbated when the transparency resolution is lower than the screen resolution (which is the case in the demo). It's not 100% fixable in Suimono's current state when the resolutions do not match.

    But that being said, I am in the process of re-engineering Suimono for version 3.0, and it does not have this problem due to a difference in rendering architecture. I don't want to talk too much about the 3.0 update as it's a ways off, and features might change before it's finally implemented, but it should bring some much needed improvements such as this.

    3.0 will be a free update when it is released.
     
    syscrusher, Stormy102 and TeagansDad like this.
  22. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    Ok, thanks for the reply. I really like all the features you have, it's a very complete solution and I'll keep it in consideration.
     
  23. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    Can we expect solutions for real looking rivers and/or waterfalls?
     
  24. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @tom-art I do have plans to improve river handling and rendering, yes.

    Waterfalls... hmmm... this is probably outside the scope of this package, but I might be able to add at least some foam options that could help waterfall rendering. The current package includes some particle effects that might help build a basic waterfall, but for something realistic you would probably need an effects asset built specifically for that.
     
  25. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    Okay. Thanks for your information. Another question: What about boats/ships on the water surface? Do you know the playwater plugin? Ships can "ride" on the waves and show realistic how deep the bug of a ship have to dive into water. What about SUIMONO in this case?
     
  26. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Yes Suimono does include buoyancy effects. So you can add buoyancy objects to your boat or ship and it will react to 3d waves.
     
  27. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    Hm... so SUIMONO is the best water solution on the asset store? :rolleyes:
     
  28. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @tom-art I'm not sure what you're asking. Are you asking for MY opinion? Because of course I am biased :D While I would caution that Suimono isn't the perfect solution for every case (nothing is after all), it is a great solution for most cases where you need water in your project. It has been selling on the asset store for 5 years, being continuously updated and improved and supported... which is more than can be said for most other water systems available on the store.
     
  29. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    Hm... it seems, you didn't understand my ironic type of question. o_O It is clear, that you must make a decision of a plugin individually per case. But it seems - this is now serious - that SUIMONO can cover most cases of water usage. At least when a great handling for rivers comes. So keep up the good work. :D
     
    chingwa likes this.
  30. Efril

    Efril

    Joined:
    Aug 31, 2013
    Posts:
    82
    Hi. I'm looking for the ocean package supporting nice ship wakes/trails. In the advanced demo of Suimono I see some ripples and splashes behind the boat but it looks not realistic and no foam trail also. Does Suimono have some settings which allows to increase size and frequency of these ripples and turn on foam trail? I checked documentation but couldn't find any except 'Advanced wake and distorsion effects' checkbox.
     
    Last edited: Sep 11, 2017
  31. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    Hi chingwa,

    today I found this on Youtube:
    ... it seems, this is what you told me, right? Hm... what would you say about the ship video? Is there a problem in SUIMONO or in the demo video? The ships goes again and again under water. That looks... strange. ;) Is this fixable? Could you make demo video with a ship, that shows, how it work better on SUIMONO (with ships)? The actual demo video with the buoy doesn't help because it's small and round. But a ship has a different body... so maybe it's complicated!?
     
  32. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @tom-art In the video it looks like they didn't set up buoyancy for their ships properly. a little further up this page you can see a post by drowning monkeys showing a picture with a bbuoyancy object setup example. The advanced demo included with Suimono also shows a simple boat object. You can download and try it out on your computer: http://www.tanukidigital.com/suimono/demo2.0/
     
  33. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Efril The 'advanced wake and distortion effects checkbox' may be a bit misleading.... I did have a wake effect at one time but it was removed due to some rendering issues and I have not yet added it back in. This setting currently refers to rendering the refractive ripples which incurs an extra (minor) rendering cost.

    Suimono does allow particle management through an effects system. This is what handles the splashes and ripples, and it can be extended by the user to include any particle effects they need. So theoretically you could generate a particle effect for trails and wakes and include them in the Suimono fx system sure.

    In my opinion though, trails and boat wake effects require dedicated rendering attention in order to look realistic, not just building them out of particle effects. If you need dedicated trails and wakes in your project right now I would not recommend Suimono to you unfortunately, unless you can find them as separate effects somewhere. Hopefully I can add these as a Suimono feature in a future update.
     
    syscrusher likes this.
  34. judah4

    judah4

    Joined:
    Feb 6, 2011
    Posts:
    256
    Hi, that's my video! I was testing a system to sync the waves across clients and the server but I didn't fix a latency issue when I recorded that so the ship's position is a little behind the wave position causing it to sink underwater. That and I probably did not get the buoyancy setup right. It was just a quick proof of concept using Suimono.
     
    chingwa likes this.
  35. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    I'd also say the scale of the waves is much larger than the scale of the boats. That's why it looks like toy boats instead of a realistic view of actual ships on the ocean. The waves are as big as some of the landmasses ;)
     
    judah4 likes this.
  36. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    So I tested the Advanced Demo and discoverd this:
    upload_2017-9-14_17-13-35.png

    Hm... ;)
     
  37. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    Good day! I acquired this asset yesterday during the sale. It's my second water system, but I decided having two on hand, with different strengths and weaknesses, would be good for differing projects.

    I wanted to say to @chingwa that one of the reasons I was willing to buy this, is your candor on the forum. It is really helpful that you not only help people get the most out of the asset, but also openly discuss its limitations and advise on when Suimono might not be the right tool for a specific purpose.

    Since I am starting a new project, and I make extensive use of Substance Designer, I am using the Unity 2017.2 beta because it supports Substance 6 APIs. From this forum, I note that Unity betas are not supported with Suimono -- so I went into this with "both eyes wide open". :) That being said, I did a quick test this morning with the demo scene and thought a preliminary report might be useful. I am running 2017.2b10 under Windows 10 Pro 64-bit, on an NVIDIA GTX 1080 GPU.
    • Suimono, fundamentally, works in 2017.2b10. The asset imports with some warnings about deprecated (but still extant) Unity API calls that will need to be updated using conditional compile directives. There are also some warnings about inconsistent line endings, which of course are insignificant. There are zero import errors.
    • The advanced demo scene works in all the important ways, but there is one significant cosmetic issue. If the ocean mode is toggled to the one with large waves, the waves near the shoreline are at appropriate height until they reach a certain position (I believe it's where the smaller waves would have stopped), and then they just end, visually. But the buoyancy physics is aware of the waves moving further up the beach, so the 3P character appears to "swim in midair". She will even rise off the beach as an invisible wave passes over.
      cap2.png
    • Some of the ocean modes display as infinite ocean to the horizon, while others do not. As I quickly looked at the demo's configuration (only for a few minutes...and please remember I just got the asset), it appears to me this might actually be "working as designed" and the infinite horizon wasn't important for those modes.
      cap1.png
    • In the editor, I usually work with the Game and Scene views overlayed in one large panel, using tabs to move from one to the other. In Scene View in the Unity editor, if I enable the River surface and position my scene camera just right, I can actually see part of the Game View *through* the scene camera. I can see the 3P character as if the water were some kind of magical portal. :D
      cap3.png
    I am attaching screen shots to illustrate each of these anomalies. Please note that I am not intending this as criticism of the asset. I fully understand that I'm running an unsupported Unity version here. I am only reporting these issues to try to help as you, the developer, prepare to support 2017.2 when it is released. :)

    May I offer some constructive suggestions as a new user?
    • Please add hover-over tool tips to the Inspector fields for your objects. It's very easy to do, and it's extremely helpful to new customers.
    • I read the manual, and in your {ahem} "copious spare time" it could use an update, and the missing sections completed.
    • The notes on the forum about creating custom meshes are very useful, and you might want to add that as a section in the manual. I note that you use 3DS Max and are unfamiliar with how to do UV maps from above in Blender. I do use Blender, so for your reference here is the procedure:
    1. In Edit mode for the mesh, be sure all of its faces are part of the current selection. (Important...You MUST be in Edit mode, not Object mode.)
    2. Select "Orthographic" view from the menu or hotkey.
    3. Select "View...Top" from the menu or hotkey, and zoom so the entire selection is visible.
    4. Press the "U" (unwrap) hotkey, and choose "Project from view" or "Project from view (bounds)" from the popup context menu.
    5. (Optional) Examine the resulting UV map in the UV window to ensure it is correct. Usually steps 1 through 4 will "just work".
    Regardless of which 3D modeling software is used, UV maps "from above" get very strange if there are vertical or near-vertical faces in the model, because of the math behind the projection. This might be worth pointing out in the manual; custom meshes should avoid steeply sloping or vertical faces.

    Finally, I have a simple question: Does this asset's buoyancy model work by creating, and displacing, a procedural mesh? I am curious because I also have a third-party asset that does extremely accurate buoyancy physics, but does not actually manage the visuals of the water. I am wondering if I could blend the two assets, letting Suimono manage the visuals and wave displacement, but let the other asset manage buoyancy for my scene objects.

    Thanks for a fine and well-supported asset. I look forward to learning this more deeply and using it in my upcoming project.
     
    chingwa likes this.
  38. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @syscrusher Thank you very much for the detailed writeup. I have not tested the 2017.2 beta yet, but I will take a look and start addressing some of these issues soon.

    The first image you posted with the wave falloff is really strange to me... it must be something off kilter with the beta, possibly extending into the next update. I will definitely check this out!

    Your second pic showing the horizonless water is rendering as expected actually. This is due to the combination of the water being completely transparent and the underlying terrain in the demo not extending very far into the distance. The falloff is really due to the terrain, though I agree it can look quite strange. I don't expect people would use fully transparent water with an infinite ocean (at least I would hope not!) It's just there in the demo to show that you have a lot of rendering flexibility when it comes to how the water looks. :)

    The third picture shows one of the weaknesses of Suimono which is it does not render properly in the scene-window. It relies on your in-game camera position/view for a few key rendering effects and unfortunately these effects are reflected in the scene-view despite the scene camera always being at a different position. This results in images like you posted. I've been looking at ways of improving this in future updates, but of course the in-game view will always take priority over any errors that show up in the scene view.

    As for your specific suggestions, all are excellent. I have tool tips in my sky system and I will be writing them for Suimono as well soon, and in regards to the documentation it is definitely falling a bit out of date and could use a thorough update. Also many thanks for the Blender instructions :)

    The buoyancy does not create a procedural mesh. It instead works using the Unity physics system, allocating buoyancy points and applying forces as needed as it enters/exits the water and waves. I understand a mesh-based buoyancy system would generally be more accurate. There are internal functions that you can use to determine water surface info at any given point in world-space (such as depth, wave height etc). Take a look at page 17 and 18 of the docs: http://www.tanukidigital.com/suimono/documentation

    This discusses the SuimonoGetHeight() function and the data that is available at each given point. I assume this would contain all you need to link into your current buoyancy system, but let me know if there is something that you need that is missing.
     
    syscrusher likes this.
  39. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @tom-art are you supplying a custom texture for the waves?
     
  40. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    No, it's a screenshot from the advanced demo (.exe), that you linked to in a couple of post before!
     
  41. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    No worries, and thanks for the reply. My current project doesn't need large waves, and as I said I fully understand that I'm in "terra incognita" here. :)

    I suspected that might be the case. Again, no worries.

    I may take a look at your code myself on this one. The reason is that I'm developing an asset for sale (actually, my code is done, and I'm just finishing up documentation), and I had to deal with a related issue, so I may be able to offer a suggestion. (My upcoming asset is not water-related, so no worries about competition.)

    If you need a peer review of new doc versions, feel free to ping me. Writing and editing 100+ page technical analyses for customers is a significant part of my work life, and I'm the one to whom all my colleagues bring their reports for editing.

    Thanks for the info. I had seen that page in the docs, but it didn't specifically talk about the underlying buoyancy mechanism in depth. I may still be able to adapt the other asset; it comes with source code, so I can see how the other dev did his height queries. It's not a high priority for me right now -- I was just curious since I happened to already have the other asset. It was a gift from the dev at Unite Boston in 2015.[/QUOTE]
     
  42. PaulGK

    PaulGK

    Joined:
    Dec 1, 2016
    Posts:
    27
    Just bought this while still on sale :) I already own a couple of other water assets but his looks to be much more complete.
    Can't wait to find the time to have play with it.

    Thanks.
     
  43. r3ndesigner

    r3ndesigner

    Joined:
    Mar 21, 2013
    Posts:
    143
    You should think about add some waves like this:
    i spent a lot of time creating a plane with wave animation and animating over your water to get something like that "beach waves". Hope u can add some stuff like this in future.
     
    Artomiano and chingwa like this.
  44. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Thanks @r3ndesigner that looks very interesting. Separate objects that can be positioned and render against the underlying water systems seems like a feasible idea.
     
    Stormy102 likes this.
  45. Ali-Nagori

    Ali-Nagori

    Joined:
    Apr 9, 2010
    Posts:
    151
    @chingwa
    i have an issue.

    entire unity editor crashes when the scene has SUIMONO water with any other active object using Shader with a Screen Displacement or Projection code ,it was ok in the past versions this is appearing after the recent update.

    i'm using unity 5.6 pro and not going to migrate to 2017 version at least with my current project.
     
  46. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    Hi @Ali-Nagori Are there any relevant lines in the editor log after the crash? What is the screen-displacement / projection code doing? I assume it's using GrabPass instructions? I can't imagine why this would suddenly be an issue, but any info you can send me will help narrow down the issue. Feel free to email me directly at konnichiwa[at]tanukidigital.com if that's easier.
     
  47. Ali-Nagori

    Ali-Nagori

    Joined:
    Apr 9, 2010
    Posts:
    151
    @chingwa

    it's GrabPass ofcourse

    in case if you want to recreate the problem

    here is one of the Shader code

    filename : Distort.shader
    Code (CSharp):
    1. Shader "FX/Distort"
    2. {
    3.     Properties{
    4.         _Refraction("Refraction", Range(0.00, 100.0)) = 1.0
    5.         _DistortTex("Base (RGB)", 2D) = "white" {}
    6.     }
    7.  
    8.     SubShader
    9.     {
    10.         Tags{ "RenderType" = "Transparent" "Queue" = "Overlay" }
    11.         LOD 100
    12.  
    13.         GrabPass
    14.         {
    15.  
    16.         }
    17.         CGPROGRAM
    18.         #pragma exclude_renderers gles
    19.         #pragma surface surf NoLighting
    20.  
    21.         fixed4 LightingNoLighting(SurfaceOutput s, fixed3 lightDir, fixed atten)
    22.         {
    23.             fixed4 c;
    24.             c.rgb = s.Albedo;
    25.             c.a = s.Alpha;
    26.             return c;
    27.         }
    28.  
    29.         sampler2D _GrabTexture : register(s0);
    30.         sampler2D _DistortTex : register(s2);
    31.         float _Refraction;
    32.  
    33.         float4 _GrabTexture_TexelSize;
    34.  
    35.         struct Input
    36.         {
    37.             float2 uv_DistortTex;
    38.             float3 worldRefl;
    39.             float4 screenPos;
    40.             INTERNAL_DATA
    41.         };
    42.    
    43.  
    44.         void surf(Input IN, inout SurfaceOutput o)
    45.         {
    46.             float2 distort = tex2D(_DistortTex, IN.uv_DistortTex);
    47.             float2 offset = distort * _Refraction * _GrabTexture_TexelSize.xy;
    48.             IN.screenPos.xy = offset * IN.screenPos.z + IN.screenPos.xy;          
    49.             float4 refrColor = IN.screenPos;
    50.             if (IN.screenPos.x > 0)
    51.             {
    52.                 refrColor = tex2Dproj(_GrabTexture, IN.screenPos);
    53.             }
    54.             o.Alpha = refrColor.a;
    55.             o.Emission = refrColor.rgb;
    56.         }  
    57.         ENDCG
    58.     }
    59.     FallBack "Diffuse"
    60. }
     
  48. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Ali-Nagori Thanks for the shader, I tried it on my end using Suimono 2.1.4 and Unity 5.6.0, no problems here.



    I would suggest trying it in the Suimono demo scene like I did here, just in case there is something else in your project that is causing a conflict?

    I have seen weirdness with Grabpass in the past...but have not seen any problems with Suimono since the Unity 4.x days. Are you using multiple GrabPass instructions/materials? You might consider using Grabpass with a unique name parameter instead, just in case there is a conflict somewhere: GrabPass { "TextureName" }

    Googling around it seems other have a similar issue with grabpass in 5.x but I haven't seen what the specific issue is. Let me know if it still happens in just the demo, or if you find any additional info.
     
  49. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    @Ali-Nagori Also, I might ask if you are using multiple cameras in your scene in Deferred rendering? If so, I highly suggest you set the higher queue camera to be in Forward rendering mode, while keeping the original/lower camera in Deferred. I have seen problems with Multi-deferred cameras and GrabPass in the past... though don't recall ever having editor crashing.
     
  50. Artomiano

    Artomiano

    Joined:
    Dec 1, 2014
    Posts:
    200
    Or what about this visual type of beach waves? ;)
     
    mwituni, Stormy102 and chingwa like this.