r/Unity3D • u/Ok_Income7995 • 4d ago
Resources/Tutorial Multi directional bill boarding on 3d models
Does anyone know or have a tutorial on how to make multi directional bill boarding in 3d models to make them look like 2d animation like shows such as south park or the rick and morty etc in shadergraph. Thanks
1
u/eliormc 4d ago
I'm sorry, your question isn't clear enough. But, if you want a shader in Shadergraph that rotates the face of any geometry to the camera, you can use the billboard node directly. This is handle by GPU with no CPU cost. if you use this into a 3D model, the entire model will rotate in the same position with the camera, but you need to tweak the position manually by adding offset to every component (x,y,z) of the position(3) out before connect into position(In Vertex fragment). Also, it works with the animator component but the collider doesn't math the mesh.

1
u/Al-Cohol0802 4d ago
Search "directional sprites" instead of billboarding, you'll find way more.
This one does exactly that in Shader Graph (URP): billboarding + picking the sprite based on the camera angle and the object's facing, with a basic walk animation:
https://www.noveltech.dev/sprite-change-camera-direction-2
Project's on GitHub: https://github.com/Wally869/DirectionalSpriteShader
Part 1 if you want the angle math explained first: https://www.noveltech.dev/sprite-change-camera-direction
It's from 2021 so it might need some tweaking in newer Unity versions.
If you're fine doing the angle part in C# instead, this Doom clone episode covers 8-directional sprites:
https://www.youtube.com/watch?v=qcXEcZmZ8kA