Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    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. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Pink water? That's a new one. I've never seen or even heard of that before, and I've tested on Unity 5 f4.

    I think your project is hosed. Try completely deleting Triton, and re-import it using the latest trial version on our website or from the asset store.
     
  2. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    So reinstalled that got rid of the pink, but now I get the following error.

    Failed to load 'Assets/Plugins/x86_64/TritonDLL.dll' with error 'The specified module could not be found.
    ', GetDllDirectory returned ''. If GetDllDirectory returned non empty path, check that you're using SetDirectoryDll correctly.

    The dll is there.

    Strange thing is it mostly works, but I'm seeing some oddities with coastal effects where in shallow water the water surface goes white. Didn't do that before. Whether it's related to the dll loading issue no idea.
     
  3. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    As mentioned above, Unity 5 reports all sorts of scary errors with Triton, but they are safe to ignore. Unity 5 gets confused by the presence of our own native DLL's used by Triton instead of by Unity directly.

    This doesn't have anything to do with coastal effects, however. You probably just have to adjust the underwater visibility until it looks good (and make sure you have terrain underneath the water near the shore.)
     
  4. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    confirm. same errors. about 70 count. working in editor, but if i try to make a build, water not going there. build missing water at all.
     
  5. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Did you follow the instructions in our documentation for making a build / deployment with Triton?

    http://sundog-soft.com/sds/2014/07/triton-oceans-unity-pro-documentation/

    See the "distributing your application with Triton" section.

    Again, the errors upon importing Triton are safe to ignore. We're trying to find a way to suppress them, but for now it's just a quirk of Unity 5 that we're still dealing with.
     
  6. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    432
    folder TritonResources not going to build. i copy it in build myself and its work. thanks for advice.
     
  7. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Hello,

    Great plugin you have here!

    I am wondering if there is a way to directly modify the color tone of the water? I am trying to get a brighter blue cartoon-y feel.

    Thanks!
     
  8. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Yes, this can be done from a script. For example:

    TritonUnity triton = (TritonUnity)(GameObject.FindObjectOfType(typeof(TritonUnity)));
    triton.GetOcean().SetRefractionColor(new Triton.Vector3(1,0,0));

    .. will make the water red.
     
  9. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    So I'm definitely seeing different behavior in unity 5 with coastal effects. far shorelines turn white, attached is 3 views of what it looks like.
     

    Attached Files:

  10. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    We're working on it - seems to be something new with Unity 5's final release. Stay tuned for an update, hopefully soon.
     
    Last edited: Mar 13, 2015
  11. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Rendering is forward, color gamma. Attached is triton and main camera settings.

    Ya reflections don't look right because for some reason they are reflecting stuff that's out of the far clip range of the camera. The shadow on the water to the left is an example.
     

    Attached Files:

  12. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Triton copies the far clip range from the main camera you've set in the Triton prefab, so make sure that's set to the right camera. You could also modify our scripts to hard code a far clip distance on the reflection camera, worst case.

    I'm told by our developers that they have noticed some of these anomalies in the final version of Unity 5 and are actively working on it. Not something I've seen in my own test scenes however. Stay tuned.
     
  13. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    So just found a temp work around for this. Since this effect only seems to kick in at relatively longer distances, I just set the height map area to a lower value (100).
     
  14. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Yes, it does seem like everything works fine unless you push out the height map area too far, or if your underwater terrain has discontinuities in it.

    What was your height map area set to before? It would be informative to see your Triton prefab settings.
     
  15. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    It was 500. Triton settings are attached in previous post, that's the only one I changed.
     
  16. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Your below water visibility is a little lower than usual, but otherwise nothing looks fishy in your settings. We're not seeing what you're seeing after all it seems.

    If you have time, please package up a project that illustrates the problem and send a link to it to support@sundog-soft.com so we can investigate further.
     
  17. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Hey,

    So the script to change the water colour does work to change the colour in some capacity, so thank you, however it is reacting kind of funny. If I put in RGB values of, say, (75,255,255) which should be a teal colour, the water is completely white. In fact it goes quite white if I do any combination of all 3 colours.

    Any ideas?

    Thanks.
     
    Last edited: Mar 13, 2015
  18. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    The rgb values range from 0-1, not 0-255.
     
  19. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Ah. So would the equivalent of 75 red be 75/256 = 0.29?

    EDIT: Seems like it. Thanks again!
     
    Last edited: Mar 14, 2015
  20. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Hello again,

    Is there a way to make the waves very large vertically?

    Thanks!
     
  21. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    The wave heights are a function of the wind speed you specify and are carefully tuned to be as realistic as possible. However, if you want to make them bigger overall, you can crack open the TritonResources/Triton.config file in a text editor, and look for this setting:

    fft-phillips-constant-jonswap = 0.000076

    If you increase this value, it will result in larger waves. Increase it with care however, as going too large or too small can introduce numerical stability issues.
     
  22. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Thanks again.
     
  23. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    FYI a new update to Triton for Unity is now available - if you're already a customer, you can pick it up through the asset store. If not, the free trial asset on our website is also updated for you to evaluate before making a purchase decision.

    If you're developing with the Oculus Rift, this update is a must - it fixes a rather nasty bug that had been lurking in earlier versions of our Oculus integration, and also updates our asset to use the latest 0.4.4 version of the Oculus SDK.

    It also contains some new fixes and enhancements for Unity 5 users. If you missed the news earlier - although Triton required Unity 4 Pro edition, it works fine with the free edition of Unity 5! You will see a bunch of error messages upon importing Triton into Unity 5, but these are safe to ignore - Unity just can't make sense of Triton's own internal native DLL's.
     
  24. insiderrr

    insiderrr

    Joined:
    Feb 24, 2014
    Posts:
    50
    I am working with the triton ocean asset in combination with the oculus DK2. When i work with the sample scene, everything works fantastic, when i integrate this in my project, and make a build, the ocean disappears. when i make a new scene in my project and make a simple setup, it happens again. I'm sure that i checked everything, but maybe i'm doing something wrong.

    I used the 4.4 version of the oculus rig, this was already active in my project. In editor mode the scene works good, so the ocean is visible. something is going wrong when i make the build



     
    Last edited: Apr 1, 2015
  25. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Hi,

    Did you build your project using the "Triton Editor Tools" menu that our SDK installed? It's very important to follow the instructions in the included documentation for building and distributing your application; otherwise, your application won't be able to load Triton's native components properly - which would result in no water being shown.

    If you did follow those procedures, please send the log file from your standalone application to support@sundog-soft.com so we can take a look.
     
  26. reaper7

    reaper7

    Joined:
    Aug 24, 2012
    Posts:
    25
    Is it possible to extend the draw distance of waves in the scenes. It looks like waves are only rendered so far then water looks smooth.
    Would look better if there was more disturbance in the distance and even white crests etc.
     
  27. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Yes, but it involves going under the hood a little bit. If you go into the TritonResources folder, you'll find a Triton.config file. Open that up in a text editor, and look for this setting:

    fft-displacement-damping-distance = 512.0

    That's the distance at which we start flattening the waves. We do that to prevent motion aliasing when you're close to the water surface, but you're free to increase that distance as much as you want.

    Also relevant is the fft-noise-distance setting. This is the distance at which we blend out wave details in favor of broader Perlin noise, and also where we start blending out foam, spray, etc. Again that setting is there for a reason - to hide tiling artifacts - but you can increase it if you wish.

    Hope this helps.
     
    reaper7 likes this.
  28. insiderrr

    insiderrr

    Joined:
    Feb 24, 2014
    Posts:
    50
    Thanx for the quick replay, it helped me on some points, but i still have no ocean.

    I missed the Triton editor tools, when i make a build with this tools, it only builds the demo scene with the lighthouse. i looked for a scene adding option, i thought that was the problem, but i could not find that.

    Strange thing is, everything works well when i make a build from the demo scene in the unity build mode, i did not use the triton builder.

    When i open the demo scene in my unity project, it works in teh edit mode, but after making a build i only get a flat blue plane.
     
  29. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    It seems things have gotten into a bad state somehow with your project. Try the alternate build instructions in the documentation:

    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.
    If you're sure all of these documented dependencies are in the proper place in your deployment, the water should appear.

    If you're still stuck, send us your log file so we can see what's going on.
     
  30. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Just for the benefit of everyone else, insidererr's issue was the TritonResources folder not having been copied into the deployed application's folder. Copying it in manually cleared it up.
     
  31. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Hey sundog,

    When I instantiate an explosion particle effect from the War FX asset over the Triton ocean and I am looking down at the ocean (which is to say that the explosion effect is between the camera view and the ocean) I cannot see the explosion effect. However when the explosion effect is between the camera view and my ship, I do see it.

    Does this have to do with Triton? If so, do you have any ideas on how I might fix it?

    Thanks,

    Julian
     
  32. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Yes - please read the section "Triton and Transparent Effects" in the documentation. There's an online version of the documentation here.
     
  33. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Thank you, I will give this a go.

    EDIT: Works perfectly. Thanks again.
     
    Last edited: Apr 7, 2015
  34. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Alright, I have another question.

    I've noticed that the color of the Triton water gets darker when my camera goes 100 units (y direction) above the water. Do you know what might be causing this and how I can fix it?

    Less than 100 units above water:


    More than 100 units above water:


    It might be hard to tell here, but it does make a noticeable difference in-game.

    Thanks,

    Julian
     
  35. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Good eye. Turns out you're right, and the first to notice, including us.

    What's going on is that Triton uses different shaders above 100 meters. At low altitude, the water surface is drawn as a radial grid that moves with the camera (which looks best up close), but at higher altitudes, we switch to a projected grid approach that ensures you never see the edge of a mesh no matter how high your camera is.

    There were some subtle differences in the pixel shaders between these two shaders, and there shouldn't be. That's causing the difference in color.

    I've already fixed this for our next release, but for now, your best bet is to crack open the file TritonResources/Triton.config in a text editor. Look for this setting:

    # The altitude at which we switch to a planar mesh
    mesh-switch-altitude = 100

    Increase the switch altitude from 100 to a higher value that your camera is unlikely to reach. If you need to increase the size of the water mesh as a result, the mesh-size setting will let you do that.
     
  36. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Great, thank you!

    I have another question (of course). I have Planar Reflections enabled for my skybox and terrain (not unity terrain, but just a mesh that I have created). However, when my terrain object goes out of my camera clipping plane limit (4000 currently), the reflection still remains, as pictured below.



    Is there a way for me to disable the planar reflections once an object is no longer being rendered? I know that I can code a way to check distance between the main camera and all my terrain objects and change its layer if it is greater than the camera clip distance and the reverse, but I am wondering if Triton has a better, or built-in way to do this.

    Thanks,

    Julian
     
  37. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    No, the planar reflections are just rendered by another camera on the scene - but it is flipped, and uses an oblique clipping matrix in order to cull geometry that is underwater and prevent it from casting reflections. By doing so, we lose the near and far clipping planes on that camera.

    In most projects, the far clip distance of your main camera would also get applied to the water. Triton normally copies the same projection matrix from the camera you've attached to Triton as your "main camera", so the water gets drawn with the same far clip plane, and therefore nothing beyond that point gets drawn into the water. I'm guessing you've done something to have a different far clip plane for these objects vs. the water, which is reasonable because 4 km is not very far at all.

    But, having mismatched far clip planes between your main camera and the water will result in these sorts of anomalies. I don't have a good answer apart from the one you already thought of (other than increasing your far clip distance to match that of the water.) Unity doesn't support user clipping planes, so we have no choice but to use oblique clipping planes for the reflection camera.
     
  38. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Oddly, the planar reflection camera (I am assuming that that is the camera you are talking about) and my main camera do have the same clipping planes both near and far. I don't see my object past 4000 units as should be, but I still do see the reflection in the water even up until around 12000 units (a very small amount at that distance, however).

    EDIT: Unless you are talking about the TritonPrefab above-water visibility variable.
     
  39. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    I don't think I explained that very well. There are three cameras that are relevant here:

    - Your main camera, which has a far clip plane of 4km it seems.

    - The camera Triton uses internally to draw the water, which copies its far clip plane (and FOV etc.) from the camera you have attached to the Triton prefab's main camera property. If you're seeing farther visibility with the water than 4 km (and you will definitely want to, as 4km isn't far out at all,) then I think that implies something's not right with that connection.

    - The planar reflection camera, which is based on the main camera specified in the Triton prefab. This camera's far clip plane is meaningless, because it uses oblique clipping planes. But no matter how far out the reflection camera renders, it can only reflect onto the water itself, which should be clipped as above.

    Now, all that said, at the end of the day 4km is not going to be sufficient for drawing a realistic ocean unless your eyepoint is right on the water at all times. The simplest thing to do would be to extend everything out further, say to 50km, unless there is a performance cost that you can't take from doing that.

    I would also check how your camera is attached to the Triton prefab.

    If you really need separate clip planes on the water vs. your objects, then you'll need to implement a scheme like you described where objects get disabled entirely beyond a certain distance. Or, perhaps you can group them into something you can exclude via a culling mask on the reflection camera.
     
  40. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    I see, thanks for the detailed reply.

    I am not seeing farther than 4km visibility of water, just the reflection is still showing in the water of an object that is over 4km away and therefore not rendered. If I have the clip plane set to 50km the same thing happens in that when I am over 50km away from the object and it is no longer rendered by my main camera, the reflection is still visible on the water (which is only rendered up until 50km, not past). This may end up being okay as I am likely going to have to implement a scheme like I had described anyway (more on that below).

    I will end up going for a larger clip plane if I find my game can handle it. Because my game may have a large world with lots of distant terrain I had initial reservations about such a large clip plane (50km in each direction would render half the world), but it looks like I will have to implement some sort of camera culling/object disabling script anyway which should also solve that issue. Of course, there may be ways for me to handle rendering on this magnitude that I am not aware of as I haven't done it before, and if that's the case feel free to enlighten me!

    Thanks again,

    Julian
     
  41. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Most terrain engines will employ some sort of LOD scheme to allow you to render distant terrain without tanking performance. I won't pretend to be an expert on Unity's terrain engine however.

    Your reflection issue is pretty weird. I don't understand how an object can cast a reflection on the water, when there is no water underneath it! As a test, I brought in the far clip plane to just 100 meters in our demo scene. It seemed to work as expected, with the small exception of when an object was partially clipped at the far clip plane, but the entire object was reflected. But, once the object moved beyond the far clip plane, its reflection disappeared, as it was now beyond the extents of the water.

    My only theory is that your main camera is not properly hooked up to the "Game Camera" property of the Triton prefab. If that's not it and you want to explore this further, I'll have to ask if you can send us a self-contained example project illustrating the problem. I think it probably involves a complex camera setup in your project, but I'd have to look at it to know.
     
  42. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Definitely something I'll have to look into when I get there.

    It may not matter too much but for curiosity's sake I've attempted to zip up a test project showing what I mean. PM incoming.
     
  43. sundog

    sundog

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

    It came to our attention that the Asset Store was vending version 3.4.8 of Triton even after version 3.4.9 was accepted at the end of March. I don't know if it's their fault or ours, but it doesn't really matter.

    What does matter is that we have re-submitted the latest version of Triton for Unity as version 3.5.0 to clear this up. This contains some very important fixes for Oculus Rift users in particular.

    So, if you downloaded or updated Triton from the asset store sometime during April, please go do so again to ensure you've got the latest and greatest code.

    If updating, it's best to remove Triton from your project, close and restart Unity, and then re-import it. Unity's cache can sometimes mess up the update process. Also, remember all the errors Unity displays upon importing Triton are safe to ignore - Triton's internal native DLL's just confuse it.
     
  44. _alphaBeta_

    _alphaBeta_

    Joined:
    Aug 8, 2014
    Posts:
    38
    Quick questions; just getting into your product which seems like it would work perfectly for an upcoming project. The demo version I downloaded this evening is reporting as version 3.14. The asset store (which I can't use yet I believe since I didn't purchase yet) and your last post talk about 3.5.0. Are these comparable? I was under the impression that the trial assets can become fully licenses by just adding the license data once purchased. Just trying to understand the release workflow for the future.

    Are these pesky import errors supposed to happen with every run? Some commentary leading up to this point suggests they're just there during import, but I get them every run. It's a bit distracting on a new project when I'm on the lookout for legitimate issues from the rest of the project. Is this likely to be addressed, or is Unity 5 is what it is on this subject? Any pointers for suppression?

    Is there an easy way to completely remove Triton from the project outside the use of version control? Seems like a good amount of files spread out in the project.

    I see some code snippets for manipulating some parameters in scripting in this thread. Is an published API available somewhere that has all of this in one place?
     
  45. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    The version number of the trial package isn't the same as the asset version. The latest trial on our website does include the same asset as 3.5.0 on the asset store. When you purchase a license from the asset store, you get exactly the same thing that's in the trial - but our prefab will include a license code to unlock it.

    When running, Unity 5 will report errors complaining about the Assets/Plugins/x86_64/TritonDLL.dll file. Unfortunately this is a problem with how Unity 5 handles native plugins that we just have to wait for them to fix, but it is safe to ignore for now. I don't have a way to suppress them.

    To remove Triton from a project, the related files are in Assets/Triton, Assets/TritonDemoAssets, Assets/Editor/TritonEditorTools.*, Assets/Plugins/Triton*.*, Assets/Plugins/x86/TritonDLL.*, and Assets/Plugins/x86_64/TritonDLL.*. Again we are limited by Unity's file layout for native plugins here; we can't just put everything in one place.

    The various code snippets you see are edits to the C# scripts that provide an interface between Unity and Triton's native code. Triton's native API is documented at http://www.sundog-soft.com/docs/triton/annotated.html

    Hope this helps!
     
  46. _alphaBeta_

    _alphaBeta_

    Joined:
    Aug 8, 2014
    Posts:
    38
    Yes, that clears up some issues initially, thanks. You also seem to sell Unity licenses and a bundle pack from your website. Presumably I'm just buying the license key at that point, correct? Would I then be able to download and receive updates from the asset store as well, or would I need to acquire the files elsewhere with my key I bought from the website? While I'm on this subject, I see you rolled right into supporting Unity 5. Do you intent to continue to supply updates to the plugin after initial purchase as you seem to have done so far?

    Is there a bug report pending with Unity worth voting on related to this Unity 5 behavior of native plugins?

    There's also a number of warnings that are generated each time Unity recompiles scripts. Most concern variables set or initialized and never used etc. Do you see any issue with commenting these out to try and clean up the console window a bit?

    I know this whole concept of a clean console is trivial, but I'm at the point where I need to constantly make some changes and keep having to restart the scene. I've already missed a couple of warnings or run-time errors in the console window lost amongst the number of existing warnings that are regenerated each time at scene startup. I only bring it up since this is my exclusive compliant at the moment with the product. Otherwise, this still seems like a good fit and I'll continue to evaluate.
     
  47. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    If you purchase Triton for Unity through our website directly, you do receive a complete .unitypackage to import into your scene that includes a license code, just like if you got it through the asset store. You will receive a download link, and future updates will be available from that link. The asset store won't manage updates for you in this case, but it does result in more of your money going to us to fund future development. The asset store takes a pretty big cut from developers. Either way is fine by us, though - Unity needs your money too.

    I can't make promises about future updates, but I do view Unity as a growing market for us and I don't foresee us abandoning it anytime soon.

    I do believe our developers filed a bug with Unity regarding the extraneous error messages with plugin import behavior, but I don't have the details handy.

    Regarding warnings upon compiling - it looks to me as though all of the unused variable warnings are actually coming from the Oculus Rift SDK, which is included with Triton for Oculus support. You're free to clean that up on your end if you want to, but my hope is Oculus will clean that up, as it's their code.

    At some point we'll be able to stop supporting Unity 4 and clean up the other messages related to obsolete calls, but I don't see us dropping Unity 4 support any time soon.

    Hope this helps - thanks for evaluating Triton.
     
  48. _alphaBeta_

    _alphaBeta_

    Joined:
    Aug 8, 2014
    Posts:
    38
    Thanks, that clears up quite a bit. I have no intention of supporting Oculus Rift at this time. Can I safely just remove it from assets after an import of Triton? If so, do you have a list of folders that can be removed? I would think this would speed up my script import times and lighten the whole project.
     
  49. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Most of it lives in the OVR folder of the Assets. There is also an OculusPlugin.bundle in the plugins folder, and the TritonOculusDemo scene. Unity's architecture doesn't keep all of a plugin in one neat place, I'm afraid - but I think that's most of it.
     
  50. _alphaBeta_

    _alphaBeta_

    Joined:
    Aug 8, 2014
    Posts:
    38
    Thanks for the replies. I'm continuing integration and have hit some odd behavior with the wake generator. We can take this offline at any point, but I thought perhaps the original question and final resolution would be helpful to include in this thread for others.

    This is probably something strange I'm doing on my end or perhaps some configuration change I need to make. The issue I have is that the wakes themselves jitter in place as they fan out behind the object, looking very "artifacty." The screenshot below doesn't look so bad while not moving, but those patches of lighter white color stay as blobs/blocky and seem to oscillate in place and sprinkle themselves in the wash randomly. There's no smooth movement. This screenshot shows a primitive shape moving through the water for simplicity sake, but I see the same with real models.



    I'm also having some difficult understanding all the parameters for the wake setup. Usual experimentation would answer these questions, but the odd display makes judging the situation by eye difficult. What position am I passing wakeGenerator.Update relative to a ship? The center of the ship; the transom? I'm thinking that the bow offset is then the position of the bow relative to this location (whichever it is). I'm assuming further that the length and beam parameters are just changing the shape of the wake and have nothing to do with positioning, correct? Are all of these offset parameters in Unity world units, or are they assumed to be meters when they're passed to wakeGenerator.Update? You're not doing any conversions in the stock Unity script, but I don't know if it matters.

    I'm also not seeing any spray unless the speeds are increased way above realities (in my scale anyway - see questions later about scale and world units). Even then they also seem positioned randomly/incorrectly, but that will probably work out once I fully understand positioning from above. I don't see anything resembling a constant thick spray that looks like a bow spray though.

    Couple things to point out. My world units are in feet. Gravity is therefore -32.174 in y, and the "world units" parameter of the Triton water prefab is 0.3048 accordingly (what a meter represents in my world units of feet per your documentation). The wakegenerator scripts is reporting speeds around 14, which unless you're overriding to meters behind the scenes, means 14 ft/s. I doubt that since your measurement is relatively consistent with my side computation of velocity (still using your method for passing velocity to wakeGenerator.Update for now) as reported from the rigidbody directly. Models are completely under the control of physics including buoyancy and all movement.

    P.S. When I stop my model the wash itself seems to freeze in space and become a static texture. Shouldn't it dissipate?

    On the water prefab itself, it seems the wave sizes cap out at wind speeds of 25 m/s (which is ~82 ft/s in the inspector for me). Waves at this max speed seem much larger than what I would expect at ~55 mph winds. A ~200 ft long / ~25 ft beam ship spends most of its time underwater. Did I miss a unit conversion somewhere?