Jump to content

[1.8.1-1] [PLEASE FORK ME] Kopernicus & KittopiaTech


Thomas P.

Recommended Posts

6 minutes ago, OhioBob said:

@Thomas P., @Sigma88, here's something else I want to run by you guys regarding sunlight intensity curves.

As I understand it, IntensityCurve controls the intensity in flight mode, i.e. the lighting on vessels and nearby celestial bodies.  ScaledIntensityCurve controls the intensity in scaled space, i.e. map mode and tracking station.  Is that correct?

What I'm uncertain about, and what I was trying to test, is what happens in flight mode when moving away from a celestial body and transitioning from a PQS rendered surface to scaled space, or vice versa.  If IntensityCurve and ScaledIntensityCurve have different values, will we see a change in light intensity when moving through that transition?  That's when I discovered the bug that I reported in my last post (ScaledIntensityCurve is currently used in both flight and map/tracking station modes, while IntensityCurve apparently does nothing).

Although I wasn't able to complete my test (because of the bug), it did get me thinking about something.  Perhaps it would be more useful to have intensity curves for each game mode, rather than distinguishing between scaled space and not scaled space.  I don't know if such a thing is possible to do, but perhaps there could be curves like this,

  • FlightModeIntensityCurve (both near and far conditions)
  • IVAIntensityCurve
  • MapModeIntensityCurve
  • TrackingStationIntensityCurve

For instance, I might want to have Flight, IVA, and Map modes render sunlight intensity realistically, i.e. decreasing with increasing distance from the sun.  But I might want to show all the bodies in the Tracking Station with the same bright illumination.  By differentiating all those modes, it would provide greater flexibility.
 

IVAIntensityCurve exists

MapMode and TrackingStation are the same in KSP as far as I know

 

regarding the mod, I haven't had the time to look into it yet, thanks for reporting

Edited by Sigma88
Link to comment
Share on other sites

2 minutes ago, Sigma88 said:

IVAIntensityCurve exists

MapMode and TrackingStation are the same in KSP as far as I know

Yes, I'm aware IVAIntensityCurve already exists.  I think it would be nice if MapMode and TrackingStation could have separate intensity curves, but if they are the same as far as KSP is concerned with no way to differentiate them, well then so be it.  It may just be wishful thinking on my part.
 

Link to comment
Share on other sites

4 minutes ago, OhioBob said:

Yes, I'm aware IVAIntensityCurve already exists.  I think it would be nice if MapMode and TrackingStation could have separate intensity curves, but if they are the same as far as KSP is concerned with no way to differentiate them, well then so be it.  It may just be wishful thinking on my part.
 

yeah, that's the only point I'm not sure how feasible it would be

I assume it is possible, but I don't know if it would be worth the processing power (this would likely be a constant check rather than a static change at the beginning of the game)

but I'm not 100% sure, @Thomas P. is probably better suited to answer this

Edited by Sigma88
Link to comment
Share on other sites

That's a good point about processing power.  Might not be worth it.

I could live with MapMode and TrackingStation being the same, but I like the idea of doing FlightMode differently.  I thought that's what we had with IntensityCurve and ScaledIntensityCurve (except it doesn't seem to working correctly at present).  But I'm concerned about the transition between PQS and scaled space while in FlightMode.  While I might want to use different lighting in MapMode/TrackingStation, I don't want it to create a weird lighting change when moving through that transition in FlightMode.  If it does, then I would probably elect to make IntensityCurve and ScaledIntensityCurve the same.  And that kind of defeats the purpose of having the two different curves.

By the way, I've heard that IntensityCurve and ScaledIntensityCurve use different distance units - meters for IntensityCurve, and meters/6000 for ScaledIntensityCurve.  Can you verify that?  What about IVAIntensityCurve?
 

Edited by OhioBob
Link to comment
Share on other sites

3 hours ago, OhioBob said:

I could live with MapMode and TrackingStation being the same, but I like the idea of doing FlightMode differently.  I thought that's what we had with IntensityCurve and ScaledIntensityCurve

now that I think about it

when you say flightmode, do you mean you are flying a ship close enough to see the PQS of a planet?

because if you are in flight but far away from the planet you will get the scaled version of the planet, which means the scaled curve is used

 

