Search Unity

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

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

  1. lobachevscki

    lobachevscki

    Joined:
    Apr 22, 2014
    Posts:
    9
    Thanks, you are very kind.

    We are testing a lot of stuff right now, but as soon as I can test your suggestion I will give you a more detailed feedback.

    Thanks again.
     
  2. lobachevscki

    lobachevscki

    Joined:
    Apr 22, 2014
    Posts:
    9
    Hi.

    We've being testing the Triton with the Oculus, and we have the same problems. The suggestion above doesn't work for us, and I think the problem is totally different.

    There are various screecaps of what's happening.

    This is the ingame take when I plug the OVRCameraControll (the GameObject that contains both cameras).

    $oculus_ovr_001.jpg

    This is when I just plug the Left Camera.

    $oculus_l_002.jpg

    And this is with the Right Camer plugged in.

    $oculus_r_003.jpg

    To be really honest, we haven't licensed the plugin yet, I started to think that maybe it has something to do with that. We really want to purchase it for our project, and we were prepared to do so, but the publisher added the Oculus as a requirement at the last minute forcing us to test everything again to double check that all was working properly with the hardware. So far, the only problem we had was with Triton.

    Sorry for any inconvenience, but we are insisting because Triton is the best solution given our purposes.

    Thanks again.
     
  3. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    We don't have an Oculus Rift here at Sundog Software, so I really have no idea what might be wrong. I can tell you that nothing will behave differently if you were to use a licensed version of Triton; it's exactly the same software as the trial kit (just unlocked.) Hopefully the community will chime in with some ideas here.

    We'll order a Rift as this does keep coming up, but right now they are back ordered into August, so I can't even begin to help until then.
     
  4. rahul007

    rahul007

    Joined:
    Jul 9, 2013
    Posts:
    45
    So are you guys working on the underwater rendering?
     
  5. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    214

    hi and what must i do when i have only java scripts in my game projekt to switch the cameras??
     
  6. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    662
    Hi, I'm working with the Oculus Rift as well. I haven't solved all problems yet, but I think I got a step closer to a usable result. Maybe Frank could push us one more step to preliminary perfection? Please? :)

    I set it up like this:
    1. Assign the OVRCameraController (that's the camera that takes the pictures of the two eye-cameras and distorts them into the final image) to Game Camera on the Triton prefab. - If you're using SilverLining, make sure you set the FarClipPlane to 100000 on the OVRCameraController (not on the camera component)
    2. Put my little TritonCamera script (below) onto both eye-cameras (CameraLeft, CameraRight), so they get registered as cameras that should render the Ocean.

    Code (csharp):
    1. //Put this on a camera to make the ocean show up (not needed for the game camera you specify on the triton prefab)
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class TritonCamera : MonoBehaviour {
    6.  
    7.     public TritonUnity triton;
    8.  
    9.     void Awake () {
    10.         if(!triton) triton = FindObjectOfType<TritonUnity>();
    11.         triton.AddCamera(camera);
    12.         Destroy(this);
    13.     }
    14. }
    Now this looks good as long as you make sure that OVRCameraController is positioned well above the sea-level, because if it gets too close to the sea-level this happens:
    Let's call this Problem 1. I can almost get rid of this by changing the near and far clipping planes to 0 and 0.01 respectively.

    Problem 2: I get lots and lots of errors like this:
    I guess this is because the camera on OVRCameraController (the one that TritonUnity knows as Game Camera) is an Orthographic Camera and thus fails to render reflections properly? - I'm currently trying to fix this by adding something like ignoreReflection = camera.isOrthoGraphic; to TritonRenderer's Awake. That makes the errors go away, but I'm not sure it's the best approach, because...

    All this makes it look okay, but there's an underlying problem (let's call it Problem X): I'm still rendering the ocean for the orthographic camera, right? Ideally I'd just like to have the two eye-cameras render the ocean and not have anything weird happen beyond that. :)

    Now why am I assigning the orthographic to Triton anyway? Because if I do it the other way and assign the Right Eye to the GameCamera on Triton and put the TritonCamera script on the Left Eye this happens:



    The undistorted image shows through the distorted image in places (I can see the undistorted image by disabling the orthographic camera). No idea why this happens. :/

    Please help :)

    Bonus Section:
    A little bit more insight about the Oculus Rift's camera setup in Unity (or at least how I think it works):
    OVR Camera Controller: parent to the two eye-cameras, responsible for setup and correct position/rotation of the cameras, takes both images and creates the final distorted image
    - CameraLeft: parented to OVR CC
    - CameraRight: parented to OVR CC, holds the AudioListener and Flare Layer
     
    Last edited: Jun 12, 2014
  7. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    662
    One more question: what can I do about this ugly disconnect between object and reflection? It's not a problem when viewed from afar, but if you get close to an object it becomes very obvious :/

     
  8. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    214
    @col000r the post of the script fpr the camera works fine.

    now the fps player see the ocean. all looks nice but one question

    when i build the scene and start the exe file no more ocean in the map O-0
    what must i do that after bulid all is okay

    greetz Reiner
     
  9. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    662
    Been there, done that. Read the documenation :) You need to put TritonDLL.dll and the TritonResources folder next to the exe file for it to work.
     
  10. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    214
    Thx a lot it´s works :)
     
  11. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Gah! So sorry guys, it seems my email notifications of when people post in this thread stopped working for some reason. I don't see them in my spam folder or anything so I'm not sure what's going on.

    col00r - There is a clipPlaneOffset constant at the top of TritonReflection.cs that will probably get rid of that reflection gap you're seeing if you adjust it.

    Regarding the Oculus Rift issues, great to see it's getting closer for people. We're told to expect our Rift developer kit to arrive in a few weeks so we will be hammering out any remaining issues with it at that time.

    We are about to release underwater God rays support in our C++ SDK, which means our next release for Unity will have it as well. No info yet on exactly when that will be.
     
  12. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    We get a lot of questions that are addressed in Triton's documentation, but not everyone knows where it is or has time to read it all. To make life a little easier, we've posted a copy of the Triton Oceans for Unity documentation at our website - hopefully this will make it easier to answer your questions about Triton for Unity when Googling for an answer, at least.

    Hope this helps.
     
  13. Fockir

    Fockir

    Joined:
    Jul 30, 2014
    Posts:
    2
    I have the same issue with trition demo that has been mentioned before.Any solution for this problem?Works in editor but does not on standalone build ---using 86_64. with taken and renamed 64.dll i use unity 4.5 1f3 trial

    DirectX11 checked before build, and I'm testing on same system box. VC is installed as DirectX11 and referring to documentation:

    1. Copied TritonDLL.dll file from the Assets/Plugins folder next to my game executable, same directory
    2. Copied the whole TritonResources folder as is it from Assets/Triton folder and dropped in the Resource directory of the build.-------//

    soluton 2
    TritonDLL.dll(taken form plugin 64 and renamed) and the TritonResources folder next to the exe file doesn't work also
    any idea how to make it work???​
     
    Last edited: Aug 5, 2014
  14. rodcarvalho

    rodcarvalho

    Joined:
    Mar 18, 2013
    Posts:
    2
  15. Fockir

    Fockir

    Joined:
    Jul 30, 2014
    Posts:
    2

    YEAH IAM TRYING TO USE IT WITH COULUS AS WELL.but so far not even lack with stand alone build.Maybe they have some time off for now.holidays and so on
     
  16. veddycent

    veddycent

    Joined:
    Jul 22, 2013
    Posts:
    79
    TritonUnity.cs

    Line 72: bool multipleCameras = false; //Change to true.
    Line 205: comment out
    Line 213: comment out

    Hopefully this should work, (kind of).

    PS I haven't tested this but if I remember correctly I did something like this.

    PSS This will render Triton on every single camera in the scene!
    Regards
     
  17. philwinkel

    philwinkel

    Joined:
    Jun 6, 2013
    Posts:
    313
    apologies, I did not read through all 8 pages of the thread - I have a few quick questions that may/may not be duplicates:

    • does Triton work with image based lighting from Skyshop? If not, is this possible / feasible?
    • Networked waves - is this possible, to sync the state of the waves in a multiplayer game? so physics run on the server, and clients' water stays synced with server? Probably an unreasonable request, I know, I am just curious xD

    Thanks~
     
  18. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Argh! I'm still not getting email notifications from this thread for some reason, even though I keep turning the option on for it. Apologies for going dark there, I didn't know you guys had questions. We definitely do monitor support@sundog-soft.com so I'm not sure where your question went rodcarvalho - did you end up getting a hold of us?

    Anyhow, we are still waiting for our Oculus Rift DK2 to arrive. Once it does we will see if we can get Triton running on it. Until then you'll have to be patient...

    Triton doesn't explicitly integrate with SkyShop. You can however give it an environmental cube map to use for water reflections which would accomplish a similar goal.

    The waves are synchronized across multiple systems as long as the frame times are synchronized.

    I'll go check my email notification option... again!
     
  19. Anh-Pham

    Anh-Pham

    Joined:
    Feb 7, 2012
    Posts:
    31
    Hi,

    We bought Triton Oceans and 3D Water version 3.4.1 from Unity Asset Store, but we couldn't do anything with it because it immediately made an Unity crash when I played your Demo scene.

    We sent an email to support@sundog-soft.com with a Unity crash log. It contains all information about our Unity version, OS, configurations, crash point... We hope you can support us as soon as possible.

    Thank you!
     
  20. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    And... forum email notifications still aren't working. I've complained to Unity about this issue, but meanwhile please bear with me if my responses to this forum are delayed.

    Anh, thank you for your purchase. I'm getting other emails sent to support@sundog-soft.com, but for some reason I don't see one from you. Please re-send it, and cc me at fkane (at) sundog-soft.com. I'd like to know if our trial version of Triton for Unity Pro worked for you - if so, something probably went wrong when importing the package from the asset store, but I can tell you how to unlock the trial.
     
  21. Anh-Pham

    Anh-Pham

    Joined:
    Feb 7, 2012
    Posts:
    31
    Today I tried to download Triton demo app & trial unity package for MacOS. The demo app worked well on my Mac. But about the trial unity package, after importing it to Unity, I opened the demo scene, clicked Play, then Unity crashed. Did I miss to config something?

    My Unity 4.5.2, Mac OS 10.9.4 (I tried it on Unity 4.3.4 too, but same crash)
    I sent email again and included the Unity crash log too. Its title is " Triton Oceans and 3D Water crash bug! ". Please check your spam box if necessary.

    Thank you!
     
  22. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    We received your email Anh and will be investigating today. It's not an issue we've seen before. We'll communicate with you directly and follow up on this forum if it turns out to be something that could affect others.

    For others - remember we have a trial version of Triton for Unity Pro available if you want to make sure it works well for you.
     
  23. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    662
    @sundog: Have you received your Oculus DK2 yet?
    Because I'm having a really hard time making Triton Oceans work with it.
    I had worked around all the difficulties of making it work with DK1 and had a really nice workable solution (see further above).

    But DK2 is a very different beast and at the moment Unity just crashes whenever I try to combine the two...

    All I do is this:
    1. New Empty scene in Unity 4.5.3f3
    2. Add TritonPrefab-Authenticated from Triton v3.4.1
    3. Add OVRCameraController from Oculus Unity Integration 0.4.2
    4. Add TritonCamera.cs to both eye cameras (see below)
    5. Run - Nothing happens for a few a few seconds, then Unity crashes.
    I don't even get to the part where I would hook up Silverlining, my custom weather system or anything else... :/

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class TritonCamera : MonoBehaviour {
    5.  
    6.     public TritonUnity triton;
    7.  
    8.     void Awake () {
    9.         if(!triton) triton = FindObjectOfType<TritonUnity>();
    10.         if(!triton) { Debug.LogError("Triton not found!"); return; }
    11.         triton.AddCamera(camera);
    12.         Destroy(this);
    13.     }
    14.  
    15. }
    EDIT: This is very strange. I just started a new project, imported Triton and Oculus Integration, put both in the scene and it ran. Then I switched to my other project where I had done the exact same thing. Crashed Unity. Switched back to new project. Crashed Unity. Can't get it to run since. Mysterious...
     
    Last edited: Sep 8, 2014
  24. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Yes, it just arrived on Friday. We're going to start working on Triton / Unity / Oculus integration shortly.

    I'm not entirely sure where the "camera" comes from in your script, or if destroying your TritonCamera right away is causing problems. If it's helpful, I'm attaching a script we sometimes give people that they can attach to the cameras they want Triton to appear in. I think you'd want to attach the left and right eye cameras using this - but we haven't tried it ourselves yet. Probably best to wait a week or so until we've had time to work on official support for the DK2 here.

    In other news - Anh Pham's earlier problems turned out to be an issue with certain versions of Unity on certain versions of MacOS. We've uploaded a new package to the asset store to fix it (which should be approved soon, we hope) and also updated the trial version of Triton on our website. It's picked up a few visual improvements to Triton in the process as well.

    We will also be starting on Unity 5 support soon.
     

    Attached Files:

  25. col000r

    col000r

    Joined:
    Mar 27, 2008
    Posts:
    662
    camera is the exact same thing as gameObject.camera in your script. The only difference really between the two scripts is that mine self-destructs when it's done. When I replace my script with yours I get the same result: Unity crashes.

    If I turn off the Triton gameObject it runs normally, but if I then enable it, the result looks like the attached file. Something seems to be going wrong during Triton's startup?
     

    Attached Files:

  26. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    My best advice is to hold tight while we work on official Oculus Rift support for Triton. We're working on it. Meanwhile, it might not hurt to send us your log files following the crash you're experiencing (support (at) sundog-soft.com) so we can watch out for your configuration.
     
  27. kuetli

    kuetli

    Joined:
    Jun 9, 2014
    Posts:
    5
    Hi sundog,
    I making a game network use Triton Ocean 3D,
    When I add Triton to my project and built (one source).
    Run source as Server, Triton ok! But not work when I copy this source to another computer and run as Client.
    Can you help me, plz?
    (p/s : sorry about my bad English)
     
  28. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Thank you for using Triton! Hard to say without seeing your log file, but you should start by reading the documentation included with Triton - there's a section called "Distributing Your Application with Triton" that details the steps needed to run Triton in a standalone deployment. I'm copying it here for your convenience.

    When building your standalone executable, Unity will strip out many of Triton’s native resources that it doesn’t recognize, preventing Triton from working. You need to ensure your installer:

    • Installs the TritonDLL.dll file from the Assets/Plugins folder alongside your game’s executable (for 64-bit targets, install the TritonDLL.dll from Asset/Plugins/x64 instead after renaming it.)
    • Installs the TritonResources folder, in its entirety, from the Assets/Triton folder to the path specified in your “Resource Path” property, relative to the executable.
    • Installs the Visual Studio 2010 SP1 runtime libraries from Microsoft.
    • Installs the latest DirectX runtime libraries from Microsoft.
    Be sure the correct 32 or 64 bit version of the Visual Studio 2010 SP1 runtimes are installed.
     
  29. S-0-L-0

    S-0-L-0

    Joined:
    Nov 9, 2012
    Posts:
    163
    Is Triton optimized for mobile?
     
  30. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    No, Triton only works with Windows and Mac desktop projects.
     
  31. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    I was using the trail version of triton and finding to to be a very simple and good looking asset. The only problem I had was with shoreline stuff. Like, there was not transparency in the shoreline and with the heightmaparea set at 100 it was just flat (breaking wave altitude and breaking wave direction did nothing).

    Is this a limitation of the trial version or a problem with me setting up? Basically, is the trial version the same as what you pay for?

    Also, I noticed that using any form of SSAO will cause depth issues with Triton, is there a way around this?
     
  32. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Hi OneShotGG - thanks for checking out Triton.

    The trial version is exactly the same software that you pay for - the only difference is the license key which removes the warning dialog and time restrictions. So, you're doing the right thing by making sure the trial meets your needs first.

    I just ran a test here, and the coastal blending effects seem to work OK. In the scene below, note that the "coastal effects" option is on, my terrain slopes smoothly underneath the water, and I have a low "underwater visibility" setting of 10 meters in this case - that last bit is key, as it controls how transparent the water is as a function of its depth.



    The "breaking waves" effect can be finicky - it's very important that your terrain slopes off underwater at a smooth rate for this to look right. The effect should look like this part of our SDK demo, when it's set up correctly (skip to around 1:08, for some reason I can't link to a timestamp here)



    SSAO has been covered before in this thread; see:

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

    Hope this helps.
     
  33. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,121
    did anyone actually buy this thing for $475? You gotta be out of your mind to spend that. Does it even work with occulus?
     
  34. veddycent

    veddycent

    Joined:
    Jul 22, 2013
    Posts:
    79
    There is no asset in the store that produces waves this accurately!
    The amount of work that goes into this is worth the price.
     
  35. S-0-L-0

    S-0-L-0

    Joined:
    Nov 9, 2012
    Posts:
    163
    @sundog Are there any plans for a mobile version?
     
  36. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,121
    honestly it doesnt even look that good. Make it look as good as the following link then maybe... but i somehow doubt they will charge that much when they finally release.

    http://www.livenda.com/livenda_blog.html
     
  37. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Not yet. Triton's performance relies on having the power of a good GPU to accelerate our physics calculations. Mobile API's and capabilities are quickly getting to where we need them to be, however.
     
  38. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,121
    by the way occulus has a kit for unity... or a package.. u should use that to test with.. you dont even require the rift itself as far as i know.
     
  39. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,464
    not sure about current sdk but previous one required the rift to compute the distortion matrix, if it wasnt plugged in then it would just be flat cam views, looking normal.
     
  40. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    We recently received an Oculus Rift DK2 and are working on it. From what I've heard from our customers, Triton works in the Unity editor with the Rift, but there are problems with using the new "direct mode" in standalone apps that we'll need to work through.

    We're planning to do another point release soon just to get Triton's latest visual quality improvements into our Unity version, so watch for that next. It should look more or less like our SDK demo video at that point:

     
    Ony likes this.
  41. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    You should include the scene from the video above that shows the sea states in action.
    I have used the demo but never got the water to look anywhere near as good as in the video, and so was put of Triton as a ocean solution.
    With a proper scripted scene showing of the sea using a Beaufort scale of 0-12 with maybe a ship at anchor or in motion to show buoyancy and wakes etc eould help to show why Triton should be used for our ocean solution.
     
  42. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Triton for Unity is just a wrapper on top of the C++ library this video shows, so this is what you'll get with our next update.

    You might want to enable notifications for this thread, and give our trial package another look once it's out!

    Probably the most important thing for getting good results from Triton is having a good environment map for reflections attached to it. Make sure your sky box is hooked up to it.
     
    John-G likes this.
  43. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,121
    Seems like a lot of money for something that doesnt look like that out of the box... just saying...
     
  44. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    How does this run with TrueSky Alpha https://www.assetstore.unity3d.com/en/#!/content/17304 as the environment map with regard to reflections? Have subscribed to thread and will try out next release. :)

    Can you say if the following is easily achievable from within Unity and the Triton wrapper.
    The following image is what I wish to achieve within Unity for my Oceans.

    Screenshot taken from your website gallery.



    compared to what I've seen using the demo.



    Also the demo didn't seem to handle cameras from a very great height, as in waves seemed very flat and foam only rendered with a set box and not across the whole visible sea when looking down.
    How is performance when rendering a Stormy Ocean with lots of foam and spray from a high altitude across the whole visible scene.
     
    Last edited: Oct 9, 2014
  45. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Yes, the recent improvements to the water color, foam, etc. that you're seeing in our image gallery for our current SDK release will be in the next Unity version. There are also changes to add more detail from high altitudes that just went in today, in fact.

    As for TrueSky - I don't own it, so I can't say for sure. If it can produce a standard Unity cube map, then you can hook it up to Triton as a reflection source. We actually sell a competing package to TrueSky called SilverLining, which can also produce cube maps for use with Triton.
     
    John-G likes this.
  46. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Any update on the new trial?
     
  47. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Well, there is a new trial on our website that you're welcome to try out. We're holding off on doing a big announcement until we iron out some outstanding issues with the Unity 5 beta with it, and once it's accepted by the asset store. What you'll get now is a lot better than the prior version, but it's not totally polished yet.
     
  48. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Will the current version give the results like in video, or should I wait till Unity 5 version.
    A quick question on the license, do you need to re purchase for each title you release or does it cover an Indie user for all titles?
     
  49. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Unless you're in a rush I think you should wait (it won't be long.) I think the shaders are slightly behind what's in the video still, so you may as well evaluate it at its best if you can.

    Anything you buy from the asset store is required to have the standard Unity license terms (apart from editor extensions) - it is licensed per-site, with unlimited use. (See Appendix 1, section 2 of http://unity3d.com/legal/as_provider for the full legalese.)
     
    John-G likes this.
  50. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Ok Thanks for that, will hold out for next release.
     
unityunity