Jump to content

Search the Community

Showing results for tags 'dynamics'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Welcome Aboard
  • Kerbal Space Program 2
    • KSP2 Dev Updates
    • KSP2 Discussion
    • KSP2 Suggestions and Development Discussion
    • Challenges & Mission Ideas
    • The KSP2 Spacecraft Exchange
    • Mission Reports
    • KSP2 Prelaunch Archive
  • Kerbal Space Program 2 Gameplay & Technical Support
    • KSP2 Gameplay Questions and Tutorials
    • KSP2 Technical Support (PC, unmodded installs)
    • KSP2 Technical Support (PC, modded installs)
  • Kerbal Space Program 2 Mods
    • KSP2 Mod Discussions
    • KSP2 Mod Releases
    • KSP2 Mod Development
  • Kerbal Space Program 1
    • KSP1 The Daily Kerbal
    • KSP1 Discussion
    • KSP1 Suggestions & Development Discussion
    • KSP1 Challenges & Mission ideas
    • KSP1 The Spacecraft Exchange
    • KSP1 Mission Reports
    • KSP1 Gameplay and Technical Support
    • KSP1 Mods
    • KSP1 Expansions
  • Community
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
    • KSP Fan Works
  • International
    • International
  • KerbalEDU
    • KerbalEDU
    • KerbalEDU Website

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Twitter


About me


Location


Interests

