Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

The Art of Kinetic Void

Discussion in 'Made With Unity' started by FPires, Mar 4, 2013.

  1. FPires

    FPires

    Joined:
    Jan 5, 2012
    Posts:
    151


    Greetings! My name is Fernanda Pires, I was one of the two artists working at Kinetic Void, an Indie Sandbox Simulation Game. During the past few months I've been responsible for the creation of shaders, procedurally-generated graphics and ship textures.



    During the process of developing for Kinetic Void I learned a lot about Unity as a whole and now that my work is done I've decided to share some of the techniques and content developed for the game. I hope you enjoy some of the results achieved with the engine.

    Click on the images to open the large version.

    Ships Shaders and Textures

    The ships in Kinetic Void are divided in modules - basically, you're allowed to build your ship out of cockpits/bridges, engines and hulls along with their sub-categories, such as wings and cargopods. The models were excellently done by Kevin, with whom was a pleasure to work.



    A simple fighter built out of a cockpit, an engine, a set of wings and a hull.

    Because a player might want to use any combination of parts, their base textures are set to be somewhat homogeneous while the player is given freedom on other aspects of the ship material and color.



    The base textures are built over a combination of base textures I made with noise and other base textures that were hand-painted. Then I hand-paint details in them such as dirt, scratches, marks and what not. It varies from module to module and while the key feel of the textures should not astray too much, the details are different.

    The ships have three different shaders that allow for four different materials, in order to give the player more customization. The ship modules are then divided in 7 different parts that can have different colors, and each color is applied over the main texture after being filtered by an influence map.



    The shaders mostly deal with how the colors are applied on the texture. They can be multiplicative (as usual), additive or flat. The flat color can then be either applied over the entire texture (giving it a very plastic, toy look) or be filtered by the Texture color influence map.



    Usually the color influence map is to prevent the color from bleeding too much into the dirt. The shaders follow a similar process, they're split in Diffuse, Effects and Normal. The Effects map contains information regarding the color influence, self-illuminance elements, reflection mapping and high-frequency details.




    Both the plates and the windows are controlled by the detail map. There's a control to define the scaling of these too, so a ship module can have bigger or smaller windows depending on its size.

    Last but not least, there are different presets using the reflection map and other standard controls (specular, fresnel of the reflection etc) to give more variation to the materials.



    A material with stronger specular. The luminance maps are also not entirely flat and behave more like a color gradient to spice it up.



    In the end about 60 unique module textures were made, not counting their multiple maps. The module variations have their UVs set in such a way that they can use the same texture non-intrusively even with baked AO being used - this allowed the same texture to be used by up to 12 variations of the same module, resulting in hundreds of different ship parts. The total texture count for ships is 360, done in a span of 6 months amidst the other features in this post.

    Some more links to module textures and variations. Hope you enjoyed the final result!





    Planets



    The Planet system in Kinetic Void is fairly complex. Because the universe is generated procedurally the Planets had to be random. They had to have not only shaders that supported a wide array of variation, but also a robust system to generate all that variation in a believable way.

    I opted to generate Planets with dynamic RenderTextures combining from a wide array of base textures, corrected for spherical distortion. These number in the dozens and are fairly high-res. The Planet Generator first decides which type of Planet we'll be dealing with, randomly but weighted by distance from sun, age, temperature and size.



    The textures are, again, random, but weighted by the Planet type. So a small moon will look different from a Gas giant, etc. Above we see a desert planet.

    These textures are also influenced by the materials found in the planet. I gathered a list of all the most common materials and compounds found in the universe, on planet Earth and nearby and added some exotic, rare and invented minerals to the mix. The result is a gigantic table with thousands of manually, hand-written, eye-picked entries that define how these materials interact with the shader and the newly generated textures - not just color, but every other material attribute, so that a planet filled with sand will not interact with the sun or reflect light in the same way than an ocean planet, or a gas planet, etc.



    An iron planet with a rusty appearance with some highly reflective, platinum-based metallic pools. Note that the pools aren't self-illuminant, but because of their polished metal properties they reflect light far more stronger than the rest of the planet.

    Because these are applied to the specific parts of the textures through an effect map they're not global, so a planet may have a frozen ocean that will reflect light like ice next to a dull rock continent that reflects light more flat.

    The Planetary Shader is somewhat similar to the ship shader in its structure, but far more complex. The atmospheric properties are also random and based on some key gases.



    The atmosphere uses some color gradients. I opted not to use Rayleigh - there's a myriad of Planet shaders using Rayleigh scattering right now and I think it'd give us more artistic freedom not to use it. Plus I personally find the common depictions of it to be very exaggerated when seen from space, and went with the more cinematic, Earth-as-seen-from-NASA approach that movies do.

    The base textures are enormous but the generator is limited by system memory. It can generate an entire solar system with 2048^2 textures in a few seconds of loading time which is more than I expected. 4096 textures are possible but not optimal given they'd need full 64-bit support, but even the 2048 look good enough thanks to the detail maps. Those have been tested extensively and do not create any memory leak.

    Although it'd be even faster with compute shaders, it's non-DX11 specific so anyone can run it.


    Here's some links to more Planets!




    Other Effects:



    Some engine effects done. These are non-DX11 - Personally I'd love to work with some DX11 particle systems now that it's out.



    Stars are also generated randomly for each system. They're based on the known star types - the odds of spawning are also based on how these star types occur in the known universe. They're not templates, though, so two red giants will still be different from each other.



    They have a dynamic range effect - The closer to the star, the lower the raw "lens flare" effect as the camera adapts to the star luminosity and you see the celestial body itself. These have a DX11 Tessellated animated noise, if DX11 is available. When seen from afar their lens are based on their color too, with some random variations.

    Here's some more stars from the same differences, as well as some random planets:





    So that's it. I had a blast doing these effects. Hope you enjoyed it and thank you very much for viewing the thread.
     
    Last edited: Feb 8, 2022
  2. GeneBox

    GeneBox

    Joined:
    Nov 15, 2012
    Posts:
    480
    Wow. Just... Wow. Great job!
     
  3. FPires

    FPires

    Joined:
    Jan 5, 2012
    Posts:
    151
    Much appreciated. It was a lot of work.
     
  4. Game-Whiz

    Game-Whiz

    Joined:
    Nov 10, 2011
    Posts:
    121
    Excellent work Fernando, or, as we say around here excelente trabalho Fernando :)
     
  5. TiG

    TiG

    Joined:
    Feb 28, 2011
    Posts:
    311
    Very very nice. There are very few studios that do that kind of excellent graphics. And being mostly procedural, this work is excellent.
     
  6. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Nice job.
     
  7. SuperSlonik

    SuperSlonik

    Joined:
    Feb 14, 2013
    Posts:
    132
    oh god, those planets... space porn at it's finest! Great job!
     
  8. FPires

    FPires

    Joined:
    Jan 5, 2012
    Posts:
    151
    Thank you very much for your feedback, guys, it's much appreciated. I did put a special care on the Planet generator, yea - thought it'd be really cool to have something different.
     
  9. kasulogamestudio

    kasulogamestudio

    Joined:
    Mar 22, 2012
    Posts:
    130
    Great work
    Muito bom, parabéns pelo trabalho ;)
     
  10. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    Looks very nice. Eventually I will have to get around to making dynamic planets in my game. :)
     
  11. SimonAlkemade

    SimonAlkemade

    Joined:
    Feb 4, 2009
    Posts:
    432
    It's looking awesome!
     
  12. FPires

    FPires

    Joined:
    Jan 5, 2012
    Posts:
    151
    I found it to be a very fun endeavor and with a lot of room for creativity. Coding a procedural planet generator is a game on its own.
     
  13. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Looking incredible! Bookmarked!
     
  14. Brotherhood

    Brotherhood

    Joined:
    Dec 8, 2012
    Posts:
    73
    This looks great. Awesome job!
     
  15. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Damn! Impressive! Subscribed! :D
     
  16. Cheburek

    Cheburek

    Joined:
    Jan 30, 2012
    Posts:
    384
    that looks fantastic!
     
  17. FPires

    FPires

    Joined:
    Jan 5, 2012
    Posts:
    151
    I'll see if I can post more screenshots later this week. In the meanwhile, thanks for the support guys. It is heartwarming to see so many positive responses.
     
  18. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Beautiful work, congrats.
     
  19. yahodahan

    yahodahan

    Joined:
    Apr 26, 2009
    Posts:
    1,379
    Just found this. Truly amazing!
     
  20. silkroadgame

    silkroadgame

    Joined:
    Apr 9, 2013
    Posts:
    101
    Excellent job,and Congratulations!