Oolite Bulletins

For information and discussion about Oolite.
It is currently Mon Nov 20, 2017 12:05 am

All times are UTC




Post new topic  Reply to topic  [ 147 posts ]  Go to page 1 2 3 4 510 Next
Author Message
PostPosted: Wed Jul 19, 2017 9:52 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 417
System Features: Rings
======================

Version: 2.8.1
Required Oolite Version: 1.84
Author: cim, Gilberto Agostinho (gsagostinho)
License: CC-BY-SA 3.0

About
=====

This OXP adds some dust rings to a few planets in each galaxy. Whether those rings are traditional gas giant rings or debris rings from industry or long-past battles depends on your planet texture OXP. A shader-supporting graphics card is required, the more recent the better. Older shader-supporting cards may be too slow to render the rings at an adequate framerate.

Version history
===============

23/09/2017 - Version 2.8.1:
- bug in the description text now properly solved, it was still present due to a small oversight (thanks again, Cody).

23/09/2017 - Version 2.8:
- changed description text to "This planet has rings."
- fixed a bug in which the description text appears many times (thanks Cody and Norby).

19/09/2017 - Version 2.7:
- added "use strict"; to scripts which removes some warnings in the log.
- rings are now a little bit more common (1/8 of planets will have them).
- the description of a system will now tell whether it has rings or not (thanks phkb for the help implementing this!).
- close-up grain density now proportional to the colour intensity of the ring lane.
- fixed bug in which Ribior's main station would spawn inside rings (thanks to spara, cim and all others for the suggestions and spara for doing the all hard work for the fix).

27/08/2017 - Version 2.6:
- the sinusoidal functions which create the variations of colour intensity now fade in one by one according to the distance, which solves the Moire pattern problems.
- shading applied at close distances so that the grains look like rocks.

17/08/2017 - Version 2.5:
- fix for a small bug affecting certain cards (wrong type for second argument of pow).

03/08/2017 - Version 2.4:
- change to shader to fix a bug with certain ATI cards.

24/07/2017 - Version 2.3:
- code refactoring.
- rings fade into blue when entering the atmosphere (such as when using PlanetFall).

20/07/2017 - Version 2.2:
- smaller ring bands and grains only visible at closer distance.
- improved the issues with moire pattern, in particular at lower resolutions.

20/07/2017 - Version 2.1:
- the large gaps in the rings are now randomized making each system more unique.
- the colour gradient function is also randomized for more unique rings.
- renamed the effect script.

19/07/2017 - Version 2.0:
- rings now have different relative sizes to the planet.
- they also have different radial length.
- applied a slight yellow tint.
- applied ambient light.
- shadows are darker.
- changed the spawning algorithm which, among other things, make the rings more common.
- ring now uses a colour gradient instead of a texture (which is now only used to generate noise).

Version 1.2:
- use 1.80 features, repackage.

Version 1.1:
- improved ring texture and appearance contributed by ZygoUgo.

Version 1.0:
- initial non-beta release.

Links
=====

Download it via the extension manager in the game.

Elite Wiki: http://wiki.alioth.net/index.php/System_Features_Rings
Bulletin Board thread: http://aegidian.org/bb/viewtopic.php?f=4&t=12544

Screenshots
===========

Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image


Last edited by gsagostinho on Sat Sep 23, 2017 10:02 pm, edited 12 times in total.

Top
   
PostPosted: Thu Jul 20, 2017 8:27 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2469
Location: Finland
Awesome work. 8) 8) 8)


Top
   
PostPosted: Thu Jul 20, 2017 10:15 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 417
Thanks, spara! :D

* * *

I have just uploaded a slightly improved version of this OXP to my Dropbox. Now the large gaps in the rings, as well as the colour gradient function, are more randomized so each system looks even more unique. The lower resolution images here in the forum do not show the rings very well as they create quite a lot of aliasing, so here are some high res screenies: https://www.dropbox.com/sh/hyjoyjflt3gu ... FHYea?dl=0

