Sundog Blog

Posted by Frank Kane on 7th July 2015

I Wrote a Book on Self-Employment

Self-Employment book coverI’m going to let you in on a little secret – Sundog Software’s steady revenue growth, impressive customer list, and pace of development may lead you to think it’s made up of a lot of people. It’s not – Sundog Software has always had one employee: myself. I rely on contractors and my family from time to time to help out, but Sundog Software is essentially a self-employment endeavor. It’s a pretty good gig; as long as I keep my customers happy, I get to work on my own terms.

I’d like to help others achieve what I have, and so I’ve written a book: Self-Employment: Building an Internet Business of One. It’s available on Kindle for just $2.99, or free if you subscribe to Kindle Unlimited.

In it, I describe how to transition from being a full-time corporate employee to being successfully self-employed. You don’t need to risk the livelihood of your family by making a move like this, and this book shares how I did it without betting the farm in the process. The book talks about crafting your business such that it can grow independently from your own time by focusing on product development, automation, and outsourcing. And, it talks about how to ensure your business continues to grow in the face of changing technologies, economies, and customer needs.

If you’re curious about the story of how Sundog Software came to be, and how maybe you could do something similar yourself – please give it a read! If you find it useful, I’d appreciate if you’d leave a review on Amazon.

Posted by Frank Kane on 30th June 2015

Project Spotlight: “The Golden Age VR”

Golden Age dock
Sometimes our customers send in screenshots or movies of their projects that just blow us away. “The Golden Age VR” produced for the Museum of the Golden Age in the Netherlands is one of them! They are using our Triton Oceans for Unity asset for an Oculus Rift-based simulation of cities in the Netherlands in the 17th century. Just look at this video (Triton shows up at 0:38):

Creator of the project, Rob Tuytel, says: “In January 2015 we started with a new expansion, this was called ‘ The Discovery of Cape Horn’ a story about the exploration of a new trading route. For this we had to find a solution to cover the water in Unity. We used lots of water shaders, but none of them had the effect we wanted, especially for the rift, you want something that looks believable.”

“Then we get in touch with Triton, it was the perfect solution for the project. The support for ships on the waves in combination with the Oculus Rift DK2 is something I had never seen before, it was even better than we could ever imagine.”

We’re proud to be a part of this project! Here are a few more images highlighting it; click through for larger versions.

Golden Age VR

Triton 3D Oceans for Unity

Triton 3D Oceans for Unity

Triton 3D Oceans for Unity

Golden Age dock

Golden Age city

Posted by Frank Kane on 23rd June 2015

Using an OpenGL Logarithmic Depth Buffer in SilverLining and Triton

Soft clouds in SkyMaxx Pro 3Logarithmic depth buffers seem to be gaining wider adoption with our customers lately. The idea stemmed from an article by Outerra on how they preserved depth resolution at both near and far distances. Like Outerra, many of our customers need to render something like a cockpit close to the eyepoint, while at the same time rendering distant terrain hundreds of kilometers away. Conventional depth buffers cannot handle such a wide difference between your near and far clip planes, without producing artifacts from depth buffer resolution (“z-fighting.”)

While Outerra’s original article on log depth buffers covered the basic idea, it wasn’t refined until 2013 in this update. This newer article is much more explicit about what needs to go into your vertex programs in order to change how your depth buffer values are written, and it produces good results. All you have to do is add this snippet of code, plus one uniform value, into all of your vertex programs (and maybe a few of your fragment programs, too.)
Continue Reading

Posted by Frank Kane on 19th June 2015

Accelerating Triton’s CUDA Performance

NVidia CUDAA quick tip: if you are targeting NVidia hardware with your application that uses the Triton Ocean SDK, there’s a configuration setting that may provide a good-sized performance boost. Open up the file resources/Triton.config in a text editor, and look for this line:

fft-enable-sync = yes

Try setting this to “no”, and measure the results.

Originally, we introduced a hard sync in CUDA each frame because it was needed for stability. However, we’ve found that on modern drivers and modern hardware, it no longer appears to be needed – and eliminating it can get rid of your application’s bottleneck in some cases.

