BGS - The BackgroundSet

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: BGS - The BackgroundSet

Post by Diziet Sma »

G'day and welcome aboard, D`Ali 8)
D`Ali wrote:

Code: Select all

Windows 6.1.7600  32-bit
...
Vendor: "ATI Technologies Inc.". Renderer: "ATI MOBILITY RADEON X1700 ".
From catalyst control center:
- Direct3D version - 7.14.10.0630
- OpenGL version - 6.14.10.8304

Driver version - 8.561.0.0 from 1.12.2008
:shock:
Ouch.. ancient ATI Laptop drivers from 2008.

You might want to see this thread on how to update to more current graphics drivers.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

Thanks for the info, D`Ali.

Does it occur on every jump or only sometimes or even rarely? If it's reproducable, please, let me know and we can try a few things (e.g. replacing the v1.6 shaders with v1.5.x shaders, etc...).

And Dizzy is right. The driver is really ancient, but should support all necessary extensions (although 6.14.10.8395 seems to fix some things, should be in AMD/ATI's Catalyst 9.1 drivers).
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Re: BGS - The BackgroundSet

Post by another_commander »

D`Ali wrote:

Code: Select all

Opening log for Oolite version 1.77 (x86-32) under Windows 6.1.7600  32-bit at 2013-03-27 23:38:51 +0400. 2 processors detected.
Windows 6.1.7600 means that Service Pack 1 for Windows 7 is not installed. Maybe it is not exactly related to your BGS crashes, but unless there is a good reason not to install, it is generally a good idea to be up to date with service packs on Windows. If you decide to install SP1 and see if it fixes things for you, creating a restore point prior to starting can also be a very good idea.
D`Ali
Poor
Poor
Posts: 7
Joined: Wed Mar 27, 2013 10:43 am

Re: BGS - The BackgroundSet

Post by D`Ali »

I installed latest ATI driver of 8.593.1.0 version (10.2 CCC). Nothing changed.
About SP1 for Windows... I'll try, but i think it would also be useless. Because, for example, game "X3" is work easy. And Oolite addons by Griff - too.

Now, i turn off bgsHyperFX and bgsHyperFXWormhole in BGS-M.js. Now it work as in original game.

If it's not hard - let's try to make these effects on the old engine - v1.5.x shaders. I think it needs to change only the js-files...
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

Ok, let's start.

As first step I've ripped off the more advanced stuff from the v1.6 shader.

Just replace the bgs_hyper.fragment with -> https://www.box.com/s/u0bd8edubys412d4klh8
and enable the jump sequence bgsHyperFX (but not the exit effect bgsHyperFXWormhole).

The texture effect is similiar to the v1.5.x shader.
D`Ali
Poor
Poor
Posts: 7
Joined: Wed Mar 27, 2013 10:43 am

Re: BGS - The BackgroundSet

Post by D`Ali »

It works! Seems to effect the way it should be. Animation appears post the counter down to 0. Exit from wormhole - the center appears oval with the new system.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

Very good.

The behaviour is expected. v1.6 has switched to VisualEffects (introduced in Oolite v1.77) and replaces the jump sequence rings in Oolite. The effect can only be spawned on .shipWillExitWitchspace. The stretching happens because the shader uses a screen aligned quad with no further transformations in the vertex shader.

It is possible to pass the required screen resolution as uniform, although - in my eyes - it would make more sense to add a Oolite specific uniform which holds the screen resolution or at least the aspect ratio. For BGS it is not hard to add this, as the required structures are already available and even the uniform ovSpecials is already passed with a unused .z component which could be filled with the aspect ratio from BGS-M.js.

The changes would look like:

BGS-M.js:

Code: Select all

this.shipWillExitWitchspace = function()
{
	if(!this.bgsHyperFX || player.ship.docked) return;
	system.breakPattern = false;
	var a = worldScripts.Cabal_Common_Overlay.ovAdd({cclov_type:2,cclov_blend:8,cclov_id:"BGSHYPER",cclov_fx:"bgs_hyper",cclov_autoremove:1});
	if(a){
		if(system.isInterstellarSpace) this.bgsHyperControl[1] = 1;
		else this.bgsHyperControl[1] = 0;
		this.bgsHyperControl[2] = oolite.gameSettings.gameWindow.width/oolite.gameSettings.gameWindow.height; // added
		a.shaderVector2 = this.bgsHyperControl;
	}
};
and the new bgs_hyper.vertex:

Code: Select all

uniform vec4 ovSpecials;
varying vec2 vTexCoord;

void main(void)
{
	float asp = clamp(ovSpecials.z,1.0,2.0);
	vec2 s = vec2(1.0,asp);
	vec4 Position = gl_Vertex;
	gl_Position = vec4(Position.xy*s,0.0,1.0);
	Position.x += 0.5;
	Position.y += 0.5;
	vTexCoord = Position.xy;
}
D`Ali
Poor
Poor
Posts: 7
Joined: Wed Mar 27, 2013 10:43 am

Re: BGS - The BackgroundSet

Post by D`Ali »

I made the necessary changes. Everything works the same as the previous time. If I return to the place of the old file "bgs_hyper.vertex", the program crashes again.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

D´Ali wrote:
I made the necessary changes. Everything works the same as the previous time.
Oh, sorry. I forgot to mention that you need to hold the Shift key while starting Oolite. This will clear the cache.
D´Ali wrote:
If I return to the place of the old file "bgs_hyper.vertex", the program crashes again.
This indicates that it's not the shader. Hmm...

I'd think the next step is to try a nighly build (see https://bb.oolite.space/viewtopic.php?f=8&t=6852).
D`Ali
Poor
Poor
Posts: 7
Joined: Wed Mar 27, 2013 10:43 am

Re: BGS - The BackgroundSet

Post by D`Ali »

I hold Shift every programm start.

In nighly build - BGS work the same.

In principle, you can leave everything as it is - play is possible, the effect somehow works...
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

Yes, we could do this - thanks a lot for the valuable test sessions, D`Ali .-)