I would be very interested if anyone is suffering with performance while using this OXP, in particular when comparing to version 1.x by cim. I have just started messing around with GLSL shaders so there is a non-zero chance I am doing something suboptimal.

For testing purposes, if you want rings on every system please backup your Scripts/systemfeatures-rings.js file then replace it with the following:
Code:
this.author      = "cim and gsagostinho"; 
this.copyright   = "(c) 2011-2017 cim and gsagostinho"; 
this.licence = "CC-BY-SA 3.0";
this.version     = "2.1"; 
this.name = "System Features: Rings";

this.systemWillPopulate = function() {
    	system.setPopulator("system-features-rings",
				{
					callback: this._addRing.bind(this),
					coordinates: system.mainPlanet.position,
					priority: 1000
				});
}

this._addRing = function() {		
		var ring = system.addVisualEffect("systemfeatures-rings",system.mainPlanet.position);
		ring.orientation = system.mainPlanet.orientation;
		ring.orientation = ring.orientation.rotate(ring.orientation.vectorRight(),Math.PI/2);

}


Top
   
PostPosted: Thu Jul 20, 2017 11:52 am 
Offline
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12918
Location: Corke's Drift
I run with a low ambient light level - is that why the 'shadow' disappears the rings completely?
I'm not seeing any appreciable performance hit, btw.

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Thu Jul 20, 2017 12:13 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 417
Quote:
I run with a low ambient light level - is that why the 'shadow' disappears the rings completely?
Hi Cody, I also use a lower ambient light level but apparently you use an even lower value than me! :) I think that what is happening is that the rings are not disappearing, but that because the thin bands appear when you are close, you can see the stars from the holes, and since the rings are solid black on your very low amb light configuration, they look just like the regular sky. Could you please make me a test and take a screenshot of the shadow part from a good distance (something like my first screenie in the first post)? From that distance, the ring will be completely solid except for one or two large bands, and so even if it is solid black due to the ambient light it should not show any stars.

If you want to tweak the darkness of the shadow, please take a look on lines 114-116:
Code:
						r *= dp * 0.25; // making shadows darker by multiplying cim's calculations by 0.25
						g *= dp * 0.25;
						b *= dp * 0.25;
This value of 0.25 was added by me to make the shadows darker and match the planet dark side. If you think the rings are too dark, try raising it for all three variables. The equivalent value used by the shadows of version 1.x was dp * 0.25.
Quote:
I'm not seeing any appreciable performance hit, btw.
That's great to know! 8)


Top
   
PostPosted: Thu Jul 20, 2017 12:15 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 417
@Cody Please take a look at this this screenshot and see how the stars are quite visible through the holes in the rings when close to them. So in your case, the rings are being masked by the dark sky.

Image


Top
   
PostPosted: Thu Jul 20, 2017 12:36 pm 
Offline
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12918
Location: Corke's Drift
At distance, no real problem - though dark, the rings still obscure the background stars. Ambient level is 0.025

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Thu Jul 20, 2017 1:02 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5014
No noticeable performance drop on my low-end system. But I see severe moiré patterns, much more intense than in the old version and it is quite jarring, to be honest.
Image
Image
Image


Top
   
PostPosted: Thu Jul 20, 2017 1:05 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 417
Quote:
At distance, no real problem - though dark, the rings still obscure the background stars. Ambient level is 0.025
Ambient level is 0.025?! That's really dark! :shock: :D I use the Realistic Stars OXP which lowers it to 0.1 but you take the cake :)

Anyway, so that's what I was suspecting.Your easiest option would be to raise that value that multiply those three lines I mentioned before. Try raising it from 0.25 to 0.5 or 1.0 and see how it looks. The issue is that the smaller bands are only visible when you get closer to them, so from far away the rings are solid but closer they have holes. Give it a try and let me know how it goes.


Top
   
