Jump to content

[PLUGIN][ALPHA-10] City Lights and Clouds on Kerbin/Others


rbray89

Recommended Posts

The cloud edits were just suggestions, and as of alpha 7 I stopped using them anyway. They look good in PQS mode, but clip the planet in scaledspace since the scaledspace Kerbin is just flat-out rescaled 10.6x, we can't keep height ASL constant on scaledspace mesh rescale, there's just the one transform.

Anyway, thought I'd post this too: really pretty! Can't tell you how much your mod adds to the game, rbray89! :)

yVIqQa9l.png

Syncom 2 in Kerbostationary Equatorial Orbit. Ignore the fact that the central antenna is too fat for the real deal.

Link to comment
Share on other sites

I removed realsolarsystem and voila, clouds.

What I do not get is how a cfg change would do anything, seeing as the clouds disappear before onload (you can see it in the vid, one second the clouds are there all fine, the next they are gone)

Oh, excuse my ignorance, the actual rescaling of Kerbin occurs after loading the launchpad and before vessel onload?

In that case would it be as easy as Nathan adding your layers to be rescaled as well?

(dont hit me for being a noob :P)

Edited by Lucchese
Link to comment
Share on other sites

Yeah, reporting a serious problem with Alpha 10 (did not exist in Alpha 7, the last I used before 10), same as Lucchese. When in PQS mode, the overlays flicker like mad. They're picture-perfect when Kerbin is in scaledspace though, as my above screenshot shows.

I should point out that I edited no files, just a straight extraction of your latest GameData. What's puzzling is that it used to work perfectly (aside from the issue regarding underlighting I mentioned before)

Lucchese, AFAIK the mod pulls right from the CelestialBody radius, so I don't think that's it. Unless, rbray89, you now precalculate some stuff on startup, that depends on radius?

Link to comment
Share on other sites

Yeah, reporting a serious problem with Alpha 10 (did not exist in Alpha 7, the last I used before 10), same as Lucchese. When in PQS mode, the overlays flicker like mad. They're picture-perfect when Kerbin is in scaledspace though, as my above screenshot shows.

I should point out that I edited no files, just a straight extraction of your latest GameData. What's puzzling is that it used to work perfectly (aside from the issue regarding underlighting I mentioned before)

Lucchese, AFAIK the mod pulls right from the CelestialBody radius, so I don't think that's it. Unless, rbray89, you now precalculate some stuff on startup, that depends on radius?

No, there shouldn't be anything pre-caluclated. That is odd...

Link to comment
Share on other sites

Nope, that doesn't seem to be it. :\

What changed in the last few updates, that might be related to this?

Moved to a LOD sytem to handle layers and cameras properly...

Oh. That would be it. At 200 units the LOD sytem triggers the switch to the non- map mode... Might be able to push that out to get it to work. This is in common utils. A define at the top.

Link to comment
Share on other sites

I wanted to toss my next round of feedback out after several hours assembling a space station in orbit: I see two glitches with the clouds that are really noticeable. First one: in low orbit the clouds look too low resolution (there are texel squares in the clouds, but they're fuzzy, instead of sharp). This is kind of unavoidable unless one uses a high res cloud texture (which would eat up a good chunk of memory). The other is that the clouds ignore the z-depth of the environment under some circumstances. I was approaching a space station at 90km (I was above it), and the space station appeared to be in the clouds when it was near the center of the field of view (but popped out of the clouds near the edge), until I was fairly close (under 150 meters? I don't remember the exact distance). I only saw that during one approach, so who knows. However, for every single launch - look west, and you will see clouds or city lights through the mountains west of KSC. I don't know if there's a way for the clouds to depth test against the planet, but it would be a cool effect to see mountains poking out of the clouds.

Link to comment
Share on other sites

Showing of the underwater city of Jitbsvndabiqgafvne I.

hIEzPgI.png

I made my own city texture. Some of them look awesome.

RmVJWME.png

It feels more like looking at real cities, than over some giant grill. Though as I remember making it, it also feels like flying over a painting.

Sometimes the lights match the terrain really well.

Pe26Hjb.png

8K4eu8h.png

But there seems to be an issue with IVA ATM, when I switched to that view, what can be seen changes.

But, this mod made todays flight very satisfying. :)

I like the way the lights fade as you approach, which makes me wonder...

If you do continue to add actual cities, could you apply them the same way? Just a few simple meshes, re-using a few textures, that appear when you're, say, 30 Km away. No collision mesh means less strain on the computer. They could mainly be visual, after all, if you want to explore a city, you'll head to Kerbin City.

This mod gives you great bang per buck, being only about 10Mb so far.

Edited by Tw1
Link to comment
Share on other sites

Showing of the underwater city of Jitbsvndabiqgafvne I.

hIEzPgI.png

I made my own city texture. Some of them look awesome.

RmVJWME.png

