Jump to content

[1.6.x] Distant Object Enhancement bis v1.9.1.1 (16 October 2018) - Free to a Good Home


MOARdV

Recommended Posts

Available now on GitHub and KerbalStuff.

Short release notes:

  • Finally fixed vessel flare positions.
  • Changed equation used to determine vessel flare brightness so smaller satellites will be visible.
  • Internal code changes to eliminate some redundant updates

Satellite flares (especially small satellites) should be more visible. Yes, it's probably "unrealistically bright", and I'm willing to tweak the equation more in the future, but I'd rather see lots of satellites in orbit than only being able to see a couple of big space stations.

Link to comment
Share on other sites

On my main install, I had Distant Object Enhancement, but removed it to try and solve a massive spamming of error messages that I continue getting, it's causing large lag even with small vessels

Output Log: https://www.dropbox.com/s/x8t0p34xb5l7ypj/Output%20Log.txt?dl=0

DistantObject is not installed, according to that log. It does not show up any time in the assembly loading at the beginning of the log. What you *do* have installed is CactEye, and its DistantObjectHook dll, which allows CactEye to interact with DOE. Get rid of DistantObjectHook.dll, or install DistantObjectEnhancement (although, since the CactEye plugin is looking for an outdated version of DOE, CactEye may need updated before that feature works).

Link to comment
Share on other sites

working on my 1.0.4 install and I noticed this in the ksp.log:


[ERR 12:46:58.765] Distant Object Enhancement v1.6.0 -- Could not find ConfigNode for part novapodkos

[ERR 12:46:58.766] Distant Object Enhancement v1.6.0 -- Could not find ConfigNode for part KAXheavyGearSmall

It may be worth noting that these are both parts created by MM, copies of existing parts

Link to comment
Share on other sites

  • 2 weeks later...

For all versions after 1.5.5 I no longer have any flare rendering (at all) if I am using a planetary mod with Kopernicus. Tested against a fresh install of Kerbal with only Distant Object Enhancement, Kopernicus, and New Horizons. If I remove Kopernicus and New Horizons the flares return. With versions 1.5.3 and 1.5.4 I do get flares rendered when using Kopernicus and New Horizons.

Link to comment
Share on other sites

working on my 1.0.4 install and I noticed this in the ksp.log:

It may be worth noting that these are both parts created by MM, copies of existing parts

That looks like it's in the VesselDraw code (which I've generally avoided since I started working on this mod). I'll see if I can understand what that code's trying to do, and whether there's another way to get it to do whatever that is.

For all versions after 1.5.5 I no longer have any flare rendering (at all) if I am using a planetary mod with Kopernicus. Tested against a fresh install of Kerbal with only Distant Object Enhancement, Kopernicus, and New Horizons. If I remove Kopernicus and New Horizons the flares return. With versions 1.5.3 and 1.5.4 I do get flares rendered when using Kopernicus and New Horizons.

No flares, meaning not even vessel flares? Or just planetary flares? That's about three months worth of changes, and I haven't heard anything about it prior to now, so it's going to be a bit of work to guess which change is the problem.

Link to comment
Share on other sites

No flares, meaning not even vessel flares? Or just planetary flares? That's about three months worth of changes, and I haven't heard anything about it prior to now, so it's going to be a bit of work to guess which change is the problem.

I am not seeing vessel flares either. I do notice with 1.5.5 that the planetary flares I do see change from white to color and back to white based on my orbit around another body as well.

Some things I know about New Horizons that could be relevant:

A) The Sun has been modified to reflect the up-scaling of the system

B) The spacing and distances of the bodies are larger than stock

C) The entire system is at a tilt relative to the Sun and not in the original horizontal plane

Perhaps the flares are being eclipsed by some attributes of the new Sun settings, or perhaps some more recent changes don't play well with the larger scale of the system? If there is anything I could test or try out, I would be happy to do so.

Link to comment
Share on other sites

That looks like it's in the VesselDraw code (which I've generally avoided since I started working on this mod). I'll see if I can understand what that code's trying to do, and whether there's another way to get it to do whatever that is.

Cool, as of right now though from a few basic play sessions to test things out I haven't noticed anything serious to come of it

Link to comment
Share on other sites

I'm working on a mod that will feature more than one star.

they are at a fair distance one from the other, and using DoE I can't see them in the sky (I can see the label if I mouseover, but no star are visible in that bit of sky)

is there a way to set the intensity of the flare in the cfg?

Link to comment
Share on other sites

