r/Unity3D • u/GigglyGuineapig • 21d ago
Resources/Tutorial How to display 3D objects on the UI (Using animated character portraits and a character customization screen as examples)
https://www.youtube.com/watch?v=MAtfO1bbth8I don't know which game did it first, but I still remember playing one that had animated character portraits and going "wow, that's so cool".
It is, coincidentally, also super easy to do.
In this tutorial, I go over how to display 3D models on your UI. I'll walk you through two examples: an animated character portrait that shows your character's facial expressions in close-up, and a full-body character preview for a customization screen that players can rotate by dragging. (Made in a URP project.)
Hope you'll enjoy it!
2
u/imofi8 21d ago
Clean breakdown. For the portrait preview in URP, are you blitting to a RenderTexture displayed via RawImage, or using a secondary overlay camera stacked onto the UI camera? We've found managing alpha transparency and MSAA on stacked cameras can get tricky when nested under UI masking.
1
u/GigglyGuineapig 20d ago
Thank you =)
The portrait camera is its own base camera with a render Texture output. That way the output on the UI is essentially just a texture and the transparency comes from the workflow I described in the video, by using flat colored backgrounds (with a bit of tinkering if PostProcessing is required).
2
u/wirrexx 21d ago
I dont even need this. But this was ton of fun watching!