Dear Users,

Now, we are seeking users who can give us a hand with expertise to evolve our software more dynamically.
If you are willing to help us, we’d like you to make a registration for “Live2D Creators Circle” via the link below.
Designers, programmers, translators are especially welcomed so far.
(More detailed explanation will be given to you before we ask you to do tasks)

https://docs.google.com/forms/d/1G5KK_GL3ozwPXtTHrpi_ktbsI8UZf8jlYRSlDworyBo/viewform?usp=send_form

Unity and Live2D Drawing Order

Hello! I currently have multiple Canvas objects in my scene, and I only need one of them to be drawn in front of the Live2D models. However, in order for my to fix a few scaling issues I needed to swap the canvas layers to 'Screenspace - Camera' instead of 'Screenspace - Overlay'.

When drawn in Overlay mode, the top-most canvas correctly renders above the Live2D characters, but in Camera mode, I've been unable to get the Live2D characters behind this canvas.

I've attempted the following:
-Moving the canvases into different Sorting Layers, no effect.
-Creating a Canvas component on the Live2D objects and or parent and setting it to Camera screenspace, breaks the rendering of the characters entirely until I undo the component creation.
-Created a second Camera object that only draws the top-most canvas and has a higher order than the Main Camera, the Live2D model still draws on top of this camera.

I don't see any exposed functions or variables in the Live2D Unity SDK that could remedy this issue, so I have no idea what to do. :(

This is currently how it looks even though the selected camera "UICamera" only has the "cUI" layer selected under Culling Mask, and the Live2D objects are under "UI"
image
Image is scaled, you can click on it to see the full size.

Comments

  • Sorry, but it says that "That puush could not be found." when I click on the picture.

    Please reupload your image, @Blizzie !

    Alternatively, you can upload them to the forum if you click on the black paper icon which is to the right of the chain (link) icon, and to the left of the text positioning settings.
  • Unfortunately the missing image is my fault. I recently went through my uploaded images and deleted a vast majority of ones I didn't need anymore. Unfortunately, I never found a resolution to get the correct rendering order for the Camera screenspace functionality, though I was able to implement changes where I was able to get the Overlay screenspace to be correctly scaled as I needed during the Game preview. :smile:

    image

    Thanks for your response though. :smile:
  • As you say, the current SDK doesn't expose any functionality for this... Most projects deal with the situation by preparing a second camera that only renders the Live2D stuff.
    The next major release of the SDK, however, will rely on Unity's MeshRenderer for rendering so you will be able to use sorting layers and sorting orders which will allow you to have Live2D models play nice with UI elements.
  • @andi.g@live2d that sounds reaaaally good! I would love the MeshRenderer functionality! However, would this be for Cubism 3 or Cubism 2?
Sign In or Register to comment.