I think the intensitycurve only applies to PQS, but I'm not sure

Link to comment
Share on other sites

51 minutes ago, Sigma88 said:

now that I think about it

when you say flightmode, do you mean you are flying a ship close enough to see the PQS of a planet?

because if you are in flight but far away from the planet you will get the scaled version of the planet, which means the scaled curve is used

I think the intensitycurve only applies to PQS, but I'm not sure

By flightmode I'm referring to the screen where I see and am actively controlling a vessel.  So in that case I can see the PQS of a planet if close enough, or the scaled version if farther away.  Then of course there is the solar illumination on the vessel itself.  Do you know what curve applies to the illumination of the vessel?

Of course the problem I've reported is that even when I'm seeing the PQS of the planet, its illumination is still being determined by ScaledIntensityCurve.  Making changes to IntensityCurve doesn't do anything in the game.  But if I edit ScaledIntensityCurve, the illumination changes for everything.
 

Edited by OhioBob
Link to comment
Share on other sites

5 minutes ago, OhioBob said:

Of course the problem I've reported is that even when I'm seeing the PQS of the planet, its illumination is still being determined by ScaledIntensityCurve.

it might be that IntensityCurve is for the vessel

I would have to test it manually to make sure tho

Link to comment
Share on other sites

1 minute ago, Sigma88 said:

it might be that IntensityCurve is for the vessel

I would have to test it manually to make sure tho

I welcome you to do your own tests, but I already checked that out.  The illumination on the vessel was also controlled by ScaledIntensityCurve.

Link to comment
Share on other sites

6 hours ago, OhioBob said:

I welcome you to do your own tests, but I already checked that out.  The illumination on the vessel was also controlled by ScaledIntensityCurve.

I will have some time tonight (CEST) to test kopernicus with an actual KSP install, in the meantime I took a look at the code and it looks like the IVA intensitycurve is not used.

however, IntensityCurve and ScaledIntensityCurve are used properly (as far as I can tell from looking at the code)

 

there's a very easy way to find out what each curve affects and it is using this cfg:

@Kopernicus:FINAL
{
	@Body[Sun]
	{
		%ScaledVersion
		{
			%Light
			{
				%sunlightColor = 1,0,0,1
				%sunlightIntensity = 1
				%scaledSunlightColor = 0,1,0,1
				%scaledSunlightIntensity = 1
				%IVASunColor = 0,0,1,1
				%IVASunIntensity = 1
			}
		}
	}
}

 

 

using this cfg:

  • the light affected by IntensityCurve will be bright red,
  • the light affected by ScaledIntensityCurve will be bright green,
  • the light affected by IVAIntensityCurve will be bright blue.
Link to comment
Share on other sites

8 hours ago, Sigma88 said:

I will have some time tonight (CEST) to test kopernicus with an actual KSP install, in the meantime I took a look at the code and it looks like the IVA intensitycurve is not used.

however, IntensityCurve and ScaledIntensityCurve are used properly (as far as I can tell from looking at the code)

I didn't test IVAIntensityCurve, so I never noticed if there was a problem with it or not.  What I did to test the other curves was this:

  • I started out with identical IntensityCurve and ScaledIntensityCurve, in which sunlight dimmed with greater distance from the sun.
  • I had a probe in orbit around the sun that I could hyperedit to different distances to test the changes in illumination.
  • I also had a probe landed on an outer planet so I could test up close the illumination of the surface.
  • With this set up, everything seemed to be working normally, i.e. dimmer sunlight the farther away from the star I got.
  • I then changed ScaledIntentityCurve to a curve that gave even sunlight intensity all the way out to just past the farthest planet.
  • I first check the planets in the Tracking Station and all where illuminated the same, as expected.
  • I then checked the landed probe and the surface was very brightly illuminated with the same intensity as the inner planets, which was unexpected.
  • When I moved my orbiting probe closer to or farther away from the sun, its illumination did not change.
  • From this I concluded that all these lighting conditions were being controlled by ScaledIntesnityCurve, because they all exhibited behavior consistent with the change I made to that curve.
  • I then retuned ScaledIntensityCurve to what I had it originally and instead changed IntensityCurve to a curve that provided equal intensity across all planet distances.
  • With this set up all the lighting in the game returned to what it was originally, with sunlight intensity diminishing with distance in all game modes, consistent with ScaledIntensityCurve.
  • All indications where that changing IntensityCurve had no affect on any of the lighting conditions I could observe in the game.

 