If you try this out and do experience stability problems, please contact us at support@sundog-soft.com and let us know what driver and video card you’re using. We’d like to hear more from our customers on the impact of this setting before we turn it off by default.

Posted by Frank Kane on 16th June 2015

Torque 3D / Triton Ocean Integration Updated

Triton Ocean integrated with Torque 3DVersion 3.27 of the Triton Ocean SDK includes an updated integration kit for the Torque 3D game engine. We’ve ensured it builds smoothly using Triton 3.27 and the latest version of Torque (3.6.3), and we’ve updated the readme file to be more clear on the steps needed.

This allows you to use Triton’s realistic, 3D ocean effects within Torque 3D, as well as ship wakes and buoyant objects. Real maritime simulation is now possible within Torque 3D, as well as AAA-quality ocean effects. A free evaluation of Triton is available, so you can try before you buy.

You’ll need Torque, Triton, and Torque’s Project Manager application installed. Here are the steps to use the Torque 3D sample included with the Triton Ocean SDK:

Continue Reading

Posted by Frank Kane on 14th June 2015

3D Clouds for Havok Vision Engine 2014.2

HvaokWe’ve updated our Havok integration of the SilverLining 3D Cloud, Weather, and Sky SDK – now you can use our latest version, SilverLining 4, with the latest version of Havok Simulation, 2014.2.

This gives simulation developers using Havok access to the same atmospheric effects used worldwide by hundreds of the biggest training and simulation companies out there. 3D volumetric clouds, physically-accurate skies, and realistic weather effects are all wrapped by a simple engine plugin, complete with integration into vForge as an entity class. Even SilverLining 4’s new volumetric stratus clouds are accessible.

New in this version is support for Visual Studio 2012 projects, in addition to Visual Studio 2010. We’ve also crafted it to avoid any dependencies on the installation of the game version of Havok, to ensure it works seamlessly with Havok for Simuluation.

The SilverLining / Havok integration package is available as an easy-to-use installer, with sample projects and scenes included. You can get it now from our download page. Be sure to have at least an evaluation version of the SilverLining SDK installed first, as well as the Havok simulation engine.

Posted by Frank Kane on 9th June 2015

Triton now uses CUDA 6.5

NVidia CUDAAs of version 3.26, the Triton Ocean SDK is now built using NVidia’s CUDA Toolkit version 6.5 instead of 6.0. CUDA is the technology Triton uses to accelerate its wave equations on NVidia graphics cards, by spreading that computation out among the thousands of cores on your GPU.

This is important for a couple of reasons:

  1. If you’re a licensed user of Triton and are building it from source, you’ll want to install NVidia’s CUDA Toolkit 6.5 on your build system now. The main benefit is that CUDA 6.5 will let you build Triton’s CUDA DLL under Visual Studio 2013 natively, without requiring Visual Studio 2012 to be installed as well.
  2. This means your end users must have driver version 340.29 or newer installed on their NVidia-based systems, in order for Triton to perform its best.

We try to maintain a balance between keeping Triton’s dependencies current, while preserving compatibility with older compilers and architectures. As such, moving up to CUDA 7.0 probably won’t happen anytime soon, as NVidia dropped support for 32-bit applications with 7.0.

Posted by Frank Kane on 8th June 2015

Soft Clouds with SilverLining

Soft clouds in SkyMaxx Pro 3This image from the upcoming SkyMaxx Pro version 3 add-on for X-Plane illustrates how our SilverLining Sky, 3D Cloud, and Weather SDK can be extended for application-specific effects. In this case, SilverLining is using a depth buffer texture given to it for soft blending between clouds and terrain.

OpenGL developers using SilverLining have access to a powerful shader extension system, allowing effects such as these. Let’s walk through how this soft cloud blending approach was implemented as an example of extending SilverLining’s shaders.
Continue Reading

Posted by Frank Kane on 26th May 2015

Propeller backwash / turbulent wake enhancements

