Can't import SegmentationController
Attempting to import SegmentationController script lso file into new project produces this error:
17:37:06 [Scripts/SegmentationController.js:87] SegmentationController, ERROR: Camera Masked is not set
17:37:06 [Scripts/SegmentationController.js:102] SegmentationController, ERROR: Background color billboard is not set
17:37:06 [Scripts/SegmentationController.js:134] SegmentationController, ERROR: Make sure the image Billboard is set
17:37:06 [Scripts/SegmentationController.js:183] SegmentationController, ERROR: Make sure the Post Effect is set
17:37:06 [Scenarium] TypeError: cannot write property 'enabled' of null
at update (Scripts/SegmentationController.js:72) preventsyield
And it doesn't work to install a background. I'm using the "import object" command in the Object panel with the segmentation.lso file created by exporting the SegmentationController script in the Segmentation template.
I'd like to install a background in my project. Can this script be imported?
After importing the script, you’ll need to select inputs for all the script properties. https://lensstudio.snapchat.com/guides/scripting/scripting-overview/
You can refer back to the original project to know what exactly everything is that you need to have in your own project.
Thanks for the reply, but it's still missing something, assuming that this can be done with "import object". I set up the Segmentation template with my background. I export "orthographic camera masked", "orthographic camera", "camera masked", and "segmentation controller" script. In a new project I import all the above and my background. All the inputs I can see in Inspector for the script are the same as in the template when I had it working with my background. Not only is my background not displayed, but when the orthographic camera masked is checked in the Objects panel I lose the preview image. Unchecked it restores the preview.
Lacking being able to import the segmentation script, is there another way of installing a custom background?
Thanks.
For the imported elements I would double check render targets and layers; I'm not sure how everything is set up in the template.
If you want to do your own background replacement, you can use the portrait background or body segmentation textures. Depending on what your scene includes there are different ways of setting that up.
https://www.youtube.com/watch?v=7ShD5Y9N3dw
https://www.youtube.com/watch?v=FzHGZmdg9bE