Rendering 3D as 2D in Unity 6.3 Beta

Game developers want to incorporate 3D elements in their 2D games. We want to make sure you can do this using standard 2D tools and workflows.

As of Unity 6.3, the 2D Renderer supports rendering Mesh Renderer and Skinned Mesh Renderer components using 2D URP workflows. This makes it possible to combine 3D meshes and sprites within the same 2D scene.

These renderers can receive lighting from 2D Lights, interact with Sprite Masks, and be sorted with sprites.

Key considerations:

For Mesh Renderer or Skinned Mesh Renderer to be compatible with 2D URP features, they must utilize a compatible material. This can be achieved either by using the Mesh2D-Lit-Default shader or by creating a custom shader in Shader Graph, using the Sprite Lit, Sprite Unlit, or Sprite Custom Lit master nodes.

To ensure proper functionality with 2D features like lighting and masking, as well as correct sorting with sprites, enable the “Sort 3D As 2D compatible” option in the Graph Inspector when creating a shader for a Mesh Renderer or Skinned Mesh Renderer.

Sorting by Sorting Layer and Order in Layer is available when you enable Sort 3D As 2D on a Sorting Group.

In this workflow, all meshes in the group are first rendered together, then sorted with sprites according to their layer and order values. This is useful for characters with swappable parts or other types of assets that need to render as a single unit.

Known limitations:

  • Enabling Sort 3D as 2D clears the object’s depth, which means it cannot be used with depth-based post-processing effects.

  • Doesn’t work with 3D lighting, since it uses 2D materials.

Try it out!

Try out rendering 3D as 2D in Unity 6.3 Beta and let us know what you think. We want to know what works as expected, what doesn’t and what’s missing.

22 Likes

3D Material Converter

We’ve also provided 3D asset converter, enabling the conversion of 3D materials to 2D-compatible materials for streamlined integration into 2D games. To use it:

  1. From the main menu, go to Rendering > Render Pipeline Converter

  2. From the dropdown, choose 2D Converters > Convert 3D Materials for 2D URP

1 Like

A quick sample scene demonstrating this already setup would been nice

3 Likes

Is there potentially plans to bring this sort of thing to UGUI + UITK? We almost always run into this one in our projects!

2 Likes

There is a plan to make UI Toolkit be editable in the scene instead of on its own window if I’m not mistaken, do I understand your question?.

Could this be used to easly render 3d objects in UGUI?

1 Like

I think you can already show 3D objects in UI Toolkit by passing directly a camera or something like that, I don’t even think you need a render texture to do that anymore, but I don’t remember if it is already out or will be in 6.3.

I understand that, but was talking for UGUI.

1 Like

Source of this? I’m interested in using 3d objects inside uxml.

I’m afraid the only “easy” way is using render texture for now

1 Like

I’m searching for it

Can this work in lower version like 2022?
Or Unity 6.3 is minimum to use that?

New features don’t get back ported.

As spiney199 said; also the official support for 2022 LTS has already ended, it won’t even get bug fixes, unless you have Enterprise or Industry license.

1 Like

Got it sir…Thank you :saluting_face:

Just as useful would be treating 2D as 3D. 3D has vastly more options (I’m looking at YOU, animation), so a lot of people working in “2.5D” end up going full 3d, with a few 2d leftovers, rather than the other way around. You can always just not use 3d options, but in 2d, many options don’t exist.

4 Likes

I like this feature

13 Likes

I thought it was meant for 3D inside UI.. :face_with_diagonal_mouth:
My current use-case is trading grid UI with static models of items, I use same objects for in-game and UI as a part of gameplay, right now I have to clone these objects and destroy all excess components, rendering every frame using separate camera canvas.
If you were to make such feature - don’t force us to use 2D materials, that would make it completely useless when we use custom shaders for 3D.

This feature completely flew over my head, until I heard about it by chance from Eduardo Oriz in the CPH office just the other day. As I’m playing Super Mario Wonder these days, I can see how the 3D characters really add a lot to the expressiveness of the game. So it’s super cool that Unity is bringing in new tools to enable this workflow. Nice idea.

3 Likes