Hi guys.
I would like to create a viewport for my animation where anything outside of the viewport is not visible.
Something exactly like in the attached imaged.
Thanks in advance!
Hi guys.
I would like to create a viewport for my animation where anything outside of the viewport is not visible.
Something exactly like in the attached imaged.
Thanks in advance!
Are export image/video or JSON/binary?
You can use an image that is the size of the "frame" you want. If exporting image/video you can specify the world position and size for the export. If you are exporting JSON/binary then at runtime you can configure rendering to match your frame size, so things outside of the frame are rendered off screen or otherwise masked.
If you are exporting JSON/binary it is not recommended to use clipping on your entire skeleton/scene. Clipping uses a lot of CPU and should be used sparingly.
Pix What you see in the screenhot is called Clipping, more info about it here:
https://esotericsoftware.com/spine-clipping
As stated in the answers above mine, clipping the whole skeleton is not the best if you plan to use it at runtime in a game engine, however, if you just plan to use it in a video or gif, it's perfectly ok to use!
(If you're curious why here is a portion of video that explains it: )
More about clipping and performance here:
https://esotericsoftware.com/spine-clipping#Performance
As an alternative if you need the visual guidance, I also like to add a black png with a whole the size of my video area to a separate skeleton that I'm not exporting, perhaps it could help you!
If you're set on using clipping and want to know how to achieve a perfect clipping, here's a little tip:
https://esotericsoftware.com/spine-tips#57-clipping-vertex-paste
The feature used in the tip is this:
https://esotericsoftware.com/spine-tools#Copypaste
I hope this helps!