Jump to content

[1.8 - 1.12.x] Distant Object Enhancement Continued v2.0.3.1 (29 September, 2021)


TheDarkBadger

Recommended Posts

@TheDarkBadger Just an FYI, the github download says this mod has been updated to KSP v2.0.2.0 I think that's supposed to be v1.11, with the 2.0.2.0 being the mod version number. I got really confused for a second wondering if a update dropped I didn't know about, or if I'd found an old download link by mistake. 

Link to comment
Share on other sites

11 hours ago, vardicd said:

@TheDarkBadger Just an FYI, the github download says this mod has been updated to KSP v2.0.2.0 I think that's supposed to be v1.11, with the 2.0.2.0 being the mod version number. I got really confused for a second wondering if a update dropped I didn't know about, or if I'd found an old download link by mistake. 

derp!

Thanks, fixed :)

Link to comment
Share on other sites

  • 4 weeks later...
3 minutes ago, Misguided Kerbal said:

Question here: what brightness setting do ya'll use, and what's the most realistic? I thought the default was too dark, so I turned it up to 75%.

I'm not a fan of stars looking washed out at night, so I've got it pinned at 100%. This does lead to some rather jarring changes and the skybox being brighter than it seems it should, sometimes, so I'm not sure I'd recommend it.

Edited by RyanRising
Link to comment
Share on other sites

  • 1 month later...

Thanks for maintaining this mod.

On 9/20/2020 at 12:08 PM, TheDarkBadger said:

Planets appear as a dark spot visible through the atmosphere. They should be hidden behind it, just like the stars. Would it be possible to fix that?

Also noticed this with planets visible through the sun:

pq39lpz.png

 

Link to comment
Share on other sites

  • 5 weeks later...
  • 1 month later...
  • 1 month later...
  • 4 weeks later...
On 6/17/2021 at 5:06 PM, SiCaRiO31 said:

I cant see vessels when they are far away, I trough they were supose to be visible as a small white dot over long distances. Is this how it is suppose to be?

  Reveal hidden contents

20210617141741-1.jpg

 

Distant Rendering will make it so any ship within the specified distance is fully rendered (i.e all the parts are rendered, it just disables the physics so your computer doesnt melt)
Unfortunately Distant Rendering does not currently work with modded parts - if you want to just see flares on far away vessels you should turn off the Distant Rendering feature :)

Link to comment
Share on other sites

4 hours ago, TheDarkBadger said:

Distant Rendering will make it so any ship within the specified distance is fully rendered (i.e all the parts are rendered, it just disables the physics so your computer doesnt melt)
Unfortunately Distant Rendering does not currently work with modded parts - if you want to just see flares on far away vessels you should turn off the Distant Rendering feature :)

ah! that was it. thanks for the clarification :)

Link to comment
Share on other sites

I am trying to modify the stock config by adding one of my own, but it seems that it didn't work with overwriting it. Can I do that, for instance, via Module Manager patch?

 

Edit: I found out that this does indeed work via Module Manager patch. Example code below, in case anyone else has a similar issue:

@CelestialBodyColor[Eve]
{
    @color = 0,0,0
}

 

Edited by OndrikB
Link to comment
Share on other sites

  • 5 weeks later...

Updated to KSP 1.12.x

On 8/18/2021 at 11:17 PM, Random Chimp Event said:

Hey, so I ran this mod with tarsier space technologies, and I noticed that opening the telescope gui makes planet flares fade out, but closing the gui brings them back. Is this intentional or some incompatibility? Any way I could fix this so the flares remain visible with the tst telescope active?

I'll have a look into this issue when i have some free time :)

Link to comment
Share on other sites

  • 1 month later...

Even weirder,

I simply can't see the MODEL itself of the ship rendered, but it recognizes it as text in the correct distance (less than 750000m).

Using hullcam mod I got some telescopes that are just your camera zooming in big time, and as it seems the vessels do not render for some reason.