PostPosted: Thu Jul 20, 2017 1:07 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 417
Quote:
No noticeable performance drop on my low-end system. But I see severe moiré patterns, much more intense than in the old version and it is quite jarring, to be honest.
Could that be because of different resolution? In my system, I had severe moire patterns with the previous version and now the situation is much much better. Do you know what planet is it on these screenshots of yours?


Top
   
PostPosted: Thu Jul 20, 2017 1:23 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5014
Quote:
Do you know what planet is it on these screenshots of yours?
Lave, just after exiting the station. And yes, going to higher resolution (from 800 x 600 to 1440 x 900) changes the situation to somewhat better, but it's still very intense.


Top
   
PostPosted: Thu Jul 20, 2017 1:34 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 417
@another_commander Thanks, I will inspect that.


Top
   
PostPosted: Thu Jul 20, 2017 2:50 pm 
Offline
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12918
Location: Corke's Drift
Yeah, I forgot to mention the more-intense moiré patterns (at my current max resolution of 1280x1024).

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Thu Jul 20, 2017 3:17 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 417
Ok guys, so I did some experiments as well as some research and it seems to me that not much can be done with the current approach to the rings. The Moire patterns appear due to the fact that a row of nearby pixels are oscillating from black to bright in a very small area (ship at a medium-getting-close distance from rings, they just start to become individualized and noisy). When we get closer, things get fine, and far away is also fine. This problem is greatly aggravated by resolution, as the higher resolution a screen has the higher frequency of oscillation of pixels it can handle. So while the problem is perceivable at 1080p, it is nowhere as bad as in 800x600. See here some comparisons (I took the shots both at 1920x1080 and 800x600 in-game, then cropped the 1080p so that resizing it for the forum does not introduce more moire patterns, but each pair of shots is from an identical situation):

Image
Image
Image
Image

I tried tweaking the code so that the smaller bands and the noise would only appear at close distance, but then the whole thing look strange when looking at the ring nearly horizontally:

Image

As for the previous version having less Moire patterns, are you sure about that? Perhaps because it used the texture for the small details made it less susceptible to it, but in my system, I see basically the same amount of moire patterns as before, perhaps even less now, e.g. these are screenshots when this was still a work in progress and in which I only had tweaked the colours and sizes of the rings but not touched the code that produces the holes, noise, texture, etc.: http://aegidian.org/bb/viewtopic.php?f= ... 95#p257661

Anyway, here are a couple of approaches that comes to my mind:

- leaving things as they are :( (though I am still trying to tweak the values to at least minimize the issue)
- making the ring solid no matter the distance. This will make it look good from far and medium distances, but not good at closer distances
- if using transparency would be possible, I could make the rings more transparent the closer one is, so it would look like the ring is made out of very thin dust. I imagine this would look really good, but then we are once again on that issue of transparency... Anyway, this shot below (faked using GIMP) shows what I imagine it could look like:

Image

Or does anyone has some other concrete advices on how to tackle this?


Top
   
PostPosted: Thu Jul 20, 2017 8:40 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Sun Jul 19, 2015 1:09 pm
Posts: 417
Ok, after a lot of tweaking and testing I think I managed to get some better results and virtually eliminate any moire pattern resulting from the bands (holes) in the ring (they are still a little bit present due to the colour gradients, but this is much less noticeable even at very low resolutions). I tweaked a lot the equation that handles the noise and smaller bands, so that it becomes active only at a much nearer distance. This gives the granularity at very close distances while looking better from far away. I tested both at 800 x 600 and 1920 x 1080, please screenshots are here:

https://www.dropbox.com/sh/71b22arsy0fe ... qh1ha?dl=0

So version 2.2 is already uploaded to my Dropbox. I would really appreciate if you guys can give me some more feedback with this one! (and thanks a lot for all the feedback so far with all my OXPs!) :D


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

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider], Yahoo [Bot] and 19 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