BGS - The BackgroundSet
Moderators: winston, another_commander
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: BGS - The BackgroundSet
Tricky is missing and not responding to PMs so I uploaded BGS into my account in oxz admin. If this mean that I am the new maintainer then I am happy to accept this position, but no problem if anybody wants to get it back.
Based on the reactions I think the old effect stay as default and the new ones (both Svengali's simple texture and my harsh) can be available in OXPConfig.
Based on the reactions I think the old effect stay as default and the new ones (both Svengali's simple texture and my harsh) can be available in OXPConfig.
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: BGS - The BackgroundSet
Tricky probably has his head hooked into ED - perhaps I'll try and attract his attention.
<nods> Seems sensible.Norby wrote:Based on the reactions I think the old effect stay as default and the new ones (both Svengali's simple texture and my harsh) can be available in OXPConfig.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
Re: BGS - The BackgroundSet
*grins* The joys of design decisions.Norby wrote:Based on the reactions...
Just as sidenote. It's easily possible to use
atan(y_over_x)
instead of sqrt
(see pics 1-4). The pics 1-3 are showing sqrt
(standard jump, galactic jump and misjump), pic 4 atan(y_over_x)
. Pic 5 shows sqrt
with a changed hexagon algorithm and pic 6 shows the texture using a alpha channel which is used as multiplier for discarding the change of the framebuffer.Re: BGS - The BackgroundSet
I don't know if it helps, but there's some code in the planet shader that approximately calculates atan:Svengali wrote:The goal for a new shader was better performance, specially when using older gfx-cards. Usingsqrt
instead ofatan2
gets rid of 13 ALU (oratan(y_over_x)
7 ALU) and lots of instructions, but it has consequences (hexagons and distribution of stars). It's a 'either - or' choice, not a problem - hence the question about OolitesOO_REDUCED_COMPLEXITY
(which is gone it seems).
Code: Select all
/* Approximation of atan(y/z) with quadrant rectification, scaled to -0.5..0.5 instead of -pi..pi.
It is assumed that the values are in range. You are not expected to understand this.
*/
float TexLongitude(float z, float y)
{
const float k2Pi = 6.283185307179586;
const float kMagic = 0.2732395447351; // (4 - pi) / pi
float ratio = z / y;
float r1 = 1.0 / ((ratio + kMagic / ratio) * k2Pi); // Result when abs(z) >= abs(x).
float r2 = 0.25 * sign(ratio) - ratio / ((1.0 + kMagic * ratio * ratio) * k2Pi); // Result when abs(z) <= abs(x).
float result = (abs(ratio) > 1.0) ? r1 : r2;
// Adjust for sector.
// Equivalent to (z < 0.0) ? ((y > 0.0) ? 0.75 : -0.25) : 0.25.
// Well, technically not equivalent for z < 0, y = 0, but you'll very rarely see that exact case.
return result + step(z, 0.0) * sign(y) * 0.5 + 0.25;
}
No problem!Edit: Forgot to say - thanks kanthoney .-)
Re: BGS - The BackgroundSet
Yes. There were very few graphics cards which could cope with shaders at all but not with the things excluded in OO_REDUCED_COMPLEXITY, so if you used OO_REDUCED_COMPLEXITY to tune down the heavy shaders - things like the BGS hyperspace effects and the planetary rings - you'd end up also requiring users to exclude a lot of other things.Svengali wrote:hence the question about OolitesOO_REDUCED_COMPLEXITY
(which is gone it seems).
Another option, since it's a transient effect: check whether graphics are set to "shaders on" or "extra detail", and use the old effect as default in "extra detail" and the new effect as default in "shaders on".Norby wrote:Based on the reactions I think the old effect stay as default and the new ones (both Svengali's simple texture and my harsh) can be available in OXPConfig.
Re: BGS - The BackgroundSet
The final one? -> https://app.box.com/s/5nf7wj4bghftsovw5fdhpnn2iay4l6uc (29.3 KB)
Suggested input parameters (ovSpecials x and y), set through
0,0 - Standard
0,3 - Misjump
2,0 - Galactic jump
If you want a more colorful thing:
3,-3 - Deep Blue
-1.4,4.8 - Orange
-1.8,-2.2 - Green
Suggested input parameters (ovSpecials x and y), set through
.bgsHyperControl
in BGS-M.js
:0,0 - Standard
0,3 - Misjump
2,0 - Galactic jump
If you want a more colorful thing:
3,-3 - Deep Blue
-1.4,4.8 - Orange
-1.8,-2.2 - Green
Thanks .-) Thekanthoney wrote:I don't know if it helps, but there's some code in the planet shader that approximately calculates atan:
TexLongitude
is fast, but asin(dot(normalize(cen),vec2(0.0,-1.0)))
is a tick faster and uses less registers and instructions. I'm not so good at these things and probably I'm doing it all overly complicated .-) Ok. Thanks cim.cim wrote:Yes.Svengali wrote:hence the question about OolitesOO_REDUCED_COMPLEXITY
(which is gone it seems).
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: BGS - The BackgroundSet
Hmm...Svengali wrote:The final one?
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
Re: BGS - The BackgroundSet
HurrayCody wrote:
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: BGS - The BackgroundSet
Thank you for the heads up. I was dabbling with the BGS shaders, and struggled (SIC!) to a similar conclusion.Svengali wrote:Blending is not supported by Oolite for AddOns. The alpha channel is used for brightness.
One last question: would it be hard to replace the black rectangle of death of the docking transition in BGS with the (say) manifest image background?
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: BGS - The BackgroundSet
I set these in the first line of the screenshots below:
3,-3 - Standard jump (blue)
2,0 - Galactic jump (purple)
0,3 - Misjump (red)
I tried with the old "lightning" texture in the second line, this is much closer to the original effect in the third line.
So I think the second line should be the new default in "shaders on" mode, the third line in "extra detail" mode and the first will be available in OXPConfig.
Edit: alternative idea is moved to my next post.
3,-3 - Standard jump (blue)
2,0 - Galactic jump (purple)
0,3 - Misjump (red)
I tried with the old "lightning" texture in the second line, this is much closer to the original effect in the third line.
So I think the second line should be the new default in "shaders on" mode, the third line in "extra detail" mode and the first will be available in OXPConfig.
Edit: alternative idea is moved to my next post.
Last edited by Norby on Fri May 29, 2015 11:51 pm, edited 2 times in total.
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: BGS - The BackgroundSet
My machine is set to extra detail, and I don't much like the two orange ones - blue and purple are fine, but please not orange.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: BGS - The BackgroundSet
This is red, not orange, but I can set it to more red. You can see below when set to 3 (the previous), 4, and 5. I think 4 is enough.
I have an alternative idea to avoid OXPConfig and show variations: the effect can depend on the distance of the jump to show different distorsions in various speeds caused by the nonlinear distance vs. travel time formula. Galaxy jump effects can be different also based on the number of galaxy assuming different distances.
I have an alternative idea to avoid OXPConfig and show variations: the effect can depend on the distance of the jump to show different distorsions in various speeds caused by the nonlinear distance vs. travel time formula. Galaxy jump effects can be different also based on the number of galaxy assuming different distances.
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: BGS - The BackgroundSet
Guess I'll have to start using OXPConfig.
Centre for standard jump, top left for gal jump, and bottom right for misjump - but that's only my preference.
Centre for standard jump, top left for gal jump, and bottom right for misjump - but that's only my preference.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- Getafix
- Quite Grand Sub-Admiral
- Posts: 979
- Joined: Tue Apr 01, 2008 12:55 pm
- Location: A small ice asteroid, orbiting Oresrati in Galaxy 8 (a.k.a. northwest Armorica).
- Contact:
Re: BGS - The BackgroundSet
No it's not!Cody wrote:...but that's only my preference.
"Any sufficiently advanced information is indistinguishable from noise." [Newman, Lachmann, Moore]
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: BGS - The BackgroundSet
Innate good taste - very few have it!Getafix wrote:No it's not!Cody wrote:...but that's only my preference.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!