Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Griff's normalmapped ship remakes

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

Moderators: winston, another_commander

User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Griff's normalmapped ship remakes

Post by Griff »

I've made a few small cosmetic changes to the alloys and wreckage oxp
1. trimmed down the number of wreckage objects from 10 to the 6 best ones
2. fixed a role mistake in the shipdata.plist which meant that only one type of scoopable alloy model was being spawned
3. added a random spin & scale effect in the 'wreckage' vertex shader
4. modified the alloy & wreckage fragment shaders to add in a new animated 'burning' glow map. There's a quicktime .mov of the shader running in rendermonkey here
https://www.box.com/s/0e92bff9fda65f2525f0
The glow texture is scrolled over the surface with an distance offset taken from a swirly greyscale image in one of the alpha channels, makes for a passable rippling flame effect, although (with a different colour pallette) it probably looks more like the bubbles in a pint of guinness swirling around as it's being poured)
NorthenderPNE
Deadly
Deadly
Posts: 132
Joined: Tue Jul 25, 2006 2:32 pm

Re: Griff's normalmapped ship remakes

Post by NorthenderPNE »

Wow Griff, you never cease to amaze me. Awesome!!!!! :wink:
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: Griff's normalmapped ship remakes

Post by JazHaz »

Griff wrote:
I've made a few small cosmetic changes to the alloys and wreckage oxp
There's a little typo in the Readme - the second date seems to be out of order...:
Griff 09 July 2012
09 July 2012 - changed wreckage object. Added random spin and scale to wreckage in vertex shader
21 July - Fixed broken distance check in script, added new random velocity script setting to the spark cloud.
25 June - Added Thargoid's fix for 'player ship not exisiting' log error in the distance check part of the "griff_spawn_wreckage.js" script and the missing AI's folder
19 June - Added definitions for default Alloys & wreckage models into this oxp's shipdata-overrides.plist to stop them spawning in-game and fixed missing wreckage textures
18 June: Added a distance check to the spawn scripts - junk & debris only gets spawned if the explosion happens near the player - Massive thanks to Svengali & Thargoid on the Oolite forum for the idea and the extra script work!
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
NorthenderPNE
Deadly
Deadly
Posts: 132
Joined: Tue Jul 25, 2006 2:32 pm

Re: Griff's normalmapped ship remakes

Post by NorthenderPNE »

JazHaz wrote:
There's a little typo in the Readme - the second date seems to be out of order...:
Griff 09 July 2012
09 July 2012 - changed wreckage object. Added random spin and scale to wreckage in vertex shader
Griff 21 July 2011 <== Deleted line.
21 July - Fixed broken distance check in script, added new random velocity script setting to the spark cloud.
25 June - Added Thargoid's fix for 'player ship not exisiting' log error in the distance check part of the "griff_spawn_wreckage.js" script and the missing AI's folder
19 June - Added definitions for default Alloys & wreckage models into this oxp's shipdata-overrides.plist to stop them spawning in-game and fixed missing wreckage textures
18 June: Added a distance check to the spawn scripts - junk & debris only gets spawned if the explosion happens near the player - Massive thanks to Svengali & Thargoid on the Oolite forum for the idea and the extra script work!
It's from 2011 JazHaz, Griff just removed the line stating that. Just checked the old Readme. :wink:
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Griff's normalmapped ship remakes

Post by Griff »

I've made a few changes to the standalone Anaconda oxp - added a spec intensity map, some more lines and greeblies on the hull and made some changes to the shaders so they use the light calculating functions from Oolite's default shaders
Image
Hopefully it's all working, had some weird problems with the decals fading away when the ship went into shadow! bit weird :lol: took hours to fix, turned out i'd got my texture names mixed up and the decal mix was combining the wrong maps
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: Griff's normalmapped ship remakes

Post by Gimi »

Brilliant work as always Griff. Give us a word when it's incorporated into the all in one, would you please.

Thanks.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16073
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff's normalmapped ship remakes

Post by Cody »

Yeah... nice work, Griff. I'll install that, suppress the shipset version (hopefully), and go looking for one.
<re-calibrates his joystick for the umpteenth time>
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!
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16073
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff's normalmapped ship remakes

Post by Cody »

Hmm... either I've done something wrong (possible, but I don't think so), or the new Anaconda (npc) is flashing on and off like a Belisha beacon.

No errors in the log - can anyone confirm this?
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!
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 281
Joined: Thu Jan 01, 2009 9:45 am

Re: Griff's normalmapped ship remakes

Post by DGill »