Per-Pixel prop wash in Triton 3.05Version 3.21 of the Triton Ocean SDK includes some new enhancements to propeller backwash (AKA “prop wash” or “turbulent wake”.) These improvements make it easier to estimate the velocity of a ship based on the length of its wake, and to estimate the sea conditions based on these wakes.

Continue Reading

Posted by Frank Kane on 21st May 2015

Fog and Haze with SilverLining

30km visibility with haze in SilverLiningThe most common question we receive about the SilverLining Sky, 3D Cloud, and Weather SDK is how to properly handle reduced visibility conditions. SilverLining offers a lot of flexibility in how fog and haze are handled, but it can be complex and confusing. Our documentation covers the topic, but I’ll try and explain from a higher level in this post.

Telling SilverLining About Visibility

First, understand that normally you tell SilverLining how to fog the sky and clouds. SilverLining is not responsible for fogging your terrain, objects, or whatever else is in your scene. It’s up to you to decide what sort of visibility you want to simulate, tell SilverLining about it, and fog the rest of your scene consistently.

SilverLining allows you to fog the sky and clouds separately. Let’s cover the different API calls that exist for handling visibility:

AtmosphericConditions::SetVisibility() – This causes clouds to fog out and fade out at the given visibility distance. It does not affect the sky itself. If you have an exponential fog density value, you can convert that to a visibility distance using the relationship visibility = 3.912 / density. Note that fog is usually thicker at the ground than up where the clouds are, so it may be appropriate to set a higher visibility value with SilverLining than what you are using for the rest of your scene.

Atmosphere::SetHaze – This exists to let you blend the sky to a solid color at the horizon. Often, this is needed for seamless blending of the sky with fog on your distant terrain. It allows you to set a fog color, density, and height – the height parameter controls how far up the sky box the fog effect reaches. It doesn’t matter what the altitude of the camera is; this is always relative to the horizon. You can use this to apply fog to the sky itself that looks volumetric in nature. You’ll still need to call AtmosphericConditions::SetVisibility() as well, in order to fog out the clouds consistently.

AtmosphericConditions::SetFog – This method applies exponential fog only to the clouds, not the sky, with a specific fog color. It may be appropriate for unusual situations like thick smoke, where you want to apply dense fog to the clouds with a particular color. You’ll still need to use SetHaze() to color the skybox itself.

Under normal circumstances, using SetVisibility() to affect the cloud visibility and SetHaze() to affect the sky colors generally produces the best results.

Fog Inside Clouds

There are some cases where SilverLining will recommend a given fog density and color to be applied to the rest of your scene. One such case is when the camera is inside of a stratus cloud.

If your camera could be inside the clouds, then each frame you’ll want to call Atmosphere::GetFogEnabled(). If it comes back as true, then you must query Atmosphere::GetFogSettings() to retrieve the fog color and density that should be applied to the rest of your scene. This will ensure consistent fogging with the cloud itself, and give you smooth effects as the camera enters and exits the cloud.

Fog Inside Precipitation

If the camera is inside rain, sleet, or snow, Atmosphere::GetFogEnabled() will also return true, and Atmosphere::GetFogSettings() will give you realistic visibility for the precipitation rate you are simulating.

Many customers prefer to manage visibility inside precipitation on their own, and find it confusing when the clouds are no longer directly visible when it’s raining. To disable this effect, open up the file Resources/SilverLining.config in a text editor, and look for the setting enable-precipitation-visibility-effects. Set this to “no”, and SilverLining will no longer indicate fog when inside precipitation.

Choosing a Fog Color

SilverLining can help to choose a realistic color to use when fogging the rest of your scene. Atmosphere::GetHorizonColor() will return the simulated color of the sky near the horizon. This is usually an appropriate color to use when fogging your terrain and other objects, and it’s also appropriate for using as a color if you’re calling Atmosphere::SetHaze().

Atmospheric scattering is a big, complex topic, and SilverLining’s model is actually rather simple. I hope this article de-mystifies handling fog and visibility in SilverLining somewhat.