Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Triton Oceans and 3D Water for Unity Pro / Windows [DEPRECATED]

Discussion in 'Assets and Asset Store' started by sundog, Sep 20, 2012.

  1. Trollvahkiin

    Trollvahkiin

    Joined:
    Aug 3, 2013
    Posts:
    15
  2. Trollvahkiin

    Trollvahkiin

    Joined:
    Aug 3, 2013
    Posts:
    15
    Hey, is there also a way to change the darkness of the water depending on the depth of terrain like here?
     
  3. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    The transparency of the water will be affected by the depth of the terrain if you turn on the "coastal effects" option, and the intensity of this effect will be controlled by the underwater visibility value you set.

    So, if you had a light-colored terrain under the water, you could set things up such that it shows through the water more in shallow areas.
     
  4. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Hi folks,

    A new revision of Triton for Unity Pro just went live at the asset store. If you're not already a customer, we've also updated the free trial version so you can try before you buy.

    This update fixes issues related to multiple cameras when DX11 compute shaders were in use, and also should improve performance in the editor in most setups. We think it may also solve crashes that appear to come from height queries for the buoyancy system, although we were never able to reproduce those here.

    Thanks!
     
  5. TapTapDomination

    TapTapDomination

    Joined:
    Nov 19, 2012
    Posts:
    3
    What about a distortion effect of the underwater terrain connected to the coastal effects ?
     
  6. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Yup, that's definitely in the plans.
     
  7. TapTapDomination

    TapTapDomination

    Joined:
    Nov 19, 2012
    Posts:
    3
    Hi , can you help me with this error ?

    image below
     

    Attached Files:

  8. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    It's not an error; it's an informational message. Just hit OK and things should proceed normally. Did you modify the Triton.config file to enable debug alert messages?

    FYI, it's telling you that it tried to use CUDA acceleration, but couldn't. Usually this is just because you're not using an NVidia card, in which case it will choose a different method. If you are on NVidia. make sure your drivers are up to date, and that you're using the latest version of Triton for Unity (which just came out a couple of days ago.)
     
    Last edited: Feb 12, 2015
  9. KarelA

    KarelA

    Joined:
    Dec 30, 2008
    Posts:
    422
    Hi. About Oculus stuff. On your homepage it says "Make sure to have the latest Oculus Runtime and Oculus SDK installed for version 0.4.3." The current latest version of Oculus right now is 0.4.4 That might confuse people. Also not sure if Triton works with the latest version.
     
  10. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    It does seem to work fine with 0.4.4 installed, at least on the one machine we tested it on. Bear in mind Triton includes 0.4.3 components in its .unitypackage, as that's what's we did the integration with - but it can coexist with the 0.4.4 SDK as far as we can tell.

    As with everyone, I encourage you to download the free trial of Triton for Unity Pro and make sure it meets your needs prior to purchasing.

    I'll update our website to be less confusing on this issue as well; thanks for alerting me.
     
    Last edited: Feb 13, 2015
  11. Trollvahkiin

    Trollvahkiin

    Joined:
    Aug 3, 2013
    Posts:
    15
    Hey, I'm getting huge lag spikes and when I check the profile it points at something to do with Triton. Here is a screenshot of it http://prntscr.com/64mntw any ideas?
     
  12. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    According to your data, it's not coming from Triton per se, but from your terrain. Triton renders your scene again for reflections, and also for a height map. You might try turning off reflections and/or coastal effects in Triton to see if you can narrow down which one is triggering it.

    Your data suggests it's coming from the height map render for coastal effects - whenever the camera moves a certain distance, we need to draw your scene from the top-down so we can figure out the water depths near the coastline. The "height map area" property of the TritonPrefab exists to let you adjust how frequently this happens, and you might also consider modifying the camera in our TritonHeightMap class to apply a culling mask to only render your terrain to it and nothing else.
     
    Last edited: Feb 13, 2015
  13. Orann

    Orann

    Joined:
    Jan 21, 2014
    Posts:
    1
    For those in doubt, the new version of Triton is excellent (for my desktop project at least), and the support from Sundog has been exceptional - Highly recommended!
     
    sundog likes this.
  14. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    Are there any plans to make an "under water" function for this asset? The asset is amazing and VERY EXPENSIVE but I think it lacks "under water" ability. The lack of under water is why I am unsure of buying it. Any plans on that front or can you recommend another asset which would provide an under water ability to your asset?
     
  15. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    When you go underwater with Triton, it will automatically set your render settings fog to fog out the underwater terrain. The water surface will be fogged out in a consistent manner as well. There is also an "underwater God Rays" feature you can enable. So, whoever told you Triton doesn't have underwater effects was misinformed.

    What we don't have today are caustics and silt, but these could be added with a simple particle system for silt and animated textures on your seafloor for caustics.

    You should download and use the free trial version of Triton from our website before you decide on it. Since it is mostly native code, working with it requires a little more effort. Reading the documentation first is also essential with Triton.

    As for its cost - keep in mind people using other engines pay $3,500 for Triton, not $475. It costs a lot to develop and maintain something like this, and it's geared mostly toward companies doing professional maritime training and simulation.
     
    Last edited: Feb 16, 2015
  16. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    Good point. I will try the demo application. I didn't see it at first. Downloading now.

    Thank you.
     
  17. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    I just tried the demo. While it looks excellent and I am so close to buying this, there is one big worry. When I am about dive into the water. This happens. Please see the attached pictures. Is there any fix for that at all?
     

    Attached Files:

  18. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    No - you're either above water or below it; you can't be both at the same time. Pulling in the near clip plane distance can help this edge case happen less frequently, or you could potentially control your camera such that you don't allow it to be at exactly sea level.
     
  19. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    I see. And one more question... the under water "color", can it be altered? For example, if I mix this with your silverlining solution (which I have bought), will it reflect the time of day under water as well? Getting darker/lighter? The demo doesn't have this option to test.
     
  20. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    That won't happen automatically - you'll have to adjust the "belowWaterFogColor" of the TritonUnity object in your scene in order to vary it with the time of day.
     
  21. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    Is there a "value" in the silverlining which I can set this to? Like, I read that value from the silverlining and set the belowWaterFogColor to it? Or do I have to "guess" the color somehow from the time?

    I mean, which variable from Silverlining do I use to get the proper value for belowWaterFogColor?
     
  22. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Our SilverLining sky asset does not provide underwater fog colors, but it does set the ambient light color in your render settings. What I would do from a script is multiply your daytime underwater fog color (new UnityEngine.Color(0.0f, 0.2f, 0.3f, 1.0f) ) by the value of RenderSettings.ambientLight in an update function, and set TritonUnity.belowWaterFogColor to the result.
     
  23. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    - multiply your daytime underwater fog color (new UnityEngine.Color(0.0f, 0.2f, 0.3f, 1.0f) ) by the value of RenderSettings.ambientLight

    I hope I am not asking too much now but could you provide a working C# code line example, say for 14:45 daytime?

    (I have decided to buy this asset by the way, that's why all these questions. Once I buy it, these questions would come up so I might as well ask it now.) :oops:
     
  24. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Non, I'm happy to answer your question, but please be aware I can't write all of your C# code associated with using Triton if you decide to purchase it. That's not part of the deal!

    Here is some sample code to illustrate what I'm talking about:

    TritonUnity triton = (TritonUnity)(GameObject.FindObjectOfType(typeof(TritonUnity)));
    if (triton != null) {
    UnityEngine.Color unlitFogColor = new UnityEngine.Color(0.0f, 0.2f, 0.3f, 1.0f);
    UnityEngine.Color litFogColor = unlitFogColor * RenderSettings.ambientLight;
    triton.belowWaterFogColor = litFogColor;
    }
     
  25. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    I understand! I just needed some small pointers and the code you provided is excellent. I greatly appreciate it!

    Although, the more you put stuff like this in "options" with point and click, the better and agile your product will become. People who use Unity3D like simplicity and less code so stuff like connecting the underwater color to lights and such should be much easier with some public variable or something built-in. (I have been a developer for many years so small pointers always help me to find the corret path to enlightenment. :rolleyes:)

    Anyway, you have excellent support and great quality products.

    I'm super happy with your Silverlining and will definitely purchase the water in the coming days.

    Again, thanks a lot for all the help and your time. I did give you a 5 star review for the clouds and I'm sure I won't be disappointed by the water product! :D
     
  26. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Thanks so much!
     
  27. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    I have one more question, don't hate me! :oops:

    if you see the example demo, the stones underwater have no hm, how should I put it "life" refraction / animation. It doesn't have a lot of under watery feeling. Feels very static with only some blur.

    Now, is there anyway to make it look more watery or is this "as good as it gets" right now? Any asset-add-on-shader something we can use perhaps?

    Just a little more motion or hm distortion if you will.
     

    Attached Files:

  28. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    Curvey or something. See this picture.
     

    Attached Files:

  29. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    Ps. Just don't misunderstand me here, if you add a new asset to the store fixing a great underwater experience for this water package, I will buy it! I don't expect great things to be free.

    Just had to put this down so you don't think I'm a free rider or anything but anyway, the water distortion level is non-existence in the underwater right now and it's only a fog. o_O
     
  30. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Those are two different effects you've posted. One you could do with a post-processing distortion or warping shader when underwater. Odds are there is something like that available in the asset store if it isn't built into Unity Pro already.

    The other effect is refraction, when objects below water seem warped when viewing them from above water. That is something we have planned for the future, but it does come with a performance cost similar to that of reflections.
     
  31. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    I see, thank you.

    - That is something we have planned for the future...

    Will that cost extra or if I have bought the water asset, it will just be an update to it? Have you decided on that yet?
     
  32. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    It would just be part of an update. Can't commit to when though, and there is always the possibility that it just can't be done via a native plugin. But we'll give it a try.
     
  33. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    Thank you again very much for all the great and quick support!

    ...off-topic: and I just scrambled up some cash to buy your water asset. Will place an order tomorrow. :cool:
     
  34. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429

    Thanks! But really, feel free to take as much time as you need with the trial version. It's a fair amount of money for an individual, and you should be 100% sure it meets your needs before purchasing.
     
  35. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
  36. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    There are differences between the feature sets of our C++ SDK products (which sell for $3,500) and our Unity assets (which sell for a few hundred.) So yes, there are features in our C++ SDK's that are unlikely to be ported to Unity anytime soon. Please evaluate our products based on what they currently offer in Unity.
     
  37. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    I know. I'm sorry, my question was unclear. Will you offer the same features to Unity but with a higher price? I don't mind the price. I'm chasing features.

    Your C++ SDK, is it compatible with Unity? I mean, if I buy the expensive version, can it be used with Unity?
     
  38. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    You cannot just use a C++ SDK with Unity directly - there is a lot of integration code required. And I can't commit to any specific new features being added in the future; there is just too much uncertainty in software development. Like I said, you need to base your purchase decision on what's available today, not features that might be added in the future. Keep an eye on our forum threads though for any new features or new products as they become available.

    If there are specific features you need in Triton or SilverLining for Unity right now that don't currently exist, your only option would be to engage a contractor on an hourly basis who is familiar with our products. I can refer one if you'd like. Or, find other assets to complement ours - for example, there are a ton of precipitation particle systems in the asset store available for a few dollars if all you need is rain and snow.
     
  39. Non Hic

    Non Hic

    Joined:
    Feb 4, 2015
    Posts:
    95
    I might actually need the contractor. If you can please refer one, it would be very helpful. I will ask him about what stuff he/she is able to add etc.
     
  40. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    I'll PM you with details.
     
  41. markb123

    markb123

    Joined:
    Mar 1, 2015
    Posts:
    8
    Hi,
    Im just trying the demo out now - I choose a new scene and project with no other packages installed, when adding the titan prefab and playing the scene works fine whenever I stop the scene playing unity stops responding and crashes immediately. I only have the titan prefab, the lighthouse and a camera and directional light , there are no other components in the scene or project at all - has anyone had this problem when stopping the scene playing?
    any ideas much appreciated as it seems to be just a triton issue - I dont get this with any other custom packages
    thanks
    mark B
     
  42. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Usually it's a driver issue. If you're using DX11, try switching to DX9 or vice versa (in your player settings). That will force Triton to use a different GPGPU technique for calculating the wave equations, which usually works around whatever is going on.
     
  43. markb123

    markb123

    Joined:
    Mar 1, 2015
    Posts:
    8
    Hi thanks for the reply - Ill try again in a few days the laptop I have is fairly old as well - I have a new one arriving so ill try again then
     
  44. markb123

    markb123

    Joined:
    Mar 1, 2015
    Posts:
    8
    OK so I have a new computer / unity 5 / no other packages but same problem - I did notice that if I use the demo scene this did work once when I stopped the scene playing but if I run it a couple of times it still crahses, Ive removed the checkbox on player settings for directx11 also. Bit baffled by this if it works for everyone else
     
  45. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    What graphics card do you have, and are your drivers up to date? Just stopped and started it 10 times without issue under Unity 5.0.0f4 here, so I do suspect whatever is going on is specific to your system configuration. Still it would be good to isolate if we can.
     
  46. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Also, just to formally announce it - Triton does work with the personal edition of Unity 5! The pro-only restriction in Unity 4 has been lifted, since Unity 5 personal includes native plugin support.

    You will see a bunch of errors upon importing Triton with Unity 5, but these are all safe to ignore. Our native DLL's confuse the importer, but it deals with everything properly.
     
  47. RobFrag

    RobFrag

    Joined:
    Jul 1, 2014
    Posts:
    3
    Hi,
    Im running with serious performance problems caused by rendering to texture (needed because couldnt render transparent objects and triton with one camera). So my question is, is it possible to render triton and transparent layer objects without using Render Texture techniques or is it not at this moment, and if not possible, will it change in future?

    Rob
     
  48. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    I'm not sure I understand why you need to use a render texture to deal with transparency. Normally you can just have one camera draw over the other by having the second one not clear the depth or color buffer; whether it's a render texture under the hood probably depends on whether you have deferred rendering on or not.

    I think you've already read the section in our documentation (http://sundog-soft.com/sds/2014/07/triton-oceans-unity-pro-documentation/) on handling transparency. There's a sample project linked to there as well.

    There's nothing we can do to change this, to answer your question. The fundamental issue is that Unity only calls native plugins for rendering at the very end of when the camera's frame is drawn, and this is after Unity's own transparent objects are drawn. So, anything drawn by a native plugin (like Triton) will draw over anything else in the camera, including transparent objects. The only known workaround is using multiple cameras to draw transparent objects over a primary camera that draws everything else plus Triton's water.
     
  49. RobFrag

    RobFrag

    Joined:
    Jul 1, 2014
    Posts:
    3
    Thank You very much, it seems I misunderstood that section in Your documentation.
    Now I'll just throw out all Render Texture logic and leave only 2 cams, one to draw triton and other stuff w/o transparent layer objects, second with greater depth and Dont Clear Clear Flags. This is problem solved for me :)

    Thanks again, Rob
     
  50. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Using unity 5 and hadn't looked at the water in a while. In the editor the water is now pink, and coastal effects are no longer working, enabling them just has no effect.

    just updated my nvidia driver 2 days ago.

    Any idea what the problem could be?