In the screenshots, I basically waited for it to be infront of the mun's terrain so it'll be visible easily, and with an immense zoom I see that there's no rendering at all oddly enough. Technically it doesnt blink flare when im in space gazing at the mun or something for example, but did from kerbin surface, debris and such.


Rest of the times when I was in perfect position, no flare light, and no rendering, yet text movement was clearly visible, thus it was inaction and in the correct distance.

Is it a bug or do they render at only a specific distance like 100kms or such perhaps?

 

I also got graphics mods like scatterer, planetshine, EVE, spectra. don't know if maybe that's causing an issue?

 

 

 

 

 

 

fg7PF5b.jpeg7NWqF5t.jpeg

Edited by Alexsys
Link to comment
Share on other sites

5 hours ago, Alexsys said:

Even weirder,

I simply can't see the MODEL itself of the ship rendered, but it recognizes it as text in the correct distance (less than 750000m).

Using hullcam mod I got some telescopes that are just your camera zooming in big time, and as it seems the vessels do not render for some reason.

In the screenshots, I basically waited for it to be infront of the mun's terrain so it'll be visible easily, and with an immense zoom I see that there's no rendering at all oddly enough. Technically it doesnt blink flare when im in space gazing at the mun or something for example, but did from kerbin surface, debris and such.


Rest of the times when I was in perfect position, no flare light, and no rendering, yet text movement was clearly visible, thus it was inaction and in the correct distance.

Is it a bug or do they render at only a specific distance like 100kms or such perhaps?

 

I also got graphics mods like scatterer, planetshine, EVE, spectra. don't know if maybe that's causing an issue?

 

 

 

 

 

 

fg7PF5b.jpeg7NWqF5t.jpeg

You are on "Render Targeted Vessel Only" under Distant Vessel, if you press the button you can change the mode to render all unloaded vessels which should fix your issue

Link to comment
Share on other sites

7 hours ago, TheDarkBadger said:

You are on "Render Targeted Vessel Only" under Distant Vessel, if you press the button you can change the mode to render all unloaded vessels which should fix your issue

Uh, I might've realized something.

I also got ReStock mod running, which optimizes and changes all textures completely.

 

Even without Render all unloaded or with, I get to the point where I can see the object at distance,

yet when I zoom in, it fades.
So now I managed to catch a glimpse at my space station, and see only like 3 tiny pieces of it visible, rest invisible.
Which I assume are the only texture ReStock didn't change, the containers. Which were somewhat visible

I also run Tweakscale.

 

Could it be because of this?
I'll give it a few more tests.

5ExKyXz.jpeg

 

Damnit, I figured it out.

Took restock off for a moment, the default parts that were not Tweakscaled were visible, tweakscaled parts were invisible.
So in conclusion:

Restock, the mod that replaces all default textures with a new varient and optimized varient, is simply invisible in the rendering of this mod.

And Tweakscale'd objects are too invisible.

 

what a sad discovery, I was really looking forward to enjoying distant object enhancement with my current combo of restock and tweakscale, which are surprisingly very ordinary mods, shame they don't render.
I'm missing on a legendary mod like yours :(

 

With a grand desire for this mod to function for situations like mine, I did some extra digging, and found something in Restock mod that might be able to align such rendering with Restock.

It might help the future development, if perhaps one day you will consider compatabilities and such.

Personally, I got no idea how to edit them modulemanager DLL files

OvNJdWI.png

 

Although sadly for Tweakscale, got no idea on this part,
maybe it's pretty much the same case with Restock, with how distant object enhancement is coded to see purely vanilla and un-tweakscaled parts as rendered.

 

Regardless of not being able to actually enjoy your mod,

it seems so damn legendary.

Edited by Alexsys
Link to comment
Share on other sites

I felt a great disturbance in the Force… :sticktongue:

 

1 hour ago, Alexsys said:

Could it be because of this?
I'll give it a few more tests.

5ExKyXz.jpeg

<cut for abbreviation>

Although sadly for Tweakscale, got no idea on this part, maybe it's pretty much the same case with Restock, with how distant object enhancement is coded to see purely vanilla and un-tweakscaled parts as rendered.