Edited by OhioBob
Link to comment
Share on other sites

@OhioBob this is why I proposed to change the color of the different lights

It's possible that all the lights you looked at are handled by scaledlight, in which case the expected behaviour would be the one you described.

Once you color the lights with different colors, it should be pretty easy to spot if there is some unwanted behaviour or not.

I will be home in 4ish hours and I can check it out then.

Link to comment
Share on other sites

A question about oceans:

If make a planet with an ocean, but increase the density of the ocean up to something ridiculous (like 999999), will the ocean surface behave like a frozen ice world?

A second question is: can oceans be added to template worlds that don't already have oceans, or do you need to start out with a template that already has an ocean?

Link to comment
Share on other sites

14 minutes ago, seanth said:

A question about oceans:

If make a planet with an ocean, but increase the density of the ocean up to something ridiculous (like 999999), will the ocean surface behave like a frozen ice world?

A second question is: can oceans be added to template worlds that don't already have oceans, or do you need to start out with a template that already has an ocean?

I don’t know about the density, but I have put oceans on Moho templates before. So I assume you can with any template, you just have to define everything in the Ocean node

Edited by Galileo
Link to comment
Share on other sites

27 minutes ago, seanth said:

If make a planet with an ocean, but increase the density of the ocean up to something ridiculous (like 999999), will the ocean surface behave like a frozen ice world?

I doubt anyone has every done that before, so it looks to me like you're the guinea pig.  Let us know what you find out.

I'm curious, what advantage do you think having a super-dense ocean gives you over just making it a solid surface?  Why not just make it solid?

27 minutes ago, seanth said:

A second question is: can oceans be added to template worlds that don't already have oceans, or do you need to start out with a template that already has an ocean?

You can add oceans to any template.  You just need to add an ocean node and set all the parameters.  The advantage to using a template that already has an ocean is that you're using the already existing settings.  You only have to worry about changing the settings you want to tweak.

 

Edited by OhioBob
Link to comment
Share on other sites

Just now, OhioBob said:

I doubt anyone has every done that before, so it looks to me like you're the guinea pig.  Let us know what you find out.

I'm curious, what advantage do you do you think having a super-dense ocean gives you over just making it a solid surface?  Why not just make it solid?

As a part of the "To Boldly Go" mod, I'm working on procedural planets and part of the process is thinking through planets that fall within a star's habitable zone/beyond the frost zone.

So imagine a planet somewhat like Minmus that has what appears to be frozen plains. If it wasn't procedural, one could custom make a planet/moon with flat, frozen plains. But procedurally, it's be nice if I could define an ocean...that just happens to be solid.

Link to comment
Share on other sites

3 minutes ago, seanth said:

So imagine a planet somewhat like Minmus that has what appears to be frozen plains. If it wasn't procedural, one could custom make a planet/moon with flat, frozen plains. But procedurally, it's be nice if I could define an ocean...that just happens to be solid.

There are PQS mods that can be used to flatten areas.  I don't know much about them, but @Galileo has used them.  How about something like FlattenOcean?

Link to comment
Share on other sites

1 minute ago, OhioBob said:

There are PQS mods that can be used to flatten areas.  I don't know much about them, but @Galileo has used them.  How about something like FlattenOcean?

Ohhh, that's interesting. There are so many PQS knobs to twiddle I hadn't seen that. I'll look for some documentation/examples

 

Link to comment
Share on other sites

Just now, seanth said:

Ohhh, that's interesting. There are so many PQS knobs to twiddle I hadn't seen that. I'll look for some documentation/examples

I played around with FlattenOcean a long time ago.  It fills in all the areas below a certain elevation to create a flat ocean bottom.  I'm guessing it can be used to produce the same effect even when there isn't an ocean, i.e. no water.  It's certainly worth looking into.

Link to comment
Share on other sites

28 minutes ago, OhioBob said:

