NokiMo
pucklovesgames
pucklovesgames

patreon


Sphere Billboards (FAKE Spheres on quads) - FILES

Here's a way to fake the rendering of a lit sphere on a quad. Currently all the sphere calculations are done using Maths (generating world normals and spherical depth from the quad UVs), but I'd like to do some tests to see if it might be more performant to bake the normals and depth and use a texture sample instead.

Pros:

* Perfectly round spheres at any scale.
* Have hundreds or thousands of them as particles, they're just quads.
* The triplanar mapped version of this can rotate properly, so it looks correct when it's rolling.
*That's about it!


Cons:

* They don't receive shadows properly, well they do, but shadows reveal they're just quads.
* They don't intersect with other geometry properly - though I'll work on this next by injecting their fake spherical depth into the depth pass with a Command Buffer (in deferred).
*I haven't yet figured out how to get rotation working properly on the particle version, so particle spheres are currently best left untextured (or with a reflection cubemap texture as in the gif above).

There's still a few more things to figure out - especially how to fake the intersections properly (via depth buffer manipulation) so they can act like real spheres. Which should also allow them to properly receive shadows.

PS: This would probably work well with the 3d skybox camera I made in this post:  https://www.patreon.com/posts/3d-skybox-system-27575103

PPS:  Planet textures are sourced from:  https://www.solarsystemscope.com/textures/  

Sphere Billboards (FAKE Spheres on quads) - FILES

Comments

The man is an absolute genius. Very neat and elegant idea!


Related Creators