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. FuzzyShan

    FuzzyShan

    Joined:
    Jul 30, 2012
    Posts:
    174
    Not sure why, but when I import the package into Unity, it gave me DllNotFoundException for TritonDLL,happens on all my computers, Unity Version: 4.0.4F
     
  2. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Thank you for giving it a try. There could be a couple of things going on here.

    As noted in the documentation, TritonDLL.dll depends on the Visual Studio 2010 runtime libraries from Microsoft. I'd bet your systems don't have these installed. The easiest way to get these is to just install the standalone Unity demo from our website at:

    http://cdn.sundog-soft.com/triton-unity.exe

    The installer for our demo installs all the required dependencies, but unfortunately Unity packages don't involve an installer - so there's no way to automatically enforce this dependency there.

    Another possibility is that you're referring to deploying a standalone app with Triton for Unity. Also noted in the documentation, you need to install TritonDLL.dll alongside your executable in order for Unity to find it. For reasons I haven't been able to figure out, Unity doesn't load our native DLL from the plugins folder from standalone apps.

    Hope this helps,
    Frank Kane
    Founder, Sundog Software LLC
     
  3. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,130
    I am using several cameras in my project (only one at once). How can I pass ( in every situation) the camera parameter to Triton by script? It would be easy if I could set the camera parameter to Camera.main.
     
  4. sundog

    sundog

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

    If you leave the camera parameter set to "None", Triton will automatically attach itself to the main camera when the scene starts.

    If you need to switch Triton's camera at runtime, however, a method like this inside TritonUnity.cs should do the job:

    Code (csharp):
    1.  
    2.     public void SwitchCamera(Camera newCamera) {
    3.         if (gameCamera != null) {
    4.             Component renderer = gameCamera.gameObject.GetComponent<TritonRenderer>();
    5.             if (renderer != null) {
    6.                 Destroy(renderer);
    7.             }
    8.         }
    9.        
    10.         gameCamera = newCamera;
    11.         newCamera.gameObject.AddComponent(typeof(TritonRenderer));
    12.        
    13.     }
    14.  
     
  5. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,130
    Thanks, but I have tried the Unity Pro Triton demo asset and when hit play I get a crash bug in the editor.
    (I have the dlls because I installed the executable first and it works, and the resources path is correct)
    Here: i7, Geforce 460 GTX, 8 Gb. Ram, Windows 7 64 bits, Unity Pro 3.5.6f4
     
  6. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    That's weird that the standalone demo would work, but it would crash in the editor. I haven't seen that happen before. If you have the time and inclination, try opening up the TritonResources/Triton.config file in a text editor, and set "enable-debug-alert-messages" to "yes". If you can tell me what messages pop up before it crashes, it will help me understand how far it's getting and what might be the issue.

    Your system is actually pretty similar to my own, the only difference is that I'm running a GTX 690.
     
  7. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,130
    Sorry but I have uninstalled the assets and demo. If I find enough time I 'll try it.
     
  8. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    I spent the morning trying to reproduce a crash in the editor with Triton to no avail. Another possibility is outdated video drivers - I have gotten reports of Triton's use of CUDA crashing with certain drivers form NVidia that are a few months old. In every case, updating the drivers cleared it up.

    If anyone runs into a crash using Triton that isn't resolved by:

    - Installing the Visual Studio 2010 runtimes (or our standalone demo app)
    - Updating your video drivers
    - Ensuring you aren't just hitting the 5-minute-per-run limit in the evaluation package
    - Correctly installing TritonDLL.dll as part of a standalone deployment, as described in the docs

    I definitely want to hear about the details. We can be reached at support@sundog-soft.com

    Thanks!
    Frank
     
  9. sundog

    sundog

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

    Version 1.4 of Triton for Unity Pro is available at our website now, and should be available in the asset store within a week assuming all goes well with the submission. This revision offers:

    • Unity Pro 4.0 Support (the 3.5 version is also available at our website.)
    • Better specular lighting effects
    • Support for multiple cameras

    We got a copy of the amazingly awesome Big Environment Pack asset, and made some fresh screenshots using Unity 4.0 with our Triton Oceans 3D Water and SilverLining Skies 3D Clouds assets for you (click to embiggen):



    These images were created by rendering SilverLining's sky to a cube map, which was then passed to Triton as an environment map to be used for reflections. It's also possible to pass planar reflection maps to Triton for local reflections, if you have them.

    Thank you!

    Frank Kane
    Founder
    Sundog Software LLC
     
    Last edited: Nov 17, 2012
  10. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    If this system could auto generate and animate shores it would be totally worth the price for me.
    The system used on Age of Empires 3 for example, it is much simpler than this system but the shore generation turns it into a fantastic tool for that game.
     
  11. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,472
    Would like to see some blending at the shorelines, they are hard connections in the screenshot.
     
  12. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Lars - the transparency of the water is adjustable via the depth parameter, which can be used to provide some blending with shorelines. If you fiddle with the standalone demo, you can adjust the depth and see how the water becomes more transparent with lower depth values. Transparency that varies with the distance to the geometry below the water isn't something Triton can currently do, however - I think we'd need access to Unity's depth buffer for that sort of effect (something our native rendering plugin doesn't have efficient access to under Unity's plugin architecture.) You could simulate the effect by blending the seafloor texture toward the deep-water refraction color with distance from the shoreline, however.

    Bruno - that's a good idea for a new product.

    Thank you for the feedback!
     
  13. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    141
    I must say this look very interesting! Tried your demo, but have some problems with the wakes.. standard demo scene, moving camera and this happens..see picture, Bug maybe?
    Dx11 and unity4

    Wakes seem to pop in...
    PIC2
     

    Attached Files:

    Last edited: Nov 29, 2012
  14. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Thanks for having a look!

    There could be a couple of things going on there. Since we apply all of the wake waves in the same pass as everything else, there is an upper bound to how many wake waves can be rendered at once. If that ball representing the wake generator is moving on a circular path, that basically sets up a worst case scenario where Triton can't intelligently pick the waves that are closest to the camera to draw - since they are all equidistant.

    To put it another way, once more than 20 or so wake waves have been generated, we run out of parameter space in the shaders, and we pick the waves closest to the camera to render. But if your "ship" is circling the camera, it can't really pick between them, and so you'll see popping as some waves get culled while others don't.

    Normally this wouldn't be much of an issue in a real application, since objects tend to move in more of a straight line in the water.

    The other thing I see is that the foam is a little over the top in this shot. I think that's a function of the velocity of the wake generator being unrealistically high - you might want to try slowing it down.

    A lot of fine tuning is possible with our wake effects. If you open up the file TritonResources/triton.config in a text editor, you'll find a "Ship wake settings" section at the end that can be used to create the specific look you're after. For example, the upper bound on the number of wake waves in DX11 would be set by the max-wake-waves-dx11 setting, but at some point the shader will stop compiling if it's set too high.

    Hope this helps,

    Frank Kane
    Founder, Sundog Software LLC
     
  15. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    141
    Ok.. but this is your demo scene, all settings default, The only thing I did is to turn on motion test in your movable sphere..
    The first picture is becouse the camera is also moving the spere when I use your free move cam script..

    I also want a more complex demo scene with a ship that responds to the waves.. example on how to readout the planar of the waves?

    Web76
     
  16. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Yes, the demo scene unfortunately sets up exactly that worst case scenario with an object circling the camera that I described. It's only meant to illustrate how to set up a WakeGenerator - if it's on a more realistic path, that wave popping will be lessened.

    I don't have a buoyancy model of my own to share, but basically you'll want to have a look at the Raycast method in TritonUnity.cs to get intersection points and surface normals from the ocean surface to power one.

    I agree Triton for Unity would benefit from a more complex and visually interesting demo. Making demos in Unity just isn't my strong suit though - if anyone in the community might be interested in earning a few hundred bucks to put together a more interesting scene with a ship with wakes, a camera following it, and a simple buoyancy model powering it, please drop me a note (fkane@sundog-soft.com)
     
  17. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    141
    Scripting is not my strongest skill either, thats why I need a good demo to learn how its done.

    Wishlist demo:
    A ship with boyancy.
    Ship makes waves and foam
    Reflection from ship on oscean


    Btw the spray effect on the waves are not as flat and nice looking as in your pictures from triton. More bulky and slow..
     
  18. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    The appearance of the spray will change based on the wind conditions and wave heights. You'll also find lots of ways to tweak the spray in the triton.config file, and make your own tradeoffs between performance and visual quality if you choose.

    Thanks for the feedback.
     
  19. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    127
    Has anyone tried Triton with UniStorm 1.6? These are two apis that I'm considering using together for my upcoming project.

    Can you change the colour of the sea to almost black, may be, for example realistic night rendering? The sea has to not just reflect, but also take on the diffuse colour of the sky.
     
    Last edited: Dec 1, 2012
  20. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,430
    I suggest to take a look at the SilverLining Sky/Cloud system - it's from the same company as triton and offers an accurate sky for any time and location (lat / lon) on the planet. It comes with 3D clouds and correct lighting of the clouds based on the sky/sunlight. Just add any another weather particle effect like rain to it and set the wind speed of triton and SilverLining to the same amount to simulate storms. It also comes with correct stars and moon for any time/location.
     
  21. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    127
    Thank you. That sounds like almost exactly what I'm looking for.
     
  22. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    127
    It doesn't do buoyancy - that's an issue you have to sort out with physics. However I read earlier that it's quite simple to retieve the ocean surface intersection point and surface normal along a ray, which can then be used as a basis for powering your own buoyancy model.

    A true physics water simulation would be quite something, but way beyond the power of PCs, I think.

    To be honest I've been looking at water simulations since 2003, and this is the best I've seen, despite it's limitations. I just wish it were a bit cheaper so I could afford it.
     
    Last edited: Dec 3, 2012
  23. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    141
    With buoyancy I meant a rig that read out those numbers, so I could use it to drive my physic ship.
     
  24. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    127
    Just out of interest, have you bought Trtiton?
     
  25. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    141
    No not yet, have the pro water 4 at the moment. Doing simulations for mostly different crane systems on oilrelated ships, so the water is mostly background fill. But soon I think I will get some use for better water, if I can convince my boss I need it. :) then I will buy.

    Still testing the demo, will try to get som readings out of the surface before I buy.
     
  26. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    127
    Sounds interesting. Are you using mass on your vessels?

    You might want to consider breaking the waves into two components - longitudinal and transverse. For the longitudinal component, the ship is going to start reacting to swells/waves that have a wavelength of more than half the length of the ship. The centre of gravity of the ship is more or less fixed, but the centre of buoyancy is going to be shifting constantly in relation to where the greatest mass of water is along the hull. I think this is the basis of a simple buoyancy model.
     
    Last edited: Dec 6, 2012
  27. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    141
    Hi, Use masses on the main ship.. but I approach the bouancy with a grid of maybe 8 gameobjects that are evenly spread under the ship, and those are spring jointed to the ships rigidbody.. so when the waves come along the ship is forced to follow the waves.. a little tweaking is nessesary. :)

    Kind regards
    Web76
     
  28. sundog

    sundog

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

    An update to the Triton Ocean and 3D Water for Unity Pro package just got approved in the asset store - this new revision includes easy-to-use planar reflections on the water surface. Previously, Triton for Unity was used mostly with environmental cube maps since generating planar reflections required complicated integration work. But with Triton for Unity Pro 1.51, enabling planar reflections is as easy as toggling a checkbox. You can even use planar reflections together with environmental cube maps - Triton can blend them together, giving you the best of both worlds.

    Here are a couple of screenshots of planar reflections in action with Triton for Unity Pro:




    A free evaluation is available so you can try Triton out before purchasing at the asset store. This latest revision requires Unity Pro 4.0 on Windows; our previous version for Unity Pro 3.5.6 is still available at our website.

    Thanks!
    Frank Kane
    Founder, Sundog Software LLC
     
    Last edited: Jan 3, 2013
  29. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Another revision of Triton for Unity Pro 4.0 has been accepted to the Asset Store - this latest rev fixes a bug in the TritonUnity.RayCast method, and also greatly improves the accuracy of collision tests against the water surface. This means your buoyancy models will be more stable, as there won't be any more discontinuities in the wave heights returned by Triton.

    Grab the free trial from our website, or check it out in the asset store.

    Thanks!
    Frank Kane
    Founder, Sundog Software LLC
     
  30. PyroStudios

    PyroStudios

    Joined:
    Sep 23, 2012
    Posts:
    213
    Is there a chance this will ever work on mac? ... that's the only thing holding me back from buying it right now :-(
     
  31. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    The issue on Mac is performance; none of the Fast-Fourier Transform libraries we're using in Triton that support parallel processing are available on the Mac, so Triton ends up being unacceptably slow on that platform. It would be possible to release a Mac version without much trouble if it were just for doing level design on that platform, but a Mac version of Triton that could be deployed to end users would take more work. Specifically, we'd need to write our own inverse 2D FFT implementation using OpenCL and hook it up to Triton's displacement maps.

    Fortunately, Apple does provide some sample code that could give us a good starting point.

    So - is there a chance this will ever work on a Mac? Yes, but I don't know exactly when just yet. I want to tackle things like breaking waves on shorelines, rotor wash, and impact effects first. I'll announce on this thread as new platforms are supported.

    Thank you for having a look!

    Frank Kane
    Founder, Sundog Software LLC
     
  32. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    We're up to version 1.7 of Triton for Unity now! New features:

    • Rotor wash effects - just attach a script to a helicopter model, specify the size and speed of the rotors, and Triton does the rest. Particle-based spray effects, foam, and real 3D wave displacements.
    • Impact effects - you can model a bullet hitting the water at high speed, or a heavy torpedo - Triton will figure out the energy of the impact and produce the appropriate spray and waves.
    • Updates to Triton Ocean SDK 1.72 under the hood, which contains several bug fixes

    Here's a quick image of rotor wash in action:



    Thanks!
    Frank Kane
    Founder, Sundog Software LLC
     
  33. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    141
    Is the demo version for unity4PRO also updated?
     
  34. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Yes - in fact, I should mention that we're ONLY updating the Unity 4 Pro version now. It has been updated both on our website and in the asset store.
     
  35. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    I see another update up, do you have a changelog for new versions? Do new versions match the regular triton (non unity) feature set?
     
  36. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,130
    On the basis of this Asset high price I think the Unity implementation of Triton should be simplified a lot because actually it is too tricky (previous files required in the system, problems with file path...)
    I have tried several times to test it in Unity editor but I got only crashes about something missing despite of I followed all the instructions.

    However the Triton demo (executable), works OK on my computer. :eek:

    I have Unity Pro 4 - Windows 7 - Intel i7, Nvidia 460GTX, 8 Gb RAM
     
    Last edited: Mar 8, 2013
  37. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Ronan - you are observant! Yes, Triton for Unity Pro 1.8 just went up a couple of days ago. I don't have a changelog specific to the Unity version, but the things that are new with this release are:

    - Built on the new Triton Ocean SDK 2.0, which contains a whole bunch of enhancements (the height map stuff described there hasn't been integrated into the Unity version... yet.)

    - New automatic underwater visibility effects. If the camera goes below water, we'll automatically fog the water surface and the rest of your scene accordingly.

    As always, you can try out Triton for Unity for free.

    angel_m: A lot of the complexity is a necessary evil due to limitations in how Unity handles native plug-ins such as ours, but you shouldn't be having that sort of trouble - you should be able to just import Triton as a custom package, open up the demo scene included, and be off and running in the editor. Your system configuration looks right to me. If you could send me your log files after importing our package into a clean project and encountering an error, I might be able to figure out what's going on. If the demo works, it sounds like you probably have all the system dependencies in place. Send them to support@sundog-soft.com and I"ll have a look.

    Thanks!
    Frank Kane
    Founder, Sundog Software LLC
     
  38. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    127
    How does it Triton work for moving objects such as a ship where the main camera is situated? Is it like a large disk that "follows" the moving object or camera, or will the ship eventually come to a boundary? Thanks.

    /Jason
     
  39. sundog

    sundog

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

    Triton implements an infinite ocean, so there is no boundary.

    It's not a disk or a conventional mesh at all - it's something called a "projected grid." Basically the idea is that a 2D grid is created in screen space, and then projected onto the plane of the water surface by Triton's vertex programs. It gives you a perfect level of detail scheme, with no boundaries.
     
  40. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    127
    Thanks. I don't pretend to understand how that works but it sounds exactly what I need. How is the horizon figured out though, if it's an infinite plane with no earth curvature modelled?
     
  41. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    It all works out with the horizon; basically we shoot out a bunch of vectors into your screen, and see where they intersect the water plane. The horizon appears at the point where those vectors become parallel to the water surface, and we start discarding vertices at that point. Internally Triton does a bunch of tricks to keep the horizon line straight and in the right place, avoiding any sampling error.

    The curvature of the Earth only becomes an issue at very high viewpoints. If you anticipate using geocentric coordinates and zooming in and out from space, send me a PM. The underlying Triton SDK does support ellipsoidal Earth models, and we could expose that capability to Unity without too much trouble if there were a demand. I don't know of anyone using Unity for that sort of thing though.

    That's all a long winded way of saying "trust me, it works." Of course there is a free evaluation package available at our website if you'd like to play around with it.
     
  42. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    438
    hmmm no Mac OS X Version.... useless for us....
    that is what i never wanted.... after the Windows Port of Unity...
    now we get too much Windows only here...
     
  43. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    You're thinking the wrong way here, this is a non unity system that got ported to unity, if unity didn't support window, then there would be no triton on unity that's it, so such a post whining about windows user getting it makes no sense, it does you no harm, it was just never intended for macos
     
  44. Annihlator

    Annihlator

    Joined:
    Oct 15, 2012
    Posts:
    378
    There is indeed "No Mac OS X Version", why is this actually? does it rely on DX11? (since there's also a Linux version i wouldn't expect that to be the answer :) )
     
  45. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    It's because most of the libraries we use to accelerate the Fast Fourier Transforms that power Triton's wave simulation are not available on MacOS. We would need to implement a special OpenCL-based inverse FFT method from scratch in order for performance to be acceptable on MacOS.
     
  46. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Iirc you has intel fpp as a fallback , why noy use that on macos? It's slower than gpgpu i assume but better than nothing?
     
  47. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Intel IPP is better than nothing; there are two reasons why I wouldn't release a MacOS version of Triton that just relied on it for FFT acceleration:

    1. Performance would still be about half of what it is on Windows, and I guarantee I'd get beat up in this forum for that :)

    2. It costs $700 to license IPP for MacOS, since Intel only licenses IPP separately from their "C++ Composer" product on Windows and Linux platforms (where it costs $200). We wouldn't likely recover that cost plus the development cost anytime soon, given that the only demand I'm seeing for Triton on MacOS is from a handful of prospective Unity users. That's just not a good investment from a business standpoint.

    A better approach is to bite the bullet and develop an OpenCL-based FFT approach based on the sample code Apple provides, which will give Triton on MacOS performance everyone can be happy about - and all it costs is my time. It's just a matter of that bubbling up to the top of the priority list (and it is getting close.)

    -Frank
     
  48. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    All this is missing is an included example ship with a Buoyancy model that's optimised for this package to show it off to its full potential.
    Would be great to have a drag and drop Buoyancy script for us non coders that would react to wave direction and heights for different ship hull types and size/weight.
    That would make this a complete package and worth the price. Fingers crossed.
     
  49. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Hi John, thanks for the feedback. An included buoyancy model is the #1 most requested feature for Triton for Unity Pro, and we're definitely listening.

    As anyone who's tried it knows - building a good, general-purpose buoyancy model is really, really hard, so I don't think this will happen overnight. But do stay tuned.

    What *will* happen overnight - hopefully - is a new version of Triton that includes an improved wave model, support for swells from distant storms, and automatic generation of height maps from your terrain used for smooth blending of the water with shorelines. It's available now from our website, but we're still waiting for the asset store admins to approve it. I'll post some eye candy and more details once it's approved, but here's a video for now showcasing some of the latest capabilities:

     
  50. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    127
    Have you looked at the buoyancy toolkit on the store? I've been playing around with this and it's an excellent buoyancy model. However I do not know if it's compatible with Triton.
     
unityunity