I doubt anyone has every done that before, so it looks to me like you're the guinea pig.  Let us know what you find out.

You can definitely land on super dense "oceans" but the physics engine sort of freaks out sometimes. Right now I have Jeb on EVA and he bouncing around out of control like he's on a trampoline. Highest bounce I have seen is ~100m

Not useful for what I was thinking, but maybe good for a lolerz world.

Link to comment
Share on other sites

22 minutes ago, seanth said:

Ohhh, that's interesting. There are so many PQS knobs to twiddle I hadn't seen that. I'll look for some documentation/examples

 

You'll want to take a look at: https://github.com/Kopernicus/pqsmods-standalone/blob/master/PQSMod_FlattenArea.cs for the actual PQS Mod itself and also:

https://github.com/Kopernicus/kittopia-dumps/blob/565b54b577e8b6d81919971c123a20231928c67a/Configs/Bop.cfg#L214 

&

https://github.com/Kopernicus/kittopia-dumps/blob/565b54b577e8b6d81919971c123a20231928c67a/Configs/Kerbin.cfg#L1615

... for examples of them in use on Bop and Kerbin. :D 

EDIT: There is also FlattenAreaTangential if you want the surface to retain its curved, spherical shape relative to the radius of the body.

Edited by Poodmund
Link to comment
Share on other sites

1 minute ago, OhioBob said:

@Sigma88, here's what I started out with:

  Hide contents


			Light
			{
				sunlightColor = 1,0,0,1
				sunlightShadowStrength = 0.75
				scaledSunlightColor = 0,1,0,1
				IVASunColor = 0,0,1,1
				sunLensFlareColor = 1,1,1,1
				ambientLightColor = 0.06,0.06,0.06,1
				sunAU = 13982766706
				luminosity = 1360
				IntensityCurve
				{
					key = 0 1 0 0
					key = 500000 1 0 -2.885E-07
					key = 1000000 0.9 -1.443E-07 -1.443E-07
					key = 2000000 0.8 -7.213E-08 -7.213E-08
					key = 4000000 0.7 -3.607E-08 -3.607E-08
					key = 8000000 0.6 -1.803E-08 -1.803E-08
					key = 16000000 0.5 -9.017E-09 -9.017E-09
					key = 32000000 0.4 -4.508E-09 -4.508E-09
					key = 64000000 0.3 -2.254E-09 -2.254E-09
					key = 100000000 0.2356144 -1.443E-09 -7.272E-09
					key = 128000000 0.032 -7.272E-09 -1.803E-10
					key = 256000000 0.016 -9.017E-11 -9.017E-11
					key = 512000000 0 -4.508E-11 0
				}
				ScaledIntensityCurve
				{
					key = 0 1 0 0
					key = 500000 1 0 -2.885E-07
					key = 1000000 0.9 -1.443E-07 -1.443E-07
					key = 2000000 0.8 -7.213E-08 -7.213E-08
					key = 4000000 0.7 -3.607E-08 -3.607E-08
					key = 8000000 0.6 -1.803E-08 -1.803E-08
					key = 16000000 0.5 -9.017E-09 -9.017E-09
					key = 32000000 0.4 -4.508E-09 -4.508E-09
					key = 64000000 0.3 -2.254E-09 -2.254E-09
					key = 100000000 0.2356144 -1.443E-09 -7.272E-09
					key = 128000000 0.032 -7.272E-09 -1.803E-10
					key = 256000000 0.016 -9.017E-11 -9.017E-11
					key = 512000000 0 -4.508E-11 0
				}
				IVAIntensityCurve
				{
					key = 0 0.7 0 0
					key = 500000 0.7 0 -2.020E-07
					key = 1000000 0.63 -1.010E-07 -1.010E-07
					key = 2000000 0.56 -5.049E-08 -5.049E-08
					key = 4000000 0.49 -2.525E-08 -2.525E-08
					key = 8000000 0.42 -1.262E-08 -1.262E-08
					key = 16000000 0.35 -6.312E-09 -6.312E-09
					key = 32000000 0.28 -3.156E-09 -3.156E-09
					key = 64000000 0.21 -1.578E-09 -1.578E-09
					key = 100000000 0.1649301 -1.010E-09 -5.090E-09
					key = 128000000 0.0224 -5.090E-09 -1.262E-10
					key = 256000000 0.0112 -6.312E-11 -6.312E-11
					key = 512000000 0 -3.156E-11 0
				}
			}

 

