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

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Yeah, I was taking a look at the Buoyancy Toolkit a couple of days ago. I should reach out to the author of it to see if we can collaborate - I don't think it would be too hard to get the two packages working together.
     
  2. NavpointSoftware

    NavpointSoftware

    Joined:
    Apr 30, 2011
    Posts:
    102
    Hey Sundog,

    I Posted before to show interest in this package, my interest is of course still there. Obviously Its pretty big commitment price wise and so I probbaly won't take the plunge until I have assured myself my project will be successful.

    Having said that I really like the new additions. Its a good start on the boat stuff and I really look forward to seeing this aspect move forward in the coming months.

    Good luck and I look forward to seeing more!

    John
     
  3. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    New features look incredible. Wow!
     
  4. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Wow that would be fantastic. Hope ye can pull it off.:D
     
  5. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    I am also following this closely, and actually a simpler demo would also be fine!!
    A sample that shows a cube that is moving up and down by the top of the waves. No good boyancy needed, just an easy up and down sample..

    Web76
     
  6. sundog

    sundog

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

    The trial (and full) version of Triton for Unity does include exactly that. Well, almost exactly - it's a sphere, not a cube. You have to wait a few seconds for it to come into view, but it does follow the wave heights and leaves a wake behind it. If you don't have the trial already, you can get it here.


    There are other objects illustrating rotor wash and impact effects as well in the included test scene.

    HTH,
    Frank Kane
    Founder, Sundog Software LLC
     
  7. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Oh.. was not aware about the sphere... I has the older demo but I thought the sphere only generated wakes.. that it didnt "float"

    But I am unable to run the newest demo scene in dx11 mode.. crashes my unity pro 4.0..

    But in dx9 mode it is fine..and the sphere "floats" !!
    This is what I need to build a better floating system.. a couple of these floating objects and som physx springs and joints then we have a good ship bouancy model.. :)
     
    Last edited: Apr 12, 2013
  8. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Odd that DX11 is causing you trouble - I'd appreciate a copy of your log after the crash at support@sundog-soft.com if you don't mind. Usually that sort of thing is caused by missing DLL dependencies like the Visual Studio 2010 runtime libraries, but I'd think DX9 wouldn't work either if that were the case.

    Anyhow stay tuned on buoyancy; I've been doing some research on how to work with RigidBodies etc. in Unity and do plan to start tinkering with it myself soon.
     
  9. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Triton for Unity Pro / Windows 1.9 is now available on the asset store and from our website.

    The big new features are:

    - Automatic height map generation of your terrain, which is used to smoothly blend Triton's water with your shorelines. Water will become more transparent, and wave displacements will be dampened, as the water depth becomes more shallow.

    - An improved, more realistic wave model (Pierson-Moskowitz) capable of simulating swells from distant storms and any Douglas Sea Scale state.

    - Improvements to ship wakes and rotor wash

    Eye candy:

    $coastal-fx-2.jpg $moat.jpg $pond.jpg $storm.jpg

    As always, a free trial is available from our website.

    Thanks!

    Frank Kane
    Founder, Sundog Software LLC
     

    Attached Files:

  10. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Looks really nice, any chance you could do a small vid (this look like the big env pack right?) that starts from import triton import big pack and ends with those screenshots? While the water simulation (the shape) was nice before i don't remember it looking quite as good! Will be toying with this asap!
     
  11. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Thanks Ronan - yes, the new spectral model for the waves really does make a difference in how real it feels.

    We do have an old Unity tutorial video from the original release, but it could use some updating. It's on my to-do list!

    That is the Big Environment Pack (with the water replaced, of course, and the skies replaced with our SilverLining Sky 3D Cloud package.) Forgot to give credit, thanks for reminding me.
     
    Last edited: Apr 12, 2013
  12. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Doesn't show for me on the asset store, still showing 3rd april's version, are you sure it is approved?
     
  13. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    That is the latest one; I'm just late in announcing it, since the email Unity usually sends telling you that your submission is approved didn't get to me for whatever reason. I just assumed they were backed up from spring break or something...
     
  14. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Ah oki, hadn't updated in a while so thought it was another thing :) will try it now thanks! :)
     
  15. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    I think I may have narrowed down your problem in DX11. It looks like Unity doesn't always play nice with our use of DirectX11 Compute Shaders for some reason.

    Fortunately, there is an easy workaround. Just open up the Triton.config file inside your TritonResources folder with a text editor of some sort, and change the entry for "disable-compute-shader" to "yes". That will cause Triton to use CUDA instead, which seems to be more stable under Unity.

    This will be the new default in our next release.
     
  16. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    That's a bad change, if dx11 can't be fixed so be it but default should be directcompute rlse you lose ato support. I doubt most game dev want to lose 50% customer support by default.
    Any chance of fixing the root issue?
     
  17. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    It will still work on ATI under DX11 by falling back to Intel Integrated Performance Primitives for FFT acceleration. Under DX9, ATI will use OpenCL which is just as fast as CUDA or compute shaders.

    The underlying issue is proving elusive, as I can't reproduce any problems with our compute shader code outside of Unity. But I'm still plugging away at it.

    By the way, I just uploaded a new demo and trial package to our website that includes a buoyancy model example, based on the public domain buoyancy script from Alex Zhdankin which is really quite good. More details soon.
     
    Last edited: Apr 13, 2013
  18. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Well yes but, intel's cpu solution is really not comparable to gpgpu. It also means having more cpu budget on one platform and more gpu budget on another platform. Makes optimisation harder
     
  19. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Agreed. This is just a temporary workaround while I figure it out.

    So everyone's clear: the issue being discussed only affects CPU vs. GPU usage (and therefore performance to some degree) for ATI users under DirectX11.
     
    Last edited: Apr 13, 2013
  20. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Here's a video to whet your appetite on the new buoyancy example included with Triton for Unity Pro 2.0:



    Starts off calm, and I ratchet up the wind conditions as it goes. This is just Alex Zhdankin's public domain buoyancy.cs script, integrated with Triton's height queries and water impact effects.

    Triton for Unity 2.0 is available now from our website, and is pending approval in the asset store.
     
  21. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Ok..downloaded the latest trial.. running on a nvidia grforce 680gtx mobile card.. but still having constant crash when in dx11 mode..
    Still works in dx9 but not as fast as it did in dx11 :)

    Btw the bouancy is great!

    Web76
     
    Last edited: Apr 16, 2013
  22. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    How strange; DX11 works reliably for me with the current release (I'm on a GTX 690, 314.22 drivers). It's an odd issue; without the current workaround in place, it crashes deep inside NVidia's drivers when using DirectX11, and it only seemed to start happening with NVidia's most recent driver update. Sometimes it crashes from inside Triton's code, sometimes from Unity's - and I can't reproduce it outside of Unity.

    If you are testing with a standalone deployment, remember to update your copy of the TritonResources folder with the one from the latest distribution. It may be a good idea to crack open your assets/triton/tritonresources/triton.config file in a text editor, and confirm that the setting disable-compute-shaders is set to "yes".
     
  23. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    I did check the config and it was disabled. Maybe if I use an older nvidia driver?
    I have not tried to make a standalone deployment yet.. Didnt think I could do that with the trial..

    Have been pløying with it all day in dx9 Mode.. And as soon as I get permision I will buy the package..
    Getting good results with the boyancy script! In the dem scene with my ship at least.

    In my large simulator I go from 100fps with triton ocean in dx9 Mode and lita of other physics stuff on bord the ship.. But as soon i turn on boyancy it drops to 5fps... Some thing buggy going on
     
  24. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    You might have too many control points on your buoyancy model; try reducing the voxel slices and max voxels to see if that's it.

    The trial is exactly the same as the purchased version, but without a valid license code it puts up a warning about being unlicensed at startup, and terminates your application after 5 minutes. You can use it with standalone deployments, as long as you install the TritonDLL.dll file properly as documented.
     
  25. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Just four slices and 16 voxels.. And in the demo scene with my ship, it runs over 100fps with boyancy with much higer detail.
     
  26. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Not sure what would explain buoyancy being associated with a performance drop in your app but not in our demo scene. Perhaps you are outputting a bunch of log messages when buoyancy is on? Feel free to PM me if I can help.

    100 FPS is great to hear. When you consider Triton's simulating over 65,000 3D waves at once with reflections, refractions, spray, foam, and everything else - amazing what computers can do these days.
     
  27. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Hehe.. In dx11 i got almost 200 fps.. My project is 3gig big now and still growing... But I do not use all resources i have in the project.. But all simulators and scenes are in there..

    But will PM you later.. If I cannot get it right.. Really want to get dx11 Mode up and running
     
  28. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Have been testing some more... My laptop has the nvidia optimus tecknology, maybe that could be the problem...
    When it crashes in dx11 it is showing the waves first before it freses and crashes.. this is when "disable-compute-shader = no"
    If "disable-compute-shader = no" it doesnt show waves before it crashes... maybe it crashes even earlier?

    Tried also an older nvida driver.. 307... but it wouldnt remove the new physx driver.. so if physx is the problem (could be) it didnt work..
     
  29. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Have been testing some more... My laptop has the nvidia optimus tecknology, maybe that could be the problem...
    When it crashes in dx11 it is showing the waves first before it freses and crashes.. this is when "disable-compute-shader = no"
    If "disable-compute-shader = no" it doesnt show waves before it crashes... maybe it crashes even earlier?

    Tried also an older nvida driver.. 307... but it wouldnt remove the new physx driver.. so if physx is the problem (could be) it didnt work..
     
  30. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Thanks. This DX11 issue does seem to behave differently on different systems, but the pattern seems to be that the more we ask DX11 to do on lower-end devices, the more likely it is to crash. It smells of some sort of race condition, where higher-end cards are more likely to win the race.

    I'm still trying to isolate it (guess it's not our use of compute shaders after all,) but for now you should stick with DX9 on your system.

    If you're inclined to help narrow it down further, I'd start disabling more features (compute shaders, spray, reflections, coastal effects, disabling Triton entirely) and see if any of them lead to DX11 stability on your system.
     
  31. BrUnO-XaVIeR

    BrUnO-XaVIeR

    Joined:
    Dec 6, 2010
    Posts:
    1,687
    New soft shorelines are so good.
    Now just need some auto generated foam on shore and MacOS support; Then this system will be essential.
     
  32. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    When I force the driver to run on intel it works in dx11 mode.. but then all calc is on the CPU...

    Also another update : the Triton wake generator script,, auto update function... I cannot use it because the velocity updates very veird... if the object has an velocity of 9 it drops up and down from 0 to 9 3-5 times a sec... so the wake rendering is very jumpy/flickering..
    It works nice if I turn it off and and set a velocity...

    Some Idea?
     
  33. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Ship wakes and spray update..

    Got a nice propulsion system running on the ship now.. and it feels quite nice.. but for the finnishing touch I would like to have spray particles on the bow and maybe some on the back.. would also like stronger spray texture alongside the ship hull..

    Actually I dont se any particle spray..made from the wake generator script (only on the waves).. I see in the video above that it exists,,

    I cannot use the unity particle system because of the triton renderer,, rendereing on top of the particles from unity...
    Some suggestions?

    Update: I had to set many parameters in the config file and multiply by 10 to actually se some particles...
    I thing all of the particles has to small size, and I cannot seem to get them bigger?

    Web76
    $Spray.JPG
     

    Attached Files:

    Last edited: Apr 17, 2013
  34. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    The "auto update" option on the WakeGenerator just computes the velocity based on the distance traveled and time elapsed since the last rendering of the object it's attached to. It's smart enough to not update the velocity at all if the time elapsed is zero, so this probably implies that your ship's motion is stopping at times from one draw to the next for some reason. I might see this happening if you have multiple cameras going on, and I've got a fix for that case coded up for our next release. You're generally better off explicitly telling Triton your ship's velocity however if you have it.

    The Triton SDK does have some built-in bow wake and spray effects, and these will be exposed to Unity in the next Unity integration release. As you've found, Triton will draw over any particle effects done within Unity, since Unity's plugin architecture limits us to rendering at the end of the frame. There is a work-around for this described in our documentation; basically you'll need to create an extra camera for your particle effects, and draw this camera after the one that Triton is attached to.
     
  35. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Ok.. If I have 12 objects with buoyancy on... The framerate is killed.. and the settings is only 2 slices per axis and 16 voxels per object..
    Is this to be expected?

    Web76
     
  36. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Well, no. I dug into it though. You know what was taking all of the time? It's not the fancy physics simulation, it's not the intersection tests - nothing you would suspect.

    It was a call to GameObject.FindObjectOfType() that happened for each voxel. Apparently, that is amazingly, amazingly, slow.

    I'm working on a new release that only calls it once at startup, which seems to fix the performance issue with many Buoyancy objects. Meanwhile, it's pretty trivial to move that call outside of the loop it's in within Buoyancy.FixedUpdate if you want to speed it up now.
     
  37. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,688
    From the manual:

    This function is most useful to automatically connect references to other objects at load time, eg. inside MonoBehaviour.Awake or MonoBehaviour.Start. You should avoid calling this function every frame eg. MonoBehaviour.Update for performance reasons. A common pattern is to assign a game object to a variable inside MonoBehaviour.Start. And use the variable in MonoBehaviour.Update.


    Search the web for "performance unity ios mobile" and you will find a lot of blogs or unity answers manuals with information what is bad for script performance on mobile devices and hence not ideal to do on desktops also.
     
  38. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Okay.. Thats exactly something I hoped for :) nice to see something has an easy fix..
     
  39. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    If you grab the latest version from our website, you'll find that if you set the "breaking wave amplitude" setting to something more than 0, you will get foam effects at the shore as waves roll in. For best results, set the breaking wave direction to point toward the shoreline.

    I do plan to commandeer our household's iMac over the next couple of weeks to see what I can do with it. Stay tuned.
     
  40. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    OK, thanks everyone for the feedback on our 2.0 release. I've got a 2.1 trial version available now at our website, and it's been submitted to the asset store for review. Here's what's new:

    - Optional impact effects on Buoyancy objects. When a control point on your ship model hits the water, spray effects will get triggered, with more spray the harder it hits. You can see this effect in the buoyancy video from a few posts back; I'll post it again here for convenience.

    - Big performance improvements on Buoyancy, as described earlier

    - DX11 mode seems solid, at least on my system

    - Spray particles from wakes, impacts, and rotor wash are brighter now

    A reminder, Triton requires Unity Pro 4.x and only supports Windows at this time. Be sure to read the documentation for important information on installing standalone deployments that include Triton.

     
  41. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    Great!! spray and bouancy looks good,,, still the foam is very transparent with me.. and also the rotorwash is very faint! (maybe because of dx9 mode?)
    But it splashes and looks good..
    Now this is a complete package!

    Dx11 still crashes with me.. only when TritonPrefab is in the scene..
     
  42. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    This DX11 issue on your system is really perplexing me, web76. I've been running in DX11 mode for the past two days without a single issue. Have you tried un-installing and re-installing the latest NVidia driver? Any non-standard driver settings or configuration I should know about?
     
  43. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    My system is a Dell Alienware m17r4 portable with a geforce m680gtx mobile graphics card..

    Have tried to uninstall the driver and roll back to an older one.. but no difference... My system also has a intel gpu on the chip.. so it has the infamous nvidia optimus technology.. mayby that could be a problem..

    Standard driver and setup but has some software installed .. 3dsmax 2013 2014...inventor ...solidworks..



    Web76
     
  44. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Cool this is looking like a fantastic package now. Really want unity pro now to get this.
     
  45. web76

    web76

    Joined:
    Nov 4, 2009
    Posts:
    150
    This tipped me over..I have now bought the package! Hope my *DX11 problem will be found..

    web76
     
  46. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Thanks for your purchase, web76!
     
  47. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Latest version (One with Buoyancy) is CTD before the 5min warning dialogue appears. Previous version is working ok for me. (Using the scene included in package - nothing else).
     
  48. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    John, sorry to hear you are having trouble. Are you using the DX11 renderer? Some systems seem to have trouble with our use of Compute Shaders and/or CUDA in conjunction with DX11 for reasons we are still investigating. If this sounds like you, you can work around this temporarily by disabling CUDA and compute shaders in the assets/triton/tritonresources/triton.config file - or by switching to DX9.

    The earlier version would prefer use of compute shaders over CUDA on DX11, whereas this latest version prefers CUDA first.
     
  49. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Using DirectX 10 on a Geforce GTX250. Now previous version is crashing on me too? Hmm only thing I can think of is I had to do a system restore due to a Windows8 fastboot problem.
    Is there any files that are required outside of the demo Triton.unitypackage that I may be now missing? That is most likely the cause of my issue.
     
  50. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    If you run the trial installer from our website, it will install the Visual Studio 2010 runtime and DirectX runtime DLL's required. You'll want to make sure you have the latest NVidia drivers installed as well. Feel free to PM me or contact support@sundog-soft.com if trouble persists.

    Also, make sure you aren't mixing and matching TritonResources folders and TritonDLL.dll's from different versions of Triton for Unity.