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: 2296
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Re: Griff's normalmapped ship remakes

Post by Griff » Mon Jul 09, 2012 9:41 pm

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)

User avatar
NorthenderPNE
Dangerous
Dangerous
Posts: 106
Joined: Tue Jul 25, 2006 2:32 pm
Location: England

Re: Griff's normalmapped ship remakes

Post by NorthenderPNE » Mon Jul 09, 2012 10:42 pm

Wow Griff, you never cease to amaze me. Awesome!!!!! :wink:
Intel Core i7 6700k
STRIX Z270G
16GB DDR4
Samsung 840 Evo *2
Western Digital 4TB
Seagate 2TB *2
ASUS GTX 1080ti
Win' 10 Ent' x64

** Current Oolite rating - DANGEROUS **

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 » Wed Jul 11, 2012 2:15 am

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)!

User avatar
NorthenderPNE
Dangerous
Dangerous
Posts: 106
Joined: Tue Jul 25, 2006 2:32 pm
Location: England

Re: Griff's normalmapped ship remakes

Post by NorthenderPNE » Wed Jul 11, 2012 9:16 am

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:
Intel Core i7 6700k
STRIX Z270G
16GB DDR4
Samsung 840 Evo *2
Western Digital 4TB
Seagate 2TB *2
ASUS GTX 1080ti
Win' 10 Ent' x64

** Current Oolite rating - DANGEROUS **

User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2296
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Re: Griff's normalmapped ship remakes

Post by Griff » Sun Jul 22, 2012 8:45 pm

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
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: Griff's normalmapped ship remakes

Post by Gimi » Sun Jul 22, 2012 9:43 pm

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: 13567
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: Griff's normalmapped ship remakes

Post by Cody » Sun Jul 22, 2012 9:58 pm

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>

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13567
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Re: Griff's normalmapped ship remakes

Post by Cody » Sun Jul 22, 2012 10:49 pm

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?

DGill
Deadly
Deadly
Posts: 173
Joined: Thu Jan 01, 2009 9:45 am

Re: Griff's normalmapped ship remakes

Post by DGill » Mon Jul 23, 2012 7:20 am

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: 2296
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Re: Griff's normalmapped ship remakes

Post by Griff » Mon Jul 23, 2012 7:30 am

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 » Fri Jul 27, 2012 10:53 am

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: 2296
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Re: Griff's normalmapped ship remakes

Post by Griff » Fri Jul 27, 2012 11:27 am

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 » Fri Jul 27, 2012 12:04 pm

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: 2296
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Re: Griff's normalmapped ship remakes

Post by Griff » Fri Jul 27, 2012 6:30 pm

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 » Fri Jul 27, 2012 7:54 pm

Yes! Thanks :)

Post Reply