Billboard sprites (Sprites in a 3D camera)
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
A lot of PS1-era games had a mix of 3D scenes and sprite graphics (pixel art or similar) -- a classic was Final Fantasy Tactics but there are plenty of others. You can have simple 3D models (which are basically just huge voxels with pixel art textures) then your more high-res entities, like people, are animated sprites which exist in the world.
This gives you some advantages of a 3D graphics layout -- basic camera control, rotations, natural scaling, etc. -- without having to actually make complex 3D models for your characters, and while retaining that art style.
## What solution would you like?
A billboard sprite bundle; so it's visible at the "normal" location like another 3D object, but it's just a mesh (?) that has one face, and it always faces the camera.
Or maybe it makes sense to somehow just have "billboard" be a component on an entity, so every frame it just resets to face the camera, and some other method could display how to make pixel art work in 3D (there is no obvious way to use a SpriteBundle in a 3D camera that I could make work).
## What alternative(s) have you considered?
It's probably possible to implement this manually -- every frame, after update but before rendering, to find all the billboards and the relevant camera, and rotate their faces to meet the camera perfectly. But that seems hard, for a game developer who doesn't really understand 3D graphics and coordinate transforms (me). Seems like something that could be built into bevy, or set up as a plugin (?).
## Additional context
A sample screenshot of FFT which I found on the internet and is probably not kosher to truly repost here, but which shows the value of the approach: https://www.cavesofnarshe.com/fft/screenshots/images/1-38.jpg
This is supported in monogame (the successor of XNA): https://liam256.github.io/blog.io/2017/01/05/Monogame-Billboarding/
Contributor guide
Assessment
This issue has not been assessed yet.