Sundog Blog

Posted by Frank Kane on 30th September 2015

SkyMaxx Pro 3 is coming.

X-Plane users are in for a treat – our SkyMaxx Pro add-on is about to get a major update, with version 3 currently in release candidate status.

I could blather about all the new features and improvements, but this video says it all:

SkyMaxx Pro is an integration of our SilverLining clouds into the X-Plane flight simulator. For more details and to join the discussion, check out the official SkyMaxx Pro 3 announcement on SkyMaxx Pro is already the most popular add-on for X-Plane. With new stratiform clouds, extended draw distances, and lots of extra polish – it’s about to get even better!

Posted by Frank Kane on 28th September 2015

Check out our new SilverLining promo video

Behold! Our latest promo for the SilverLining Sky, 3D Cloud, and Weather SDK:

It showcases the new stratiform cloud effects in SilverLining 4, along with the cumulus clouds that we’ve always been known for. We’ll be showing this video at the upcoming membership night here in Orlando for the National Center for Simulation. Sundog Software is both a member and sponsor of NCS.

Thanks to Dave Robertson for the production of this video.

Posted by Frank Kane on 14th September 2015

A Logarithmic Depth Buffer Example.

FA-22A_1We’ve gotten a lot of attention from our earlier post on using logarithmic depth buffers with Triton and SilverLining. Although it’s not a panacea, logarithmic depth buffers can help a lot with z-fighting in scenes that have very high depth value ranges. SilverLining and Triton both have extensible shader frameworks that allow you to intercept their final clip-space coordinates, and adjust them in a way that’s consistent with the rest of your scene – and that’s all that logarithmic depth buffers require, really. It’s just an adjustment to the final Z clip space coordinates.

However, the mechanics on how to do this isn’t always clear – especially if you’re using an engine like OpenSceneGraph, where the OpenGL calls required to set shader uniforms in SilverLining and Triton aren’t readily available.

So, Triton version 3.38 now includes an example to go by for OpenSceneGraph users – and it’s probably useful to everyone else, as well. You’ll find that the osgDynamicHeightMapSample has a new option at the top of TritonDrawable.h:


Uncomment that and rebuild, if you want to see a log depth buffer in action. It’s not quite that simple, however – you also need to add the required logic into Triton’s user-vert-functions.glsl file inside its Resources folder. Just find the overridePosition function in there, and replace it with this:

vec4 overridePosition(in vec4 position)
if ( FCoef > 0.0 )
vec4 adjustedClipPosition = position;
adjustedClipPosition.z = (log2(max(1e-6, position.w+1.0))*FCoef - 1.0) * position.w;
return adjustedClipPosition;

return position;

At the top of user-vert-functions.glsl, you’ll also need to declare the FCoef uniform:

uniform float FCoef = 0;

And, that’s it. If you search the sample’s code for USE_LOG_DEPTH_BUFFER, you’ll see all of the relevant code changes to get an OSG application using a log depth buffer with Triton. Its own shaders for the terrain are modified in the same way, and a pre-draw callback on the camera keeps the FCoef value updated. Within TritonDrawable.cxx, you’ll see how Triton’s shader programs are obtained, and the same uniform value set on them.

SilverLining integration would work the same way, but you’ll find its overridePosition function in the Shaders/Resources/UserFunctions.glsl file instead.

Posted by Frank Kane on 10th September 2015

Triton Oceans for Unity Updated

Triton Oceans for UnityWe’ve released an update to our Triton Oceans for Unity asset, which brings Triton’s fast, simulation-quality 3D ocean effects to the Unity game engine.

This maintenance release fixes several issues introduced by recent updates to Unity:

  • Triton’s field of view on the Oculus Rift is again correct in our demo scene, following a change introduced in Unity 5.1.3 that no longer set it properly automatically. Please refer to the Start() method of our DemoControls.cs script for an example of setting the proper FOV, if you’re affected by the same issue.
  • We’ve removed the environment map reflection option in favor of the planar reflection map option, due to issues with retrieving the native texture handle to a cube map within Unity.
  • Ship wake waves are now more pronounced.
  • A simulation of “tiny bubbles” in turbulent areas of the water is added, to produce more realistic water shading.
  • A potential crash at shutdown on ATI/AMD cards has been worked around.

This release should once again maintain Triton’s stability and visual quality within the Unity engine. Triton is a full-featured water engine for Unity, including buoyancy, impacts, ship wakes, rotor wash, volumetric decal textures, reflections, and much more.

Triton is compatible with Unity 4.6 Pro, or Unity 5.x releases. Free trials and demos are available, and Triton for Unity may be purchased from our online store.

Posted by Frank Kane on 8th September 2015

Which Way Does the Moon Face?

The moon's orientation is now simulated in SilverLining.Sometimes, it’s the little things.

The SilverLining Sky, 3D Cloud, and Weather SDK has always featured a robust “ephemeris model,” accurately representing the location of the sun and moon, the phase of the moon, the positions of the stars and visible planets, and even their colors. You can even turn back the simulated time thousands of years, and see how constellations looked different due to the actual motion of the stars over time.

But there’s always been one thing we didn’t get right, until now: the orientation of the moon. While the phase of the moon has always been correct, it’s always been pointing straight up and down, which isn’t realistic.

