Log #8:this log was skipped because honestly i didnt do much in the last day of 2K18. most of the 31 went up trying to figure up how to make the stars to glow in the scene, tried point lights and the shader from a tutorial but the implementations weren't working as intended so i scrapped it and just wrapped it for the day. i did however, advanced in reorganizing and distributing the generation methods, nowadays most of them just require instancing a new object in the universe script then use it to call the generation method with the naming convention added as parameter.
as for the first day of 2K19. i finally found a way to make the objects glow, the implementation im gonna do for the Galactic Mode/Map is very simple actually. Stars (and hopefully the Core later on) and everything else in the scene is taken as an static object, this allows me to make use of the "Emission" mode that goes on the standard materials, this basically makes the objects produce light themselves and it only requires a few lines of code to ensure the system checks the option at runtime.
it doesnt stops there, i also managed to figure out a StarSystem class which is now the one managing the positions given by the galaxies during worldgen. basically the class defines where will each system appear, how many stars compose the system (i can count from Binary to Quintuple configurations, with proper chance percentage based on some references i found somewhere), the Planetary and Asteroid counts were moved there including the Galactic Index. so this class is the base for making most of the orbitals now.
this required a lot of rearrangement of the current worldgen methodologies and i had to make a new method for star generation but the results are quite interesting, here's a preview of an elliptical galaxy generated with the new scripts:
it looks similar to past generations but if you look closely you can see each star system now has its own hierarchy inside. the total count of stars is also shown at the end of the algorithm to give an idea of how many stars are generated. speaking of stars, here's a preview of a Quadruple system
i think the most interesting part is that the algorithm already spaces out each star form the supposed center of the system. here's a configuration composed of 2 Ms, 1 K and i think a G-F class star. there's also another star from another system photobombing the image
Current Issues:1. there's overlapping present: on each iteration of the code there's been collisions between stars, this has been reduced by changing the distance mechanics overtime and the implementation of Star Systems as their own class was supposed to help with spacing them up but there's still some instances where 2 stars spawn right on the same place of the stellar center, so there's still some things to fix.
2. Static means cero dynamics: when you set an object as Static it means that this object wont be able to move at all and is just part of the scenery. in the long run this means that i wont be able to animate the galactic mode and it will work like a static map. this may be beneficial anyways because not all space simulators have animated maps, HOWEVER!, this doesnt mean i cannot do some camera tricks to give the impresion that the galaxy is moving.
3. its stills looks very empty: this is mostly because of the depth field, and because there's not much stars generated atm, highest amount has been a bit over 9000 and this means those cases where the galactic density goes close or right on 5000 systems. perhaps in the future i will be able to generate bigger numbers. but its not just the amount of stars, there's no Nebulae or particles added into the scene yet (its already hard to load all these systems), im just starting to look into that.
4. no Spiral Galaxies: this is mostly because i've been focused on improving the system rather than adding more, will have to check on the references to see if i can implement the required code (shouldnt be hard if ellipticals can be generated now)
What's Next:as mentioned above, Spiral Galaxies should be the way to go soon. Ellipticals and Irregular have more or less the shape they are supposed to have so i need to move on onto something else. in addition to this there's the thing related to representing the systems at runtime. we dont have any kind of interaction, seeing that this is more or less the "map" it should have some kind of way to look around, perhaps add a sort of zooming system, and selector.
that last part opens another pandora's box which is loading different scenes. the Galaxy is more or less generated and everything looks dandy. but what about planets? if the current scene consists on selecting a system then i have to find a way to implement one that shows the current solar system, planets, satellites and asteroids included. this is a new feat of strength i have to deal with. and it gets bigger because:
1. i dont have a player in the scene yet
2. i dont know how to save data as in saving files, using seeds, etc...
im gonna see what comes up as 2K19 goes on.