dylan-thinnes / solsys

Solsys at https://solsys.xyz is a prime factorizing solar system generator.
6 stars 0 forks source link

Sprites or plane meshes? #11

Closed aaronshappell closed 7 years ago

aaronshappell commented 7 years ago

So sprites are unaffected by lighting so it doesn't look that great if they are at different distances. You can see depth by their scale but there is no depth of field of change of lighting. We could possibly change a given sprites opacity or darkness based on the distance from the camera. Another option is using plane geometries with a lambert material so they are affected by lighting and just change their rotation to face the camera to create the same effect of a threejs sprite which is just a plane that always faces the camera. I'll start experimenting with both maybe and see which works better.

aaronshappell commented 7 years ago

Since I figured out how to properly show the depth with sprites and had problems with plane rotation we should probably go with using sprites over planes (more optimized?) using scene fog. It is also much easier to set up and extra rotation adjustments do not need to be calculated or the need for lights as with plane meshes. We can set the near and far of the fog based on how large a given solar system is to give the best performance and similar results for different sizes.