It feels more like looking at real cities, than over some giant grill. Though as I remember making it, it also feels like flying over a painting.

Sometimes the lights match the terrain really well.

Pe26Hjb.png

8K4eu8h.png

But there seems to be an issue with IVA ATM, when I switched to that view, what can be seen changes.

But, this mod made todays flight very satisfying. :)

I like the way the lights fade as you approach, which makes me wonder...

If you do continue to add actual cities, could you apply them the same way? Just a few simple meshes, re-using a few textures, that appear when you're, say, 30 Km away. No collision mesh means less strain on the computer. They could mainly be visual, after all, if you want to explore a city, you'll head to Kerbin City.

This mod gives you great bang per buck, being only about 10Mb so far.

Nice, I really love that texture. I more or less just found something that worked OK. I had been meaning to find the usage, so it is good to know it isn't stupid high.

I had been pondering that myself. I really wanted collision meshes so that you could land on buildings and fly though alleys, but I guess it isn't really necessary. I'll have to think about it some more. Right now, the lights fade due to the shader. As you get close to the sphere, the alpha drops out so that when you are standing on the ground you don't see lights beneath your feet. It was more or less a necessity to ensure the lights didn't look out of place if you weren't in the air. Unfortunately, it doesn't help the mesh count, as the mesh still exists, so I probably won't use this technique for cities.

Link to comment
Share on other sites

I wanted to toss my next round of feedback out after several hours assembling a space station in orbit: I see two glitches with the clouds that are really noticeable. First one: in low orbit the clouds look too low resolution (there are texel squares in the clouds, but they're fuzzy, instead of sharp). This is kind of unavoidable unless one uses a high res cloud texture (which would eat up a good chunk of memory). The other is that the clouds ignore the z-depth of the environment under some circumstances. I was approaching a space station at 90km (I was above it), and the space station appeared to be in the clouds when it was near the center of the field of view (but popped out of the clouds near the edge), until I was fairly close (under 150 meters? I don't remember the exact distance). I only saw that during one approach, so who knows. However, for every single launch - look west, and you will see clouds or city lights through the mountains west of KSC. I don't know if there's a way for the clouds to depth test against the planet, but it would be a cool effect to see mountains poking out of the clouds.

Actually, I figured out a way around the cloud detail. I'll end up using a similar technique I use for the underside of the clouds. Detail Textures. I just have to make sure they fade at a decent distance otherwise it looks too tiled. From below it is fine as long as the clouds are close enough to the camera. I will probably have to make the underside fade to the main texture though, as clouds that are very high (eg, Duna) are easy to spot the tiling.

As for the other, well... KSP is very interesting in how it renders. there are three cameras: Near, Far, and Scaled. The Near camera renders ships, kerbals, etc. The Far camera seems to render the detail terrain, PQSCity stuff (Space center), etc. The Scaled camera renders the planetary and map view of bodies when you are ~100km away. The Far camera fades as you start moving away from a body to reveal the scaled camera render. So what I did was add a new camera that attaches to the scaled camera, and I attach clouds to the scaled planets. I can't use any other camera aside from my own and the scaled camera, otherwise the objects won't render to the correct size/position. So what I do is once I exit a certain distance away from the body, I move the layers onto the scaled camera so they don't mess with the Z writing. If I do it too soon, the layers won't be visible until you are up high, if I do it too late, they will overlap objects (as you saw). I will probably expose this value for different bodies in the near future. Until then, I would say have your stations at about 200KM up :P

Link to comment
Share on other sites

Do you suppose you could switch LOD distance based on radius? Then we wouldn't need two versions.

Like I mentioned just above, it will be based off of a config entry. Unfortunately, I don't think I can base it off of radius, but I haven't really looked into it. I should visit all the bodies to check what the camera scalling does to the distance. I only checked Kerbin, so the other planets might be different. The scales are weird though. 200 seemed like such an arbitrary number scale.

Link to comment
Share on other sites

Been playing around with config and the textures a bit, changed the alpha of Eve1 as it was looking a bit bland.

Looks better at a distance (but perhaps a bit worse as you approach the upper atmosphere).

Before:

nHo2sjG.png

With the altered alpha texture:

7IG3vp7.png

I also increased the colour contrast of Jool, especially the storm, and I switched Duna's cloud texture to the Kerbin's one. I did decrease the separation of the layers on Jool, so I'm getting a bit of z-stack flickering (but only at a distance) and Duna will probably require its own texture.

Jool:

sOsKAlI.png

Duna: http://i.imgur.com/Oqt68jC.png

Link to edits:

http://www./download/c6v27nx3r8dj2uo/Edits.zip

Link to comment
Share on other sites

Been playing around with config and the textures a bit, changed the alpha of Eve1 as it was looking a bit bland.

Looks better at a distance (but perhaps a bit worse as you approach the upper atmosphere).

Before:

nHo2sjG.png

With the altered alpha texture:

7IG3vp7.png

I also increased the colour contrast of Jool, especially the storm, and I switched Duna's cloud texture to the Kerbin's one. I did decrease the separation of the layers on Jool, so I'm getting a bit of z-stack flickering (but only at a distance) and Duna will probably require its own texture.

Jool:

sOsKAlI.png

Duna: http://i.imgur.com/Oqt68jC.png

Link to edits:

http://www./download/c6v27nx3r8dj2uo/Edits.zip

Very nice. I think I messed around with Jool layers when it was flickering due to a plugin bug... These will definitely have to go into the next version. :)

Link to comment
Share on other sites

Did some more editing of my city texture, tidied up a little, and added more little streets.

I included a couple of different street patterns, grid, radial, unplanned, cul-de-sac based stuff, and hexagons. 'Cose as we've learnt in the last few versions, kerbals seem to have a thing for hexagons.

There are a few things you might be able to spot in there too, if you're sharp-eyed and lucky.

It is here is you want to use it.

https://www.dropbox.com/s/xiq2kdoasa0sm9w/detail.png

Jool:

sOsKAlI.png

Not sure I like the Jupiter/watermelon look on Jool..

Perhaps things could be mixed up a little? And made more subtle?

At the moment, it seems like a different planet - like Jupiter made green.

I also reckon the Dunan clouds should be made more smooth, and fainter than they are in the picture.

marsbwc.jpg

Edited by Tw1
Link to comment
Share on other sites

Did some more editing of my city texture, tidied up a little, and added more little streets.

I included a couple of different street patterns, grid, radial, unplanned, cul-de-sac based stuff, and hexagons. 'Cose as we've learnt in the last few versions, kerbals seem to have a thing for hexagons.

There are a few things you might be able to spot in there too, if you're sharp-eyed and lucky.

It is here is you want to use it.

https://www.dropbox.com/s/xiq2kdoasa0sm9w/detail.png

Not sure I like the Jupiter/watermelon look on Jool..

Perhaps things could be mixed up a little? And made more subtle?

At the moment, it seems like a different planet - like Jupiter made green.

I also reckon the Dunan clouds should be made more smooth, and fainter than they are in the picture.

marsbwc.jpg

Nice! This will be going into the next release!

Link to comment
Share on other sites

Ooo! Beta!

Does this mean bugs are getting squached? I forgot too mention the cities were kind of following me after I made a really close swoop- I was using landing lights to try and measure the sizes of blocks. As I pulled up and turned away, the light patches seemed too stay in the same spot relative to the plane, rather than the ground.

May add an image later.

I also had an idea that could improve the texture further. It won't take long, and I'll put it up later tonight.

Link to comment
Share on other sites

Actually, I figured out a way around the cloud detail. I'll end up using a similar technique I use for the underside of the clouds. Detail Textures. I just have to make sure they fade at a decent distance otherwise it looks too tiled. From below it is fine as long as the clouds are close enough to the camera. I will probably have to make the underside fade to the main texture though, as clouds that are very high (eg, Duna) are easy to spot the tiling.

As for the other, well... KSP is very interesting in how it renders. there are three cameras: Near, Far, and Scaled. The Near camera renders ships, kerbals, etc. The Far camera seems to render the detail terrain, PQSCity stuff (Space center), etc. The Scaled camera renders the planetary and map view of bodies when you are ~100km away. The Far camera fades as you start moving away from a body to reveal the scaled camera render. So what I did was add a new camera that attaches to the scaled camera, and I attach clouds to the scaled planets. I can't use any other camera aside from my own and the scaled camera, otherwise the objects won't render to the correct size/position. So what I do is once I exit a certain distance away from the body, I move the layers onto the scaled camera so they don't mess with the Z writing. If I do it too soon, the layers won't be visible until you are up high, if I do it too late, they will overlap objects (as you saw). I will probably expose this value for different bodies in the near future. Until then, I would say have your stations at about 200KM up :P

Out of interest, did you try having two cloud spheres? i.e. having one in the far camera layer and the other in the scaled space layer so that when it fades the far cam the other is already visible?

Link to comment
Share on other sites

Out of interest, did you try having two cloud spheres? i.e. having one in the far camera layer and the other in the scaled space layer so that when it fades the far cam the other is already visible?

I thought about that, but I couldn't find a POR to attach to.

Link to comment
Share on other sites

Ooo! Beta!

Does this mean bugs are getting squached? I forgot too mention the cities were kind of following me after I made a really close swoop- I was using landing lights to try and measure the sizes of blocks. As I pulled up and turned away, the light patches seemed too stay in the same spot relative to the plane, rather than the ground.

May add an image later.

I also had an idea that could improve the texture further. It won't take long, and I'll put it up later tonight.

Yeah, and it is at a point that feels more solid to me, and does almost everything I initially wanted. Following you? hmmm... I can't think of why that might happen.

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...