think I know the reason.

When a craft it far away, it's "extracted" from the Physics Engine and "put" on rails, a special state where the craft "does not exists" for the game engine, but still "exists" for the KSP engine. When in Rails, the craft follows a precomputed path (as it was a planet) and that's it. When a craft is put on rails, the "craft entity" is saved into a thingy called ProtoVessel - that is where the KSP enging handles these crafts.

In order to visualize a ProtoVessel, DistObj had to draw it itself, the line of code that does it is here. If you are curious, this code check the type of part in order to know how to draw it (gears, solar panels, etc, they need special handling when being drawn).

DistObj needs to do everything by itself without relying on KSP (as we modders do when writing  PartModule). From the relative position of the part related to the root, to its rotation (and more). But the size is not handled at all, see the code:

	GameObject cloneMesh = Mesh.Instantiate(clone) as GameObject;
	clone.DestroyGameObject();
	cloneMesh.transform.SetParent(shipToDraw.transform);
	cloneMesh.transform.localPosition = a.position;
	cloneMesh.transform.localRotation = a.rotation;
	// No size handling!!

So, while drawing, the code finds an unexpected situation when TweakScale (and ReStock) is involved and since this situation is not handled, the net result is the mesh being drawn with a 0 size (or something like this). In the case of ReStock, I'm guessing the problem is the Textures - this code appears to rely on the texture specified on the Mesh, and ReStock changes that in runtime - so I'm guessing that DistObj is drawing invisible meshes (on TweakScale, I think it's drawing meshes with 0 size).

I will give this a shot, let's see if I had learned enough about KSP and Unity to fix TweakScale support on it. :)

Link to comment
Share on other sites

3 hours ago, Lisias said:

I felt a great disturbance in the Force… :sticktongue:

 

think I know the reason.

When a craft it far away, it's "extracted" from the Physics Engine and "put" on rails, a special state where the craft "does not exists" for the game engine, but still "exists" for the KSP engine. When in Rails, the craft follows a precomputed path (as it was a planet) and that's it. When a craft is put on rails, the "craft entity" is saved into a thingy called ProtoVessel - that is where the KSP enging handles these crafts.

In order to visualize a ProtoVessel, DistObj had to draw it itself, the line of code that does it is here. If you are curious, this code check the type of part in order to know how to draw it (gears, solar panels, etc, they need special handling when being drawn).

DistObj needs to do everything by itself without relying on KSP (as we modders do when writing  PartModule). From the relative position of the part related to the root, to its rotation (and more). But the size is not handled at all, see the code:

	GameObject cloneMesh = Mesh.Instantiate(clone) as GameObject;
	clone.DestroyGameObject();
	cloneMesh.transform.SetParent(shipToDraw.transform);
	cloneMesh.transform.localPosition = a.position;
	cloneMesh.transform.localRotation = a.rotation;
	// No size handling!!

So, while drawing, the code finds an unexpected situation when TweakScale (and ReStock) is involved and since this situation is not handled, the net result is the mesh being drawn with a 0 size (or something like this). In the case of ReStock, I'm guessing the problem is the Textures - this code appears to rely on the texture specified on the Mesh, and ReStock changes that in runtime - so I'm guessing that DistObj is drawing invisible meshes (on TweakScale, I think it's drawing meshes with 0 size).

I will give this a shot, let's see if I had learned enough about KSP and Unity to fix TweakScale support on it. :)

You're a god damn legend.

Didn't expect to see you here, seems like the gods knew to involve professionals.

 

Hope it will be feasable, but I have no doubt.

 

You think this additional thing I've read on Restock's github (the screenshot I added in the previous post), would actually also pair up well on this Distant Object mod, to fix up the lack on Restock's overwrite of stock textures, in order for them to appear?

Link to comment
Share on other sites

50 minutes ago, Alexsys said:

You're a god damn legend.

Didn't expect to see you here, seems like the gods knew to involve professionals.

I was sent by the Krakens to fight NaNs, InFs and Divisions By Zero on the Physics Engine, as well another pestilences that plague KSP as NullReferenceExceptions and Crashes to the Desktop!! :D 

Behave, Code, or I will debug you!!! :sticktongue:

(hummm.. where is my medicine?)

Spoiler

_RsBpbpYm5kUMxdY28w6yav6s96Tpbx5sQOLU-Cs

I was dying to publish this one somehow, now I have an excuse!!! :D

 

50 minutes ago, Alexsys said:

Hope it will be feasable, but I have no doubt.

It is. If I didn't manage to pull this out if the hat, it would be due lack of better knowledge. :P

The tricky part is to understand how to rezise the mesh by brute force - on TweakScale, it's easy, I just ask KSP to resize the mesh and it does it for me! :) [Nah, nailed it. It's as simple as it can be!]

 

50 minutes ago, Alexsys said:

You think this additional thing I've read on Restock's github (the screenshot I added in the previous post), would actually also pair up well on this Distant Object mod, to fix up the lack on Restock's overwrite of stock textures, in order for them to appear?

Nope, because that fix is for Add'Ons that directly depends from Stock Part and Textures, what's not the case of DOE. What it does is, essentially, kinda to reimplement a "mini vessel engine" in order to visualize the craft when it's on Rails, out of the "normal" game engine.

What we need to do is to "teach" DOE to understand ReStock parts, more or less the same way I'm "teaching" it to understand TweakScale.

Edited by Lisias
tyops. as usulla...
Link to comment
Share on other sites

1 hour ago, Lisias said:

I was sent by the Krakens to fight NaNs, InFs and Divisions By Zero on the Physics Engine, as well another pestilences that plague KSP as NullReferenceExceptions and Crashes to the Desktop!! :D 

Behave, Code, or I will debug you!!! :sticktongue:

(hummm.. where is my medicine?)

  Reveal hidden contents

_RsBpbpYm5kUMxdY28w6yav6s96Tpbx5sQOLU-Cs

I was dying to publish this one somehow, now I have an excuse!!! :D

 

It is. If I didn't manage to pull this out if the hat, it would be due lack of better knowledge. :P

The tricky part is to understand how to rezise the mesh by brute force - on TweakScale, it's easy, I just ask KSP to resize the mesh and it does it for me! :) [Nah, nailed it. It's as simple as it can be!]

 