There are fancy equations you can get to figure out the “position angle of the moon’s bright limb”, but there’s a simpler way to properly orient it, when you think about what’s going on.

Although the sun may be below the horizon, the bright side of the moon always faces the sun. SilverLining knows where the sun is on its sky dome, and it knows where the moon is. Drawing the moon’s billboard with the proper orientation isn’t much more complicated than how it worked before, it turns out. Instead of orienting the moon such that its local “up” direction points toward the zenith, we just find the vector from the sun to the moon, which serves as its local X axis. Its Z axis is defined by the vector from the moon to the center of the sky sphere, and taking the cross product gives us the Y axis used to align the moon billboard. One final cross product gives us a corrected X axis, and with that, we have everything needed to construct the moon’s billboard matrix.

Version 4.024 of SilverLining includes this change, and with it, we can finally say that everything in our simulated sky is accurate. This isn’t just important to astronomy nerds like me, it has real applications for training navigation by the stars, and for educational applications.

Clear skies!

Posted by Frank Kane on 4th September 2015

Tiny Bubbles… In the Ocean

Triton's latest water shader simulates tiny bubbles in turbulent areas.We’re always on the lookout for ways to make the Triton Ocean SDK‘s water look even more realistic. Version 3.38 introduces one more little bit of polish: the effect of bubbles in turbulent areas of the waves.

As part of Triton’s simulation of foam, it computes in real time which parts of the water have the most energy concentrated into them. On the water surface, this can result in foam – but underneath the foam, the water’s churning and creating small air bubbles as well. These bubbles result in the color of the water lightening a bit.

Since Triton already computes the energy in the water, it was easy to add this little touch in – and its performance cost isn’t even measurable.

It’s just another little detail that adds up to Triton’s realism, such as our simulations of double refraction, foam, spray, Fresnel effects, and reflections. It’s not something you’re likely to notice, but it helps you and your end users accept our water as being “real.”

Posted by Frank Kane on 21st August 2015

Sundog Software is a 2015 “Top Simulation and Training Company”

2015_Ribbon_Logos_WHITEMilitary Training Technology has again selected Sundog Software as a “Top Simulation and Training Company” for 2015!

This award recognizes our continued role behind the scenes of hundreds of real training simulators worldwide. The sky and ocean makes up most of the scene in many applications, and if you look closely – you might recognize SilverLining or Triton as powering them under the hood! Our customers include the biggest names in the industry, both government and commercial.

We look forward to driving continued innovation in the simulation and training community in 2016 and beyond.

Posted by Frank Kane on 13th August 2015

SilverLining and Triton are OpenSceneGraph 3.4.0-ready

SilverLining and Triton with OSG in VR-VantageThe stable release of OpenSceneGraph 3.4.0 is now available, and we’re happy to report that the OSG samples included with SilverLining and Triton continue to work well with it.

If you’re planning to update your application to OSG 3.4.0, no modifications related to SilverLining or Triton should be required.

If you do run into any OSG 3.4.0 related issues, please let us know!

Posted by Frank Kane on 4th August 2015

Check out our new Triton Ocean video

We put together an updated demo video of our Triton Ocean SDK – check it out!

This video was made with Triton 3.26, captured live from within VT MÄK‘s VR-Vantage stealth viewer, which is built on top of OpenSceneGraph. There’s no video editing trickery here at all – it’s all footage captured via FRAPS running on nothing more than a single NVidia GTX970 card in a desktop PC. It showcases many of Triton’s unique abilities in real-time ocean simulation, including its advanced ship wake system, spray effects, rotor wash, Beaufort and swell state simulation, and environmental and object reflections. The ships in this video are powered by VT MÄK’s own buoyancy system, using Triton for fast height queries on the ocean surface.

Thanks to our friends at VT MÄK for making this video possible. If you’re new to Triton – go learn more and download a free evaluation SDK.

Posted by Frank Kane on 29th July 2015

Now Supporting Visual Studio 2015 and Visual Studio 2013 Update 5

Visual Studio 2015Both the SilverLining Sky, 3D Cloud and Weather SDK and the Triton Ocean SDK have been updated with support for Microsoft’s Visual Studio 2015, and support for the newly released Update 5 for Visual Studio 2013.

This is especially important for customers using Visual Studio 2013. Update 5, which was issued by Microsoft on July 20, will break applications linking against earlier pre-built SilverLining and Triton libraries. Changes were made to STL that require our libraries to be recompiled. So, if updating to the latest versions of SilverLining or Triton with Visual Studio 2013 – be sure to have Update 5 installed. And if you’re wondering why Update 5 caused SilverLining or Triton to start crashing, just go download our updates.

On a more positive note, our new support for Visual Studio 2015 lets you move forward on Microsoft’s latest offering. You’ll find new libraries and resources for Visual Studio 2015 under the vc14 folders in our SDK’s. I’ve only been using it for a few days now, but it’s got a lot of nice new features. I really like the new built-in resource monitor that runs automatically while debugging, and it includes some neat features for cross-compilation on mobile devices.

You can get the latest evaluation SDK’s or get your licensed copies from the licensed user download portal.