But there's one last thing we could try (if you like).

I've prepared a new CCL + BGS version where the shader does the scaling in the fragment shader instead. Quite a few other things have been changed in both versions as well - they are a snapshot from development versions, except the shader in BGS and the unfinished SpecialMarkets script in CCL which is only used in Vector.oxp as far as I'm aware of.

CCL1.8_r157 -> https://www.box.com/s/ynx0zc6ysh61trf7ohpr
BGS1.7_r85 -> https://www.box.com/s/f7833t28lse69votluch

A quick overview about the changes can be found -> http://wiki.alioth.net/index.php/User:Svengali
D`Ali
Poor
Poor
Posts: 7
Joined: Wed Mar 27, 2013 10:43 am

Re: BGS - The BackgroundSet

Post by D`Ali »

Sorry, was away. Put new packages - everything works fine.
Thank you for a great work!
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

That's good news. Muchas gracias for testing and feedback, D`Ali.

I'll add the new shaders as optional download (just in case) .-)
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

BGS 1.7 is online.

Changes:
- Handles longer countdowns.
- Added longer chatter pause option (OXPConfig).
- Switched to typeof instead of hasOwnProperty.
- Added checks for player.ship.script properties bgs_engine, bgs_engineUp and bgs_engineDown.
- Added aspect ratio to jump shader.
- Added option for redux shader (OXPConfig).
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: BGS - The BackgroundSet

Post by Diziet Sma »

Svengali wrote:
- Added aspect ratio to jump shader.
Sweet! This should be a big help on my 2560 x 1024 dual-monitor setup! 8)

I like the chatter pause option, too.

(A reminder for the users of Alternate_BGS_customsounds_for_Halsis:
You will need to re-install the halsis.customsounds.plist after updating to BGS 1.7)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Post Reply