El Viejo wrote:
Hmm... either I've done something wrong (possible, but I don't think so), or the new Anaconda (npc) is flashing on and off like a Belisha beacon.

No errors in the log - can anyone confirm this?
Works OK for me - very nice Griff
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Griff's normalmapped ship remakes

Post by Griff »

El Viejo wrote:
Hmm... either I've done something wrong (possible, but I don't think so), or the new Anaconda (npc) is flashing on and off like a Belisha beacon.
No errors in the log - can anyone confirm this?
I saw this during testing - there's still some shipdata.plist references to the old version of the anaconda in your game somewhere - the little orange blinking lights texture got shifted into a new texture map, if you have an anaconda looking for this texture in the wrong place it won't find it and the whole hull blinks on/off instead of in just a few small spots
the NPC anacondas need these shader definitions:-
Edit: oops, just noticed a bug, line 211 in shipdata.plist 'PaintColor' should be uPaintColor I'll fix it in the oxp and in the code snippet below

Code: Select all

	shaders = 
		{ 
            "griff_anaconda_diffuse.png" = 
			{ 
                vertex_shader = "griff_normalmap_ships.vertex"; 
                fragment_shader = "griff_anaconda_b_channel_decals.fragment"; 
                textures = 
						(
							"griff_anaconda_diffuse.png", 
							"griff_anaconda_normal.png",
							"griff_anaconda_hull_effects.png",
							{name = "griff_decals_set1.png"; repeat_s = "yes";}
						);
				uniforms =
						{
						uDiffuseMap = { type = texture; value = 0; };
						uNormalMap = { type = texture; value = 1; };
						uEffectsMap = { type = texture; value = 2; };
						uDecalMap = { type = texture; value = 3; };	
						uTime = "timeElapsedSinceSpawn";
						uNearlyDead = "throwingSparks";	
						uIsHostile = "hasHostileTarget";						
						uHullHeatLevel = "hullHeatLevel";
						uPaintColor = {type = "randomUnitVector"; scale = 0.25;};
						uDecalColor =  {type = "randomUnitVector"; scale = 0.5;};
						uDecalSelect = "entityPersonality";	
						}; 	
			}; 
		};
some of the uniform names have changed and the third texture in the list ("griff_anaconda_hull_effects.png") is a new one - was called something like "griff_anaconda_eng_gun_effects" or something like that.
I've updated the oxp and started numbering it, i have a feeling it may whizz up the version numbers like my other oxps do :lol:
User avatar
Tichy
---- E L I T E ----
---- E L I T E ----
Posts: 345
Joined: Wed Jul 11, 2012 5:48 pm

Re: Griff's normalmapped ship remakes

Post by Tichy »

I noticed that my log is full of these errors and warnings, generated by the alloys and wreckage oxp. However, in game, everything looks fine.

Code: Select all

00:38:20.363 [shader.load.fullModeFailed]: ----- WARNING: Could not build shader griff_spark.vertex/griff_wreckage.fragment in full complexity mode, trying simple mode.
00:38:20.372 [shader.load.fallbackSuccess]: Simple mode fallback successful.
  00:38:20.381 [shader.link.failure]: ***** ERROR: GLSL shader program linking failed for griff_spark.vertex/griff_wreckage.fragment:
>>>>> GLSL log:
error: fragment shader varying scrollvTexCoord not written by vertex shader
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Griff's normalmapped ship remakes

Post by Griff »

ah, sorry about that - this looks like either a bug in one of the shaders or i've forgotten to update which shader is used where in the shipdata.plist and there's an object using the wrong combination of vertex and fragment shader - i'll have a look at it this evening and post up a fix :D
User avatar
Tichy
---- E L I T E ----
---- E L I T E ----
Posts: 345
Joined: Wed Jul 11, 2012 5:48 pm

Re: Griff's normalmapped ship remakes

Post by Tichy »

Thank you! :D
I was worried that it might be a fault of my video card or driver.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Griff's normalmapped ship remakes

Post by Griff »

I think this is fixed now in the version of the oxp i've just uploaded to box, i'd changed one of the fragment shaders in the last update to add a scrolling heat effect to it and forgotten that this shader was shared by a few other objects in the oxp, which as you noticed in the logs, got a bit confused by all these new references to scrolling texture co-ordinates and new fangled whatnot that they weren't expecting
User avatar
Tichy
---- E L I T E ----
---- E L I T E ----
Posts: 345
Joined: Wed Jul 11, 2012 5:48 pm

Re: Griff's normalmapped ship remakes

Post by Tichy »

Yes! Thanks :)
Post Reply