Found 1 result

  1. Through my efforts in developing the mod Sol, I developed two different techniques for different visual needs that I believe uniquely distinguished Sol amongst other visual mod packs. Though that mod is now canceled due to still ongoing issues with the community, I do still want to see that these techniques make it into other mods, and rather than having people trying to reverse-engineer them through copies of my mod that, regardless of licensing, I still do not approve of being redistributed, I figure I may as well lay out a proper tutorial on these concepts so that people can just simply do as I did, and create their own mods. As part of this tutorial, you will want to have a photo editing software such as Photoshop or GIMP that can export to the .dds file format. I personally recommend GIMP because its free and relatively hassle free. I also recommend becoming familiar with NASA's Visible Earth website, found here, as the website is a treasure trove of not only inspiration, but extremely high quality visuals from which your work can be derived. All of the imagery of Sol was derived from the available imagery on the website, and through this tutorial you'll see how I translated the raw satellite imagery into workable textures for the game, and how the Dynamic system works. I will also acknowledge that this is a beefy post; I am a very verbose and thorough person, and through this reading I would hope it should give some idea as to how I think through things. DYNAMICS Intro: Dynamics is my term for a method of inducing EVE's innate layer functions to mimic the way in which Earthbound cloud systems form and dissipate over time. While EVE is not quite sophisticated enough to provide a true simulation, it does have the tools necessary to provide an uncanny approximation IF one puts in the effort to realize it. The How: How Dynamics works is fundamentally dependent on the nature of the detail texture. In EVE, two primary textures are responsible for the look of a cloud layer. These are listed as Main Tex, and Detail Tex. Main Tex to put it in simple terms provides the macro shape of a cloud, meaning that even if your texture is just flat Microsoft Paint drawings, it will take to the shape of what was drawn. Detail Tex is an additional texture that is overlaid on top of the Main Tex, and as its name implies, is meant to provide additional detail to the texture, and depending on the modder, most examples have used Detail Tex as a means of pushing the fidelity of the overall clouds. However, the key thing about Detail Tex is that it is sensitive to transparency, meaning that if your detail texture is transparent in any part of it, that transparent section will also translate to its application to the main texture, rendering that part of main tex transparent as well. This is the fundamental key to how dynamics works, and I discovered that this worked some years ago during development for the mod Ad Astra, and my early attempts with it are still viewable through that mod by looking to the planet Lindor and its Dark Spot, which forms and dissipates regularly over time. Originally, however, this technique for me was only meant to serve as a means of providing just specific macro level cloud systems, like the Dark Spot, or the eventual Typhoon that featured in Sol. Until I had an epiphany, I was still very much married to the idea of global Cube Maps being the key to higher quality visuals, but Cube Maps have their short comings. For one, the global coverage means that quality is hard to keep consistent across the entire texture (without painstakingly hand-painting it), and this only gets worse depending on the quality of your source and the method with which the cube map itself was generated, and for two, its very static; the clouds will always look the same no matter what, with only the underlying terrain changing. To put it short, cube maps are a pain to work with and unless you are very fortunate, or have the patience to paint it by hand, they still ultimately have shortcomings that leave one wanting. But Dynamics provides another option, and in fact, provides an option that is much better suited to the sort of game Kerbal Space Program is, where memory is of vital importance. Using Dynamics to create global cloud coverage can not only provide much higher quality and far better consistency, effectively allowing one to have texture qualities as high as one wants without any quality loss from downscaling, it also allows you to do so without an egregious impact to the memory footprint of the mod compared to what would be necessary to replicate the same visual fidelity using other methods. And as a bonus, you get the Dynamics effect itself, allowing your global coverage to never look the same twice. So, with all that explanation aside (though there's still quite a bit more), lets get into the nitty gritty. To start, we need to identify and locate a source cloud map that we are going to derive what we will be calling cloud patterns, or cpats. For this, I utilized (and prefer) the Blue Marble imagery available at Visible Earth. I took the highest resolution that was available, and in GIMP, I combined both the E and W files into one, which should provide you with something looks like this: While the large file size, 43k in this case, can be rough to work with depending on your computer's specs, do keep in mind that you only need to work with it long enough to extract a cpat. To do this, the process is quite simple. For this purpose, we are going to assume that we want to have our cpats be at 16k, which is the maximum resolution that KSP can support. To mark out a strict 16k selection, we are going to select our selection tool, and set it to Fixed with a resolution of 16384 x 8192; your settings should resemble the below: Once you have this, you can click and drag anywhere on your image, and a selection box should appear that you can then drag around. We want the image to be rectangular, as this will prevent our final cpat from being distorted. From there, all you have to do is select some part of your source map that you think looks good or interesting to have as a potential pattern. For this, I selected this section: Next, copy the selection, and create a new file in the same resolution (16384x8192), and paste in your image. Add the pasted image as a new layer, and either merge it with the extraneous background or layer, or simply delete that layer. ========================================================================================================================================================== What this process does is allow for the higher resolution image to be translated to a lower resolution image, without any real loss in quality from more traditional down-scaling methods. We do lose the additional data from the rest of the map, but this on purpose, as we do not want all of that extraneous data anyway, and because we can always just make more cpats. (for Sol, I settled on three primary cloud patterns, with a fourth intended for noctilucent cloud formations) Next, we will need to extract the clouds themselves from the black background. First, ensure that the image has been set to “RGB”, by clicking on Image > Mode > RGB. Then, click on Colors > Color to Alpha. The Color to Alpha tool will automatically render your selected color transparent. By default it will have selected White, but naturally we want to change this to black. As a first pass, we can click okay once this is completed, and now your texture should look like this: However, we are not quite finished with this step yet. Due to the nature of satellite imagery, a lot of artifacts may be present that you do not want, and this is especially true if you are extracting clouds from images that also include terrain. To sus these artifacts out, make a new layer and fill it with some color; I typically use a dull blue as it gives me some sense of what the clouds will eventually look like. ========================================================================================================================================================== Once you do this, zoom in and inspect your texture, and essentially you are looking for anything you don't quite like. While my example texture was already cleaned up, I was able to find this section in the upper right: Without the blue background, details like this may have been easy to overlook until you've already gone through the process of getting the cpat into the game. To correct this particular issue, its simply a matter of erasing the offending details. ========================================================================================================================================================== A helpful tip if you are extracting clouds from images that feature terrain or other artifacts (such as sunlight reflecting off an ocean; a common occurrence in satellite imagery), is to merge your cpat with your color layer, and then repeat the Color to Alpha process, this time picking the blue color. You may have to click around on the offending spot, and play with the Opacity and Transparency thresholds (which adjust how strict the software is in erasing the chosen color), but eventually you will find a sweet spot that largely, if not completely, erases the artifacts. Any additional artifacts you find beyond that, simply need to be erased. ========================================================================================================================================================== Now, yet again, we are not finished. Zooming back out, you'll notice that your cloud texture likely extends off the bounds the image. This naturally, will not do for our purposes, unless you're for some reason wanting to do Minecraft clouds. To correct unfortunately requires sacrifice. We will need to erase and blend the clouds in such a way that they stay within the bounds of the image, but also still look like clouds. For this purpose, I recommend locating a quality brush pack for GIMP (utilize sites such as deviantart) that specifically provide brush shapes that mimic clouds or smoke. While I cannot say what tools I have (as I acquired them long ago and their names in my system lend no clues to their origin, other than I know they came from deviantart), the important aspect is that you want cloud or smoke shapes to work with, as they will naturally lend themselves to forming the shapes you want. ========================================================================================================================================================== Once you have one, experiment with the settings and see what results you can get. Ideally for Dynamics, we want the clouds to comprise around 50-60% of the total image, with a good mix of both smaller and larger cloud formations, as this ratio is required to allow for Dynamics to function as expected. I recommend prioritizing the lowest quality or least appealing areas of your image first, before tackling the edges or removing large macro elements from the pattern. With enough experimentation, you should end up with something akin to this image: As you can see above, you may also find it advantageous to flip or mirror the image. There is no hard rule to whether or not that is desirable; your artistic eye simply needs to guide you, and remember that there is no cost in experimentation here. If it ends up looking bad, start over and try again. Now, to prepare the image for use in KSP, we need to actually turn it into two different textures. One will be our main tex, and the other our detail tex. The eventual randomized interaction between the two textures, which we will set up once we are in-game, is what enables Dynamics to do what it do. ========================================================================================================================================================== Now, the transparent image as we have it is already set up, and this will be our detail texture. First, insure you have save this as an .xcf so that you can always come back to it, and ensure that your background color layer is set to invisible, so you are left with just the layer with the clouds. Then export the image as a .dds. Ensure your settings match this: For this, we name this as cpat1_d Once that has completed exporting, we can move on to to the main texture. To generate this, I do not recommend just doubling up on the detail texture. The reason for this is because the interaction between the transparent sections of both textures tends to not look that great in my experience, so instead what we want to do is create a texture that captures the macro shapes of the pattern, but “fills in” some much of the transparencies, allowing for the detail texture to define those alone. ========================================================================================================================================================== The process for this is simple. Duplicate the layer multiple times, and as you do so you'll notice the pattern become progressively bolder as the stacked layers fill in transparencies. I recommend doing this around 4-6 times. Once you have them, merge the copied layers together into one, and you should result in an image like this: The difference here may appear to be subtle, but that is ideal. You do not want it to be too bold, but the pattern should be considerably fuller than its detail counterpart. Export this as a second .dds, this time simply as cpat1 With these two textures in hand, you have all you need to make Dynamics work. Add them to your mod directory, and load up the game. In the EVE Gui, accessed by Alt-0, or within the tracking station by clicking on the EVE Gui button, create a new layer and name it cpat1. ========================================================================================================================================================== From here, the settings you choose are more or less up to you, your tastes, and what you want to do. I can, however give you some general tips going down the line of the options you have available to you. Altitude – Generally speaking, you don't want clouds to be too high up in the atmosphere, especially at lower scale Solar Systems, as this will look very off from what it should be compared to real life. While achieving the realistic is not completely possible without moving up to Real Scale, you can approximate it, and for this, I recommend a cloud height around 7-10km, and I recommend that for all of your cloud patterns that you make the altitude identical, or only with slight variances. Kill Body Rotation – This generally is only recommended for things meant to stay stuck to the polar regions. Speed/Detail Speed – Speed governs how fast Main Tex moves across the world, while Detail speed, as you can imagine, governs how fast the Detail Tex moves within its application to the Main Tex. For these, I recommend keeping them relatively low, no more than 20 or 30, but ideally closer to the 2-10 region. You can use negative numbers, and this will help to vary up the directions the two textures move in, which is highly useful if you want to use the same cpat twice, saving both on memory and allowing for a more fuller globe. Offset – This setting appears to move the texture away from a particular center point, however it is quite limited and typically only works well if you specifically need something to hang, with no movement, in a specific location on the planet. This is useful for providing things like lava flows, algae blooms, smoke clouds, meteors, etc. Rotation – These settings naturally govern how the layer itself rotates as it moves. You can use these to set up singular cyclonic storms, however do note that due to shortcomings in the Offset setting (namely that it doesn't allow you to offset where the center point of a layer is), you may not be able to get your cyclone to behave properly except on one location on the planet. Hopefully in future versions of EVE these settings can be expanded on to allow for greater control. Arc – I've never seen any reason to use this. It controls how much of your texture displays over one half of the planet, but the effect does not seem to be entirely useful. Color – This is more or less self-explanitory, though I will note that you can exceed the 255 numbers, as well as go negative if you wish. This is useful for balancing EVE's interactions with scatterer, enabling you to get clouds that do not look too starkly white, but while also still getting the vibrant terminators that settings in scatterer can provide you. Detail Scale – This is a critical setting for Dynamics, and it must be set to 1, otherwise dynamics will not work as intended. Using scales higher than one will shrink and repeat the detail texture, which is not what we want; we want Main Tex and Detail Tex to be 1:1. Detail Distance – This setting affects how the layer appears at various zoom distances. A setting of -2E-07 is recommended here. DistFade – If this setting has an effect, I have not been able to identify it. DistFadeVert – I recommend using the same as Detail Distance, though like DistFade I am not certain what effect this setting has. UV Noise Settings – If you have a useful UV texture, I would recommend following the advice of others who have dealt with these. I have not, so I will not speak to them authoritatively. ========================================================================================================================================================== Finally, you also want to ensure you have enabled Layer 2D. Most of the settings in here should be left alone, other than MinLight and ShadowFactor. Minlight when set to a positive number will cause your cloud layer to appear on the night side at various brightnesses. This is mostly used for Auroras and other lighted effects, but as I will cover in the City Lights section, this also has use for enabling an effect that I find is stupidly called “cloud glow”. Shadow factor is up to personal tastes, but it is good to note that higher values will induce unnatural darkness on the ground, so be wary; it may look good in orbit but you may second guess the value if your rocket launch in the sun is being cast into darkness by a tiny speck of cloud texture. Once all of these settings are ready, you're done! Apply the layer and save it to your config. Once you change scenes, or press the Map Eve Clouds button in the Scatterer GUI, you can enter time warp and see how your new cloud pattern periodically forms and dissipates at random over time. By adding additional cpats, repeating them, and varying their settings, you can achieve global cloud coverage that is always dynamic, and seldom boring. Performance wise, it is fully dependent on how many repeated cpat layers you have going at once, and naturally the resolution you created the textures at. For Sol, I settled on a repetition of four, with each of the three main cpats being repeated four times with varied speed and detail speed settings to achieve a global coverage that I was satisfied with. With smaller resolution textures, you could potentially push this number to greater heights, though I will note that it is possible to have too much layered over top of one another at once, so be wary. ========================================================================================================================================================== As an added bonus, I am also going to, much less thoroughly, explain how to achieve the apparently lost “art” of cloud glow, an effect that was apparently quite popular in older visual mods prior to a change in EVE that changed how the Minlight setting worked. The solution, incredibly, to bringing the effect back was astonishingly simple and brain dead. Are you ready? Use two citylight configs. Its dumb, it shouldn't work, but it does. In order to achieve the effect, like we see here: What you want to do is take your CityLights texture, and apply a substantial Gaussian Blur filter to it. It shouldn't be so high that it becomes indiscernible where the lights were, but it shouldn't be so low that the lights are only slightly blurry. Once you have this, you will also need to create new detail textures for what we will call CityLights_G As a result of how the CityLights feature works in EVE, you will need set your day texture to a blank, nothing texture, as small as you can get it. This is necessary to prevent the glow from appearing on the day side of the planet. To maintain consistency, I recommend taking your night texture, and applying the same gaussian blur filter to it; you want most of the details to vanish in the blur for this one. I call these dayglow and nightglow respectively. Now, due to EVE being unable to support the creation of two simultaneous CityLights for the same body in its GUI, this will instead have to be done through the configs directly. Simply take your CityLights config file, copy and paste it, and rename it to CityLights_G or whatever other name you would like to give. In the settings, change the texture paths to your new textures. Once you're done, save the config, and it just simply works. While you will not be able to toy with the _G layer itself in-game, it is relatively trivial to make any adjustments to its config. To achieve the final piece of the cloud glow puzzle, you simply need to enable Minlight on your cloud layers. For this, I recommend a setting between 0.2 and 0.4, as this will allow the clouds to still show up on the night side, but will prevent them from being starkly visible even on the Moon, which is a shortcoming of the old method to this effect. The _G layer will shine through the now visible clouds (provided the texture is transparent) and, with some possible adjustments to the _G texture, you can achieve a look that mimics the real life nature of lights being scattered and dispersed across a cloud at night. @ballisticfox0
×
×
  • Create New...