Layers for Paper2D

I’ve been enjoying the framework for Paper2D and a big fan of the socket system in place. But I would like to ask if there is going to be a system where the sockets will act like layers as opposed to having the computer simultaneously render two images in the same position? I’m trying to do a custom character creation tool on paper2D and the issue has been that the base layer sometimes overlaps the socket image and it creates a weird image, especially when I have the sprite flipped. I tried to do a workaround by having two sockets take up a space at Y=0.1 and Y=-0.1 but apparently you can’t spawn the same sprite twice.

If you use a translucent material on your sprites you can use Z order rendering to give priority and create the layer effect you’re looking for. Lmk if you need more info on this :slight_smile:

Where do I find this option? This will solve quite a lot of my problems, thanks!

Hello,

There are two ways. Depth based and Z order based.
Both can be found under Project settings>Rendering.

If you opt for the second one just type “sort” in the details panel and add a number.

0 is the furthest back and by adding 1 you come closer to the foreground.

Cheers!

1 Like

It’s still a problem here, guys.

[video]- YouTube

the rendering translucency is jerky. On some parts it looks okay, on some parts the forehead eats through the hair. And this is despite already setting the project settings to projected Z and also editing the Translucency Sort Priority. Maybe it’s the sockets itself that needs to be fixed?

Make sure that that material attached to the sprite is translucent material just in case. Other than that, I’m not sure. I’d have to study all the settings in the project. Btw your game looks funny in a good way, good job on what you’re doing :smiley:

Thank you!

BTW I actually found a sort of workaround for this - I fiddled with the camera angle so that it’s at -5 degrees on the Y-axis, and also changed the filter for the sprites to nearest. That somehow fixed the problem! (It works only when I simulate the game - the selected viewport still gives the same problem but looks different)

Yeah what you’re experiencing there is called Render Priority. The camera will render what it deems should be first. It seems like the z order rendering is not working for you as it should be. The filter for your textures (Nearest, Bi-Tri Linear stuff) is more for anti aliasing. I’m wondering if maybe the socket stuff is what’s causing this to happen, I’m not sure if the socket changes anything for the character. try setting up a character without a socket, and manually just place sprites where they should go and see if you get the same results? unless you’ve already done that haha.

Yeah, without sockets there’s no problem at all. So perhaps the Z-order thing for sockets is something the staff would have to look into.