I am not seeing vessel flares either. I do notice with 1.5.5 that the planetary flares I do see change from white to color and back to white based on my orbit around another body as well.

Some things I know about New Horizons that could be relevant:

A) The Sun has been modified to reflect the up-scaling of the system

B) The spacing and distances of the bodies are larger than stock

C) The entire system is at a tilt relative to the Sun and not in the original horizontal plane

Perhaps the flares are being eclipsed by some attributes of the new Sun settings, or perhaps some more recent changes don't play well with the larger scale of the system? If there is anything I could test or try out, I would be happy to do so.

Assuming you've already turned the brightness and size controls to maximum in the DOE config menu, it's likely the scale of the system - it was tuned to stock Kerbol scale and the Kerbin system, and the greater distances may exceed the limits of what DOE will handle (vessel flares are visible to 750km, any flare that's less then 0.2% of the camera FOV is invisible (about 7' of arc, IIRC), since it's sub-pixel sized on most displays). It also has some hardcoded assumptions about where it will find the Sun and Kerbin (or the Kerbin analogue) in the FlightGlobals list of worlds that can mess up the equations used to decide flare sizes.

is there a way to set the intensity of the flare in the cfg?

If you look at PlanetColors.cfg, you can see the options you have for planetary flares: color (okay, there are not a lot of options :) ). Flare size and intensity are controlled by the size of the world, its distance from the sun and viewer, and the sun angle. It doesn't allow for emissive "worlds" (additional stars), but I see a way to add that for the sake of making it a bright flare.

Link to comment
Share on other sites

If you look at PlanetColors.cfg, you can see the options you have for planetary flares: color (okay, there are not a lot of options :) ). Flare size and intensity are controlled by the size of the world, its distance from the sun and viewer, and the sun angle. It doesn't allow for emissive "worlds" (additional stars), but I see a way to add that for the sake of making it a bright flare.

yeah I was almost sure the color was the only customization option, but I had to ask :)

Link to comment
Share on other sites

I've been playing around with New Horizons also. Ive noticed that if you turn the flare brightness up to the maximum, it allows you to see a few of the inner most planets. I just assumed that the problem was the distance between planets, but I cannot see laythe, or lave flares (laythe is one planet inwards and Lave is one planet outwards.

Link to comment
Share on other sites

I was comparing the source code for FlareDraw in 1.5.5 to 1.6 and most of the changes appear to arrive at the same values or perform the same functions with just slightly different approaches using the same information. The FlightGlobals [0]/[1] are also being used in 1.5.5 where I see the flares so I'm not sure that is it. The luminosity and brightness values look like they are the same between versions (just done differently). I may try comparing 1.5.5 to 1.5.6 where there are less total changes and see if something jumps out. In New Horizons Laythe is closer to the Sun than Duna is in stock, though I do not see the flares I can move the cursor around and pick up the names when I hover over them with DOE =) I will check to see if I also see some of the inner planets, they are so close to the Sun I would probably have to have them at the right relative angles for them to show up if they do.

Update:

Did a bunch of debugging between Stock, New Horizons, and DOE 1.5.5 and 1.6.0. Brightness values for bodies (at the time I took them for their positions at that exact point) in Stock, regardless of DOE version range between -3.689 and 4.909. The 4.99 clamp ensures all values will be negative for the resizefactor which is THE most important thing in being able to actually see a flare (aside from it being enabled or not!). I know this is tailored for stock, and I do love the mod- it is great. Might it be possible to add a variable that can be altered in the configuration files to adjust this based on the system specs? Currently the brightness is the aspect of a celestial body that impacts how large the flare is, it being clamped at 4.99 results in 34/35 bodies in New Horizons having 4.99 brightness and also in 34/35 bodies having a resizefactor of 9.6 (because .01 becomes a very tiny adjustment to another static value. The stock planets range from 87 to 8,400). The closest direct comparison I have is Laythe in NH to Duna in Stock, the distances and size of the planets are fairly close.

NH + DOE 1.5.5 --- BODY: Laythe _Brightness: 10.1437403346722 _SizeVector: -4968.3020482575 _SizeDegrees: 0.00157614408022995

Stock + DOE 1.6.0 --- BODY: Duna_Brightness: -0.948638744077973 _SizeVector: 5745.74767262817 _SizeDegrees: 0.000988599838010948

NH + DOE 1.6.0 --- BODY: Laythe_Brightness: 4.99 _SizeVector: 9.65915 _SizeDegrees: 0.00163158446547681

