Change the Sky with Sky Segmentation!Featured
You can quickly segment a portion of your Lens so that your objects are only visible in the sky! This is a great way to make it seem like your objects are part of the scene and in the distance.
Although this technique will work on any project, for this example we’ll use the Look Around Template as our starting point.
To follow along, open Lens Studio 1.7.0+ and in the Templates list, scroll down until you find Look Around and click it.
Once the project is opened, select the camera rendering the scene in the Objects panel--in this case it’s called “Camera”. Then, in the Inspector panel, under the Camera component, select the field next to Mask Texture. In the pop-up, click Add New > Segmentation Texture > Sky.
Happy Lens making!
Adding non-segmented objects
Now let’s say you want some things to NOT be segmented. To do this, we can add another camera which does not have a Mask Texture.
In the Objects panel, press Add new > Camera.
Select the new camera, then in its Inspector panel, in the Input field, choose Textures > camera_output.
Then to have this camera’s result be the final image, in the Resources panel, click Add New > From Camera > then select your new camera. Select the new texture, and in its Inspector panel tick the box next to “Use as Output”.
You’ll notice that your objects are now rendered twice. This is because both cameras are rendering the same layer. To fix this, select your new camera, and in the Inspector panel, under the Camera component, select the dropdown next to layers, and press “Add New”; then choose the new layer and untick “Default”.
Now, to have an object appear unsegmented, we just have to change their layer to this new one! Select the object, and in the top right corner of the Inspector panel, press the dropdown next to Layers, and choose the one you just created.
Finally, since our original camera was tracking the phone’s rotation, we can parent our new camera to it so that it tracks the phone’s rotation as well!
And that’s it! Now you can have your Lens show objects that are close and are far from the user.
Can’t wait to see what you come up with!
I think this tutorial isn't updated. I can't find the INPUT field, Camera Output, Add New From Camera. What could it be done?
can you please update this tutorial for version 4.16. Some parts of the lens studio are completely changed :-)
In case you're still looking for the answer indeed this has changed a bit. Now, Cameras can have a Render Target--which is like the paper that Cameras will print their images on. This is better because now, Multiple cameras can print to the same render target. https://docs.snap.com/lens-studio/references/guides/lens-features/scene-set-up/camera#live-target-and-capture-target
The main difference is now the output is set in the Scene Config. In other words, you want to set your Capture Target (shown in the final snap) or Live Target (shown only while Snapping), with the right Render Target. In other words, which "paper" do you want to show to the user. https://docs.snap.com/lens-studio/references/guides/lens-features/scene-set-up/camera#live-target-and-capture-target.
Other than that, the steps should be the same! https://docs.snap.com/lens-studio/references/guides/lens-features/segmentation/fullscreen-segmentation/#using-the-segmentation-texture
Let me know if you're still having trouble and I can write more!