And then I changed it to this:

  Reveal hidden contents


			Light
			{
				sunlightColor = 1,0,0,1
				sunlightShadowStrength = 0.75
				scaledSunlightColor = 0,1,0,1
				IVASunColor = 0,0,1,1
				sunLensFlareColor = 1,1,1,1
				ambientLightColor = 0.06,0.06,0.06,1
				sunAU = 13982766706
				luminosity = 1360
				IntensityCurve
				{
					key = 0 1 0 0
					key = 500000 1 0 -2.885E-07
					key = 1000000 0.9 -1.443E-07 -1.443E-07
					key = 2000000 0.8 -7.213E-08 -7.213E-08
					key = 4000000 0.7 -3.607E-08 -3.607E-08
					key = 8000000 0.6 -1.803E-08 -1.803E-08
					key = 16000000 0.5 -9.017E-09 -9.017E-09
					key = 32000000 0.4 -4.508E-09 -4.508E-09
					key = 64000000 0.3 -2.254E-09 -2.254E-09
					key = 100000000 0.2356144 -1.443E-09 -7.272E-09
					key = 128000000 0.032 -7.272E-09 -1.803E-10
					key = 256000000 0.016 -9.017E-11 -9.017E-11
					key = 512000000 0 -4.508E-11 0
				}
				ScaledIntensityCurve
				{
					key = 0 0.75 0 0
					key = 116666667 0.75 0 -1.5E-08
					key = 166666667 0 -1.5E-08 0
				}
				IVAIntensityCurve
				{
					key = 0 0.7 0 0
					key = 500000 0.7 0 -2.020E-07
					key = 1000000 0.63 -1.010E-07 -1.010E-07
					key = 2000000 0.56 -5.049E-08 -5.049E-08
					key = 4000000 0.49 -2.525E-08 -2.525E-08
					key = 8000000 0.42 -1.262E-08 -1.262E-08
					key = 16000000 0.35 -6.312E-09 -6.312E-09
					key = 32000000 0.28 -3.156E-09 -3.156E-09
					key = 64000000 0.21 -1.578E-09 -1.578E-09
					key = 100000000 0.1649301 -1.010E-09 -5.090E-09
					key = 128000000 0.0224 -5.090E-09 -1.262E-10
					key = 256000000 0.0112 -6.312E-11 -6.312E-11
					key = 512000000 0 -3.156E-11 0
				}
			}

 

In the first case I was getting red and green light as you described, with the light dimming with increasing distance from the sun.

In the second case I changed ScaledIntensityCurve to produce even illumination across all the planets.  Since only ScaledIntensityCurve was changed, only the green light should be affected.  But what happens now is both the green and red light are producing constant illumination at all distances.  So while the color is correct, the red light intensity appears be controlled by ScaledIntensityCurve.

We can move the rest of the conversation back to the Kopernicus thread if that is more appropriate.
 

yes this is the same thing I'm seeing, but I sadly can't figure out why it is doing that... :\

Link to comment
Share on other sites

This test at least answered the question that prompted me to do this in the first place.  The color does change from red to green when crossing the PQS/scaled space boundary in flight mode.  That was really what I was trying to figure out.  Discovering this other problem was just an accident.

 

Edited by OhioBob
Link to comment
Share on other sites

Ok, so PQS "FlattenArea":

If I understand correctly, it will flatten everything. There will be no mountains or anything projecting. So it won't really mimic a "frozen laythe" right?

Imagine replacing the oceans of Laythe with ice. That's approximately what I'm after.

 

Link to comment
Share on other sites

56 minutes ago, seanth said:

Ok, so PQS "FlattenArea":

If I understand correctly, it will flatten everything. There will be no mountains or anything projecting. So it won't really mimic a "frozen laythe" right?

Imagine replacing the oceans of Laythe with ice. That's approximately what I'm after.

 

I would use the PQS that poodmund posted above because of how much water covers the body. It will flatten anything below the defined altitude in your cfg

Edited by Galileo
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...