The 1.5.5 NH has a negative size vector, but that just means the texture is upsidedown which doesn't actually affect it and it can be clearly seen. It should probably have a magnitude greater Duna which is almost 40% smaller in size (on screen) - the SizeDegrees would also probably be a good factor to be in the calculations for the ResizeFactor.

A config variable that could go in like, (brightness - 5.0f * systemScale), for the ResizeFactor could also be useful for custom systems that are beyond the stock size. The stock system had brightness ranging from -3.6 to 4.9, New Horizons was in the 2.59 to 18.96 brightness range. This hard coded value could also possibly become redundant if the SizeDegrees had an impact on the calculations.

I hope that I do not come off as criticizing, I absolutely love that this mod exists and continues to be updated! The version I use also does everything I want to let me see that when my ships are in certain locations that there is the hint of something out in the vast open space. I saw this as a mystery I just wanted to dig into! It is also likely I am misinterpreting something, I just looked into this today and it is a little foreign. I tried my hand at some calculation adjustments but intelligent maths is way beyond me.

Keep up the great work!

Edited by Tynrael
Additional Testing
Link to comment
Share on other sites

I believe I discovered the root cause of the missing flares and high brightness values for New Horizons. When kerbinSMA is set it assumes that Kerbin is parented to the Sun, New Horizons has Kerbin parented to a Gas Giant so this much smaller SMA resulted in rather high Brightness values which lead to clamping that negated them being set to a visible size.

Adding some code to locate the body that has the Sun as its parent and Kerbin as a child (if the parent of Kerbin is not the Sun) sets the SMA to a more reasonable value. The range for Brightness changes to around -11 to +8 and any of the Celestial Bodies that are greater than 5 and would be clamped (only 4/35) are so small and far away that they would not be visible anyway. Everything looks as expected!

Link to comment
Share on other sites

Adding some code to locate the body that has the Sun as its parent and Kerbin as a child (if the parent of Kerbin is not the Sun) sets the SMA to a more reasonable value. The range for Brightness changes to around -11 to +8 and any of the Celestial Bodies that are greater than 5 and would be clamped (only 4/35) are so small and far away that they would not be visible anyway. Everything looks as expected!

Is Kerbin in NH still at index 1 in the FlightGlobals.Bodies list? If so, that's a reasonable change that I'd be willing to do / accept a pull request for. As for your previous comment about clamping the brightness variable - a negative resize value is a problem: Since all of the world flare impostors are at a distance of 750km from the camera, the absolute value of the resizeFactor tells you how large the flares are relative to one another (since backface culling isn't enabled with the material/shader being used - if it were, then negative-sized flares simply wouldn't be visible). I think the root problem is that the brightness of the object is being used to determine the flare size. What should happen is the angular size of the body should control the flare size, and the brightness should control ... the brightness. :)

Link to comment
Share on other sites

What should happen is the angular size of the body should control the flare size, and the brightness should control ... the brightness. :)

That was my thinking as well, I tried some calculations of my own but the reality is that even though I scratch my head when looking at the formula the way it is now, the results are pretty well tuned and look very reasonable.

Kerbin is indeed set at index 1 for New Horizons. I tried pushing a request for changes that worked for me in stock as well as NH, my first time using Github so I am not sure I did it correctly. :rolleyes:

Link to comment
Share on other sites

This is a maintenance release primarily incorporating Tynrael's fixes to account for situations where Kerbin is not a child of Kerbol, so people playing in mutant solar systems (I kid!) may still enjoy DOE. There's also some internal changes to get rid of a redundant query (if I know the value doesn't ever change, why do I keep searching through a list to find that value every update?). Available on GitHub and KerbalStuff.

Link to comment
Share on other sites

The plugin makes approaching large space stations a much more scenic and immersive situation, seeing them coming closer from afar (instead of the 'plop here it is!' at the 2.5km range). And the flares are a very enjoyable touch too. Thanks for sharing this awesome work!

Link to comment
Share on other sites

  • 2 weeks later...

Hi, I'm experiencing some extremely lagging episodes, when i liftoff with a new vessel I get a flare in the ground.

9ABFCBC530DD755E9F8DB20B27F9FC43BE168D5D

8AD0355A21EB8F5CE255AA339BF9CC11D70344ED

It happens even on launch pad

When I start the engines I get an extremely poor fps and when I move the camera in another position, to not watch the flare, I get a normal fps. The problem is that vessels sometimes drop another flare sometimes, during flight. I've tried to remove vessel flare rendering and disable any options but no succes. For now the solution is to remove Distant Object entirely. :(

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...