Jump to content

JPLRepo

KSP2 Alumni
  • Posts

    3,142
  • Joined

  • Last visited

Everything posted by JPLRepo

  1. Because of the way the Z coordinate is rendered in what is called the Z-buffer. So if you look at the picture imagine there are slices like a sheet of paper between where the camera is and it's far clipping pane. The amount of "slices" you can have between the near and far clipping pane are relatively fixed by Unity. So the greater the distance between the two then the greater the space between these slices of paper becomes. This creates other problems such as Z-fighting. So the two camera system allows a small distance between these Z planes at closer distance to the player. Which gives greater Z-buffer depth and less Z-fighting where it matters the most (closest to the player).
  2. And others will say that the shadows annoyed them to no end and that is more important to them.. There was and is no easy answer. But there is light at the end of the tunnel.
  3. Yeah I think you need Unity 5.6 for this to work for sure.
  4. Why is DeepFreeze not in CKAN? Because CKAN is a mod and I don't maintain it. I also don't support it.
  5. Yes. all the things discussed above were implemented in 1.3.
  6. Other world - (read Job) got in the way today. I'll try to get a dev build up on github in the next 24 hours so some of you fine folks can test my fixes. Thanks.
  7. Yep. We are working on something. @TriggerAu EDIT: Actually we are working on something for code changes. Not cfg (part) cfg changes. But a Grep would get the job done pretty easily.
  8. There have been a steadily growing list of shadow issues since KSP moved to Unity 5. This list now included (but was not limited to) shadow issues with Trees, KSC buildings, Green lines over water and Sun shadows flickering in flight. Looking at them one by one, each of these issues appeared to have different root causes. So let’s look at them one by one. Trees As soon as I started looking at the tree issue it was quickly apparent this was a shader issue given it only affected one particular tree model and its vertex shapes. Where do we start? Digging into the shader being used by our tree that is causing us issues I quickly found that the alpha cutoffs and fallback shader are just not quite right because of changes Unity made in Unity 5. A few adjustments later to the shader and we have our result. KSP's Camera System KSP uses a two Main camera system for the main game view. Of course there are a number of other cameras for displaying UI, Graphic FX, etc. But these two are the ones that show you the game world. Let’s look at a picture so I can describe it. There are two cameras located where the camera icon is in the top left of the picture.This is their location in the game world.They are both looking in the same direction and are linked to the same camera transform.The first camera, or Camera00, is known as the Near Camera. It is set to show only the first few hundred meters of the game world and it’s view of the world ends at it’s Near Camera Far clipping pane, as seen in the picture.The second camera, or Camera01, is known as the Far Camera. It is set to show the game world where the Near camera ends out to a very very long distance away. There have been long standing issues with this system including shader issues where the two cameras overlap, or where the Near Camera’s Far Clipping Pane ends and the Far Camera’s Near Clipping Pane starts. This has been particularly visible as a green line over water. The primary reason for why these two cameras overlap is to provide a seamless view of the game world. So changing the camera settings we can reduce the overlap to the very minimum and we see that the green line that used to be visible over water has now vanished. KSC Buildings The KSC buildings had also been suffering from this same two camera system since Unity had introduced changes to the way it draws shadows. In Unity's built in shadow shaders is an automatic fade out of shadows as you approach the far clipping plane (the furtherest the camera can see). This is why we had things like this where the shadow would fade away, get cut, or not appear around the area of where the closest game camera far clipping plane ended.This problem has been known about for some time. Here is a link to an article written by Harvester asking for help about the problem. Here also, is a picture by Harvester describing the problem (from the article). So how do we fix this? Well luckily as a developer I am able to get access to the Unity built in shaders and create a modified version that does not have this fade out feature. So I take the Unity built in shader used for the building shadows and change its code to remove the fade out processing. Once I have the shader fixed to not fade the shadows I also need to write a script (code) that will replace the built-in Unity shadow shader with our modified one. Finally I add this script to the KSP cameras and we get a much better result. But we weren't quite done with the building shadows. Another known issue in Unity 5 is the way sharp edges in object geometry cause gaps in shadows to appear. Luckily this is much easier to resolve by changing the settings of the geometry on our building objects to use two-sided shading. The Sun and Flight Scene. Everyone has probably noticed the flickering/sliding shadow effects that have plagued the game in flight mode since the move to Unity 5. Without a doubt the trickiest problem of the bunch and hardest to resolve. There is a combination of factors at play here. First is a known issue with the way Unity draws shadows with directional lights and the second issue, that only tends to exacerbate the problem, is floating point precision issues calculating very large numbers which represent the very large distances (even at the scale the Kerbin system is in). The SunLight we see in the game is generated by a Unity Directional Light. This light is rotated over time based on the position of the celestial bodies. The position and rotation is calculated every tick of the clock and the light itself is rotated based on the body positions. Due to floating point imprecision this means the calculations between the bodies can vary even the smallest amount between clock ticks and this is exacerbated further by a known bug in Unity with regard to shadows drawn by directional lights. By reducing the precision of the calculations between the celestial bodies we can reduce these tiny variations so we have a solid number that gradually changes over time. The downside of reducing the precision is that the rotation of the sun is less smooth, so we end up with a sun that tends to move in small steps rather than one fluid motion across the sky. But the plus side is we reduce the difference between clock ticks and we don't get light shadows flickering all over the place. This work-around solution, whilst not ideal, is the best compromise to alleviate the issue working within the known limitations and Unity issues that we have.These known issues with Unity 5.4 directional lights and shadows have been fixed and much improved in Unity 5.6. Along with improved shaders, effects and other enhancements that come with Unity 5.6.
  9. I have a dev version that I think fixes the problem. Anyone willing to test it for me? Anyone willing to do the translations is most welcome. The file with all the texts is in \GameData\ThunderAerospace\TacLifeSupport\Localization.cfg If anyone wishes to do so for any of the languages you can submit a pull request on github or send/post the file here with translations in it. If you wish to translate and have questions about any of the texts, please ask. Appreciate anyone who takes the time to do this.
  10. That is a problem to take up with the CKAN mod. After I got through all the clickspam of that file hosting site. there's nothing in that log that helps me unfortunately. and the save file I can't really use as it's a save with a ton of other mods installed.
  11. If you want to try you can just add this to the Lander.cfg it gives you the gimbal (without the animations on the engines). MODULE { name = ModuleGimbal gimbalTransformName = thrustTransform gimbalRange = 5 }
  12. It allows what you suggest, but it doesn't do it. As the OP says, it supports mods using it to do what mods want. But out of the box it produces EC for unloaded vessels. TAC LS is using it to produce EC for unloaded vessels (but I would like to make that part of TAC when I have time). Given the number of issues people are reporting about EC with TAC in the last version I will try to find some time this weekend to work through the problems and fix things up for EC consumption/production for TAC. (But I can't promise it, I will try to do so).
  13. Just an update, I've been working on getting all the contracts, bugs, UI and localization working on this mod now that contract configurator has been updated for KSP 1.3.
  14. It's more than maintained. thanks. I'll update the link. It's because this is a new thread I did after my old one got deleted. So about two years of thread history got lost a couple of months ago.
  15. As per the BackgroundProcessing thread which explains what it does.
  16. With TAC LS and Background Processing installed I am not seeing this issue at all. I'm going to need some specific logs, saves, and description. I launched several vessels with large capacity with a few kerbals on board. EVAing one or two of them, switching vessels, etc and I did not see negative/go nuts EC remaining or any readouts indicating it was calculating based on crew capacity (and I know it doesn't, because I wrote the code and double checked it). EC usage and the time remaining is based on how many kerbals are on a vessel and the number of crewed parts there are at any given time.
  17. Yeah sorry - it's the one that says 'unloaded vessel processing' Ok I'll have to take a look. Do you have a save file? Or it has lots of other mods installed?
  18. This is because TAC LS now drains EC for unloaded vessels (not the active vessel). But stock KSP does NOT produce EC for unloaded vessels. You have two options: 1) Go into the difficulty settings menu at the KSC (hit esc, settings, difficulty settings button at the top) and then select TAC Life Support settings. Turn off background EC usage option. 2) Download and install the BackgroundProcessing mod (here is the link) which when installed WILL produce EC for unloaded vessels, and leave the TAC LS setting ON to consume EC for unloaded vessels. I've updated the OP to reflect this as I had neglected to do so, which I think is creating a bit of confusion. sorry!
  19. I just tried it and it is very close... needs some minor adjustments.(of course not changed the model to actually move the nozzles, just added the partmodule). [edit] of course FAR will completely change the atmospheric flight characteristics again.. and probably won't fly in that configuration at all.
  20. The InternalText component above uses a class construct to name a font "Arial" in InternalText.fontName. But actually that is just a name. The actual font is part of the text element in that class which is TMPro and the new NotoSans font for Localization. The InternalComponents.Instance.textPrefabs contains the "TextArial" prefab which is used when calling InternalComponents.Instance.CreateText. To properly support localization the font would be "NotoSans-Regular SDF". There is still an "Arial SDF" and "Calibri SDF". But they are all TMP fonts now.
  21. Thanks for taking the time. I'll see if I can find some time. I'm thinking @swjr-swis suggestion might be something we need. (gimbal engines)
  22. I believe the CKAN guys have applied a fix to CKAN so TAC LS should now install correctly via CKAN. Thanks to @politas & @Olympic1 for doing that. Cheers.
  23. Firstly.You are using KSP 1.1.3? Second, This is an old thread. The new thread is posted above and in my signature. Third. I, and I doubt anyone else, supports versions as old as 1.1.3.
  24. Yes that is correct... still looking for volunteers.. or time myself to fix it.
×
×
  • Create New...