Awesome to see how easily you manage to score and handle such material as those mods offer, its grand to see pro experienced skill in action.

 

Regarding teaching DOE to understand Restock parts,

I assume this is only manageable only by the DOE developer?

Link to comment
Share on other sites

22 hours ago, Alexsys said:

Awesome to see how easily you manage to score and handle such material as those mods offer, its grand to see pro experienced skill in action.

The heavy lifting is already done. The whole DOE is already made, I only need to find the right place where to shove a small code that would take TweakScale current settings and apply them on the scaling of the mesh - assuming, of course, that there's not something else hiding waiting to bite our SAS... just realise that only the root part is being drawn here, the other parts of the test craft are being ignored… :/ 

DistObj ERROR: Could not load part model Squad/Parts/FuelTank/RockomaxTanks/

So, not so easy as it appears. There's something else happening here, some debugging is scheduled to be done later, after work - I think that I found the problem! The code that keep track of the models only understand the older configuration, using the "mesh" value!

[Rant about testing - please ignore. :DThe mess is that at lower orbits, when it's easier to see something, the linear velocity is too high for the SAS to be stable. On higher orbits, when the linear velocity is slower, the meshes start to colapse due the floats rounding errors. It's pretty entertaining, to tell you the true… :P 

 

22 hours ago, Alexsys said:

Regarding teaching DOE to understand Restock parts,

I assume this is only manageable only by the DOE developer?

Stay tuned, the problem I found above may the reason the ReStock parts are caput - pretty few configs still uses the value "mesh" to read the model!

Edited by Lisias
better phrasing - pretending to being a human when sleepy is hard!
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...