Then I’ll set the layer opacity slider back to 100%. I’ll move the new sky layer up until the horizon line on that layer is just a bit below the horizon line on the underlying pier image. I want to be able to see both the new sky layer and the background image at the same time, so I’ll get the Move tool in the Tools panel, then click Opacity at the top of the Layers panel, and lower the opacity of the sunset layer. I’ll double-click on the layer name and rename it “Sunset Sky”. Now I’ll go back to my composite file and choose Edit > Paste to paste the sunset sky as a new layer. I’ll select the sunset sky image by choosing Select > Select All, then Edit > Copy. I’ll choose File > Open and choose the Sunset Sky file. For this step, I’ll use a simple copy and paste method. There are lots of ways to add a new image. I already have the main image open in Photoshop and I want to add a more colorful sky. The first step in creating a composite is to add a new image. We’ll be using layers, layer masks, Smart Objects, and blending techniques to build this composite from the ground up.
Skymaxx pro how to refer own sky series#
SL_VECTOR(GLuint) planarShaders = atm->GetActivePlanarCloudShaders() įor (it = planarShaders.begin() it != planarShaders.In this series of short videos, we’ll explore how to use Photoshop compositing techniques to create a multi-layered image of a dreamlike ocean scene. GLuint shader = atm->GetBillboardShader() Get the billboard shader ID, and set its uniforms for SilverLining provides methods to expose these shader IDs, like this: As it turns out, there are several shaders within SilverLining responsible for drawing clouds, so we need to identify all of them and keep a map of the uniform locations for each shaders, so we can set them all. Uniforms.viewportLoc = glGetUniformLocation(shader, "viewport") Ī tricky part is knowing what shader ID to use with glGetUniformLocation. Uniforms.persMatrixLoc = glGetUniformLocation(shader, "persMatrix") Uniforms.invPersMatrixLoc = glGetUniformLocation(shader, "invPersMatrix") Uniforms.softnessLoc = glGetUniformLocation(shader, "softness") pthTextureLoc = glGetUniformLocation(shader, "depthTexture") That can be done using glGetUniformLocation(), for example: These uniforms represent the viewport, perspective projection matrix for the scene, the inverse projection matrix, a “softness” value that defines the distance, in world units, over which softness is applied, and a depth texture holding a copy of the current depth buffer after terrain has been rendered.Īfter your application has initialized SilverLining, you’ll need to get handles to these uniforms so you can set them each frame. In order to figure out camera depth just given a point on the screen, we’ll need to pass some additional information into UserFunctions-frag.glsl, by adding these uniform declarations to the top: This is the same idea behind “soft particles,” so it’s a technique that’s well understood. When clouds get near the terrain, we start to fade them out.
The general idea is to use a copy of the scene’s depth buffer to determine the distance from the camera to the terrain at a given pixel, and compare that to the distance to the clouds at a given pixel. In our case, we’ll be using the overrideStratusLighting() and overrideBillboardFragment() functions in order to adjust the final transparency of solid and particle-based clouds. If you open up the file Resources/Shaders/UserFunctions-frag.glsl in a text editor, you’ll see many hooks available to you for extending how SilverLining does its rendering. Let’s walk through how this soft cloud blending approach was implemented as an example of extending SilverLining’s shaders. OpenGL developers using SilverLining have access to a powerful shader extension system, allowing effects such as these. In this case, SilverLining is using a depth buffer texture given to it for soft blending between clouds and terrain. This 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.