Page 1 of 6

[RELEASE] System Features: Sunspots and Rings OXPs

Posted: Wed Sep 19, 2012 9:55 pm
by cim
Now as official releases - sunspots and planetary rings for Oolite 1.77.

Image Image
Download Rings - requires good shader support. Adds rings to 1-4 systems in each galaxy. Improved texture in 1.1 provided by ZygoUgo.

Image
Download Sunspots - requires shader support.

Thanks also to another_commander, Diziet Sma, Eric Walch, El Viejo and Commander McLane for testing and bug fixes.

Re: [Proof of concept] Planetary Rings OXP

Posted: Wed Sep 19, 2012 10:04 pm
by Shipbuilder
cim - This looks great (Something that I'd hoped to see for a while).

Excellent work :wink:

Re: [Proof of concept] Planetary Rings OXP

Posted: Wed Sep 19, 2012 10:32 pm
by Kasero
Looks very nice and promising 8)

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 8:49 am
by JazHaz
Well done. This was something I was thinking about only the other day.

Can you collide with the rings or fly right through them? Going to try anyway! :)

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 9:03 am
by another_commander
I'm getting this error on an Intel HD graphics:

08:29:59.182 [shader.compile.failure]: ***** ERROR: GLSL fragment shader compilation failed for vedemo-rings.fragment:
>>>>> GLSL log:
ERROR: 2:74: 'dot' : no matching overloaded function found - implicit conversion not allowed


08:29:59.182 [shader.load.fullModeFailed]: ----- WARNING: Could not build shader vedemo-rings.vertex/vedemo-rings.fragment in full complexity mode, trying simple mode.
08:29:59.183 [shader.compile.failure]: ***** ERROR: GLSL fragment shader compilation failed for vedemo-rings.fragment:
>>>>> GLSL log:
ERROR: 2:74: 'dot' : no matching overloaded function found - implicit conversion not allowed

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 9:07 am
by JazHaz
another_commander wrote:
Intel HD graphics
Thats your problem right there!! :twisted:

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 9:14 am
by another_commander
Actually the HD is quite a much improved card/drivers system, compared to the quality I was used to from Intel. Now that I have seen what the problem is, it appears that the Intel drivers seem to be just stricter, not necessarily buggy.

Anyway, the solution here is to go to vedemo-rings.fragment, line 74 and change it from

Code: Select all

float dist = dot(uDist, offset);
to

Code: Select all

float dist = dot(vec3(uDist), offset);

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 9:21 am
by JazHaz
JazHaz wrote:
Can you collide with the rings or fly right through them? Going to try anyway! :)
Yes you can fly right through them. If you stop when you enter the plane of the rings, they disappear completely, but reappear if you leave the plane. The rings are 2D in that respect.

It works nicely on my NVIDIA card, with no errors in my log. Here's my screenshots:

Image
Rings Demo 1 by JazHaz, on Flickr

Image
Rings Demo 2 by JazHaz, on Flickr

Image
Rings Demo 3 by JazHaz, on Flickr

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 9:42 am
by cim
another_commander wrote:
Anyway, the solution here is to go to vedemo-rings.fragment, line 74 and change it from

Code: Select all

float dist = dot(uDist, offset);
to

Code: Select all

float dist = dot(vec3(uDist), offset);
Thanks - will fix. The Nvidia card I have is annoyingly lax about even reporting implicit type conversions like that, so I have to get them all correct by eye.

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 10:07 am
by Cody
<grumbles> I can't get trunk to run, so I can't look at the rings... and now the latest nVidia drivers are giving me a small problem... grr!

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 10:10 am
by Rxke
:oops: been very enthusiastic about this in the thread 'screenshots'

this is grrrrrrrrrrrrreat!

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 12:05 pm
by Shipbuilder
I don't know if this would be possible but it would add yet another layer of immersion if their was a chance of sustaining different degrees of damage, or sometimes no damage, if you fly through the rings.

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 1:13 pm
by cim
Collisions themselves would be relatively easy to simulate with a frame callback, since the visible part of the rings takes up a well-defined region of space.

If you wanted to do the same for NPC ships you would need to consider efficiency of collision detection and providing AI support for going around the rings at least some of the time.
El Viejo wrote:
<grumbles> I can't get trunk to run
I have a Win XP/Nvidia combination that I can boot up when I get a bit more time, to see if I can get the same crashes. Can you remember what the revision number of the last trunk version to work for you was?

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 1:47 pm
by Cody
cim wrote:
Can you remember what the revision number of the last trunk version to work for you was?
Heh... there's a question. In a word, no... but it would've been prior to me installing the deployment trial build (Aug 16-17), I think.
First trunk version that I got crashes with (that I can recall) was the nightly v5287.

Re: [Proof of concept] Planetary Rings OXP

Posted: Thu Sep 20, 2012 1:48 pm
by Kaks
cim wrote:
Collisions themselves would be relatively easy to simulate with a frame callback, since the visible part of the rings takes up a well-defined region of space.
or you could put a low density, physically weak real oolite entity in exactly the same place, with a transparent shader as texture. All you'd need then is a script that recreates it every time it's destroyed... ;)