The forum on this site is closed for new comments and posts. Continue the conversation in our Snap AR Discord server.

Multi segmentation in one lens

  • I have the same question. For example, hair and background segmentation at the same time. 

    Wonder if it's possible. 

    Comment actions Permalink
  • Same question here, been looking for a way to do this for the past week but no luck yet.

    Is it a Lens Studio limitation ?

    Comment actions Permalink
  • Hey all,

    Yes this is definitely possible. I'd recommend in this case actually not using the Segmentation template. The reason why is it's fairly complicated to make the building process for most users very easy. Segmentation itself is actually fairly easy. You create a segmentation texture in the Resources panel. Then, apply that segmentation texture to a camera's Mask Texture field. The camera's output will then be masked by the segmentation texture. 

    I created an example project here:

    https://storage.googleapis.com/snapchat-lens-assets/f1a09194-f02d-43ed-92b8-62e843179ff0/lensStudio/Forum-Helpers/multiple_segmentation_example.zip

    This project has two perspective cameras for 3D objects and two orthographic camera's for billboards. In each camera set, there is one for portrait background segmentation and one for portrait hair segmentation. If you're adding new objects to this project. Make sure to add it underneath the correct camera type and then set its Layer (with object selected, top of the Inspector panel) to either "segmentationPortrait" or "segmentationHair". 

    Hope that helps!

    Travis

    Comment actions Permalink
  • Thanks Travis!

    I used your example (an previous advice) to create a segmentation who change when we tap, until then everything works.

    Now i want add objects and change them when I tape with the diffrent segmentations. i know the process but my object are not visible.

    Do you have an advice please?

     

    Thanks!

     

    Comment actions Permalink
  • Hey Takinours, it sounds like your objects are behind your segmentation. Can you take a look at this section "Adding Additional Objects" in this guide: 

    https://lensstudio.snapchat.com/templates/face/segmentation/

    Comment actions Permalink
  • you're right that's works! thanks!

    and my segmentation textures changed also!

    Thanks! 

    Comment actions Permalink
  • Hey,

    I've tried using your example file but instead of hair I used body segmentation and it works on my laptop in previews but it doesn't work on any mobile devices. The background segmentation disappears and the entire background becomes the texture I applied for the body. Do you know any way to fix this? Could it be a issue with the file being made in an older version of lens studio

    Thanks

    Comment actions Permalink

We're here to help! We just need a little bit of information...

What system are you using?

Have you downloaded the latest version of Lens Studio?

Please download the latest version of Lens Studio. If you still run into this issue, please come back and report it!

Is this issue causing Lens Studio to crash?

What system do you run Lens Studio on?

Version

Graphics

Follow the next steps to help us solve your issue:

  • Copy and paste this text into your TerminalCommand Window
    open ~/Library/Preferences/Snap/Lens\ Studio/ %LOCALAPPDATA%\Snap\Lens Studio Copy Text
  • Press ReturnEnter to run the command. The Lens Studio folder will automatically open
  • Prepare to upload your files: zip the "Log" Folder by right-clicking and choosing "compress."
    Locate the Log.txt file right above it.

    Attach a screenshot of the issue:

Name:

Email:

What is this most relevant to?

Please enter a brief description of your issue:

Thanks for submitting this issue.

Unfortunately, it's likely due to the operating system or hardware you're using – since they don't meet the system requirements for Lens Studio.

Still, we hear you loud and clear, and are logging the issue in case there's ever a workaround we can provide!

Minimum Requirements

Operating System: Windows 10 (64 bit); MacOS 10.11+

Hardware: Minimum of Intel Core i3 2.5Ghz or AMD Phenom II 2.6Ghz with 4 GB RAM; Intel HD Graphics 4000 / Nvidia GeForce 710 / AMD Radeon HD 6450 or better; screen resolution of 1280x768 or higher

We'll try to resolve this issue as soon as possible. Thanks for letting us know about it!

Keep an eye out for a followup email from us. We may have a couple more questions for you, or we might already have a solution to offer.

Happy creating!