Oolite Bulletins

For information and discussion about Oolite.
It is currently Fri Nov 17, 2017 9:06 pm

All times are UTC




Post new topic  Reply to topic  [ 36 posts ]  Go to page Previous 1 2 3 Next
Author Message
PostPosted: Sat Sep 09, 2017 11:11 am 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sun Jul 21, 2013 12:26 pm
Posts: 545
Quote:
Quote:
Wasn't there something like a shady planet branch or something? Wasn't it supposed to do something like that? What happened to that?
It went stale long time ago and there have been many changes in the planet drawing code and shaders since then, so it may not be such a simple job bringing it up to date.

In any case, I think that shaders would be the way to go about implementing this request. I doubt that flashers or other look-alike effects would be able to cut it.
Almost there (temporary hosting):

Image

The relief in 1.85 with perlin textures is a little bit too strong in my opinion, so I was trying to make it more "flat". I changed the rescale factor from 127.5 to 63.5 at lines 491-493 in OOPlanetTextureGenerator.m. N

However, there are side effects that are more or less welcome (~3MB).

Obviously I don't know what I'm doing. I believe I accidentally flipped the normals for the oceans. Someone more knowledgeable than me about that stuff can probably put it to good use.


Top
   
PostPosted: Sun Sep 10, 2017 6:26 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sun Jul 21, 2013 12:26 pm
Posts: 545
Actually my first goal was to try to mix the old generator and the new generator to obtain landscape features. But it came to me that there may be an easier and cheaper way: use the clouds texture.

Something like: take the clouds texture, keep only the highest values of alpha, and mix it with the ground texture in reverse pixel order (so that the trick isn't too obvious). High alpha values could be use to introduce terrain features with a different color (maybe swap components of the ground color?), low values could be used for city lights. Can someone explain what I've accidentally discovered to me?


Top
   
PostPosted: Tue Sep 19, 2017 10:59 am 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sun Jul 21, 2013 12:26 pm
Posts: 545
After some more reading, trial and error (temp hosting):

Image

This is the dark side of a planet near the dawn line; one can see a bit of the lit part in the bottom right corner. The bright dot on the left is a star, the other isolated points are space dust.

I targeted the coastlines to make tests more easy, so it looks a bit ugly and silly (actually on this picture the criteria was still including water bodies). As far as I understand it, I indeed flipped the depth coordinate of the normal vectors (Z in [0..128] instead of [128..255]).

The downside is that the brighter the point is on the dark side, the darker it will appear on the lit side. So it looks terrible especially on the coastlines which are normally pale, but I think it's still usable for cities which can be dark patches. Maybe it will be possible to mitigate this by picking a bright color for them.


Top
   
PostPosted: Thu Sep 21, 2017 3:15 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sun Jul 21, 2013 12:26 pm
Posts: 545
I give up. The glow is too faint on the dark side and it looks horrible on the light side no matter what, and it doesn't look like cities anyway.

I guess we will have to wait for shader gurus to pick it up. I think the way to go would be something like:
1. Create predefined city patterns textures with associated shaders,
2. Pick a bunch of them pseudo-randomly and superpose them,
3. Apply the texture generator on top of that map to get relief, oceans, specular lighting etc.

Or maybe run the texture generator first then apply the city textures on top of it.


Top
   
PostPosted: Thu Sep 21, 2017 11:55 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1801
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Sometimes things work out, and sometimes they don't, but we won't know until we try. Thanks for your work on this, even though it didn't work out the way you wanted. Well done.

Shader gurus .. over to you!

_________________
My OXP's


Top
   
PostPosted: Sun Sep 24, 2017 5:04 am 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 169
<popping in, while still waiting for the gurus>

Not that difficult with the shaders. Tweaking the parameters for the noise now, _that_ will be a challenge.

Image

The noise looks a bit better in game, it twinkles[*] ;)

*Which of course is an unexpected "feature".


Top
   
PostPosted: Sun Sep 24, 2017 8:30 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5011
Interesting. Looks nice. What happens when the cloud layer is over the lit areas? Do they get temporarily hidden or dimmed while the clouds pass over them?


Top
   
PostPosted: Sun Sep 24, 2017 10:55 am 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sun Jul 21, 2013 12:26 pm
Posts: 545
Quote:
Not that difficult with the shaders. Tweaking the parameters for the noise now, _that_ will be a challenge.
How did you do that? Is this the mysterious "shady planet" branch Spara was talking about earlier?


Top
   
PostPosted: Sun Sep 24, 2017 4:43 pm 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 169
Quote:
What happens when the cloud layer is over the lit areas?
Quote:
How did you do that? Is this the mysterious "shady planet" branch Spara was talking about earlier?
Trying to answer both questions at once: it's done through the trunk planet fragment shader, only. Thus, the clouds obscure this.


Top
   
PostPosted: Mon Sep 25, 2017 4:37 pm 
Offline
Deadly
Deadly

Joined: Thu Aug 27, 2015 4:24 pm
Posts: 247
This all looks very nice, does it have some twink'ling too?


Top
   
PostPosted: Tue Sep 26, 2017 11:52 am 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sun Jul 21, 2013 12:26 pm
Posts: 545
Quote:
Trying to answer both questions at once: it's done through the trunk planet fragment shader, only. Thus, the clouds obscure this.
Sorry, is it a branch in the oolite github repo or is it in a separate repo?


Top
   
PostPosted: Tue Sep 26, 2017 2:08 pm 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 169
Quote:
Sorry, is it a branch in the oolite github repo or is it in a separate repo?
It's on my computer at the moment. I can provide the simple changes (given my -- rather slow -- release cycle tendencies) but I'd rather not pollute the forum with potentially dangerous, definitely not polished and very likely shameful code :oops: .
I guess PM for the adventurous shouldn't be a problem, though.


Top
   
PostPosted: Thu Sep 28, 2017 2:12 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Sun Jul 21, 2013 12:26 pm
Posts: 545
Quote:
It's on my computer at the moment. I can provide the simple changes (given my -- rather slow -- release cycle tendencies) but I'd rather not pollute the forum with potentially dangerous, definitely not polished and very likely shameful code :oops: .
I guess PM for the adventurous shouldn't be a problem, though.
Yes, please! You can PM them to me as diffs/patches if that's easier for you.


Top
   
PostPosted: Thu Sep 28, 2017 5:44 pm 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 169
Quote:
Yes, please! You can PM them to me as diffs/patches if that's easier for you.
Done. There are some changes that mainly modify the pattern the lights are spread (to avoid the potato distribution :) )

For reference, this is what Lave should look like when launching a new Jameson:

Image


Top
   
PostPosted: Fri Sep 29, 2017 11:17 pm 
Offline
Deadly
Deadly

Joined: Thu Aug 27, 2015 4:24 pm
Posts: 247
while ring month fades away, city lights awaits... :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 36 posts ]  Go to page Previous 1 2 3 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited