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: another_commander, winston

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16064
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff's normalmapped ship remakes

Post by Cody »

Griff wrote:
edit: hmm, it looks like it's something in my decal applying function....
edit2: specifically this

Code: Select all

decal_TexCoord *= mat2(decal_c, decal_s, -decal_s, decal_c);
I'll hold the driver roll-back for a while, in case you figure something out.
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
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2478
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Griff's normalmapped ship remakes

Post by Griff »

ah, OK I think I have a fix, it doesn't like taking the 'decal_TexCoord' variable, doing the mat2 sums on it then writing the results back directly (the *= in the following line in the shader)

Code: Select all

   decal_TexCoord *= mat2(decal_c, decal_s, -decal_s, decal_c); 
but it seems to be happy if you take an extra step and do the sums on another variable and then write the result back to the original variable in this case called 'DecalRotTemp' :-

Code: Select all

   vec2 DecalRotTemp = decal_TexCoord * mat2(decal_c, decal_s, -decal_s, decal_c);
   decal_TexCoord = DecalRotTemp; 
I'll do a bit more testing then upload some fixes, but if you want to try the fix yourself, in the ship shaders search for

Code: Select all

   decal_TexCoord *= mat2(decal_c, decal_s, -decal_s, decal_c); 
it appears once, in the 'decaliser' bit of the code and only in the main ship shader (not in the engines or gun subentity shader if the oxp has them) and replace with the following two lines:

Code: Select all

   vec2 DecalRotTemp = decal_TexCoord * mat2(decal_c, decal_s, -decal_s, decal_c);
   decal_TexCoord = DecalRotTemp; 
Last edited by Griff on Wed May 28, 2014 10:14 pm, edited 1 time in total.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16064
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff's normalmapped ship remakes

Post by Cody »

Hmm... that doesn't seem to work, I'm afraid.
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
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 »

Griff wrote:
ah, OK I think I have a fix, it doesn't like taking the 'decal_TexCoord' variable, doing the mat2 sums on it then writing the results back directly (the *= in the following line in the shader)

Code: Select all

   decal_TexCoord *= mat2(decal_c, decal_s, -decal_s, decal_c); 
but it seems to be happy if you take an extra step and do the sums on another variable and then write the result back to the original variable in this case called
'DecalRotTemp'

Code: Select all

   vec2 DecalRotTemp = decal_TexCoord * mat2(decal_c, decal_s, -decal_s, decal_c);
   decal_TexCoord = DecalRotTemp; 
I'll do a bit more testing then upload some fixes, but if you want to try the fix yourself, in the ship shaders search for

Code: Select all

   decal_TexCoord *= mat2(decal_c, decal_s, -decal_s, decal_c); 
it appears once, in the 'decaliser' bit of the code and only in the main ship shader (not in the engines or gun subentity shader if the oxp has them) and replace with the following two lines:

Code: Select all

   vec2 DecalRotTemp = decal_TexCoord * mat2(decal_c, decal_s, -decal_s, decal_c);
   decal_TexCoord = DecalRotTemp; 
Ok, tried your fix on my multidecal_cobraIII_player.oxp and it worked fine on that one.
Haven't tried going through the rest...

Edit: Patched the griff_cobra_mk3_player.fragment shader as well and it worked fine here.

@Griff, are you working on a fix for the resource set?
@Cody, what file did you try to patch?
Last edited by Gimi on Wed May 28, 2014 9:38 pm, edited 1 time in total.
"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: 16064
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff's normalmapped ship remakes

Post by Cody »

Gimi wrote:
Ok, tried your fix on my multidecal_cobraIII_player.oxp and it worked fine on that one.
Oh, I didn't think to try my late-model multi-decal Cobra III. <opens text editor>
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
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 »

Cody wrote:
Gimi wrote:
Ok, tried your fix on my multidecal_cobraIII_player.oxp and it worked fine on that one.
Oh, I didn't think to try my late-model multi-decal Cobra III. <opens text editor>
<Grabs a beer and waits for Cody to post results...>
"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: 16064
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff's normalmapped ship remakes

Post by Cody »

Gimi wrote:
<Grabs a beer and waits for Cody to post results...>
The man from Del Monte, he say Yes! I had to edit several fragments in the late-model OXP, but it looks fine now, with no errors.

I wonder why it wouldn't work with Griff's newer Cobra though? User error, probably!


I note that those new drivers have a Shader Cache thingy - something I've not seen before in the Nvidia control panel.
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
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2478
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Griff's normalmapped ship remakes

Post by Griff »

Cody wrote:
I wonder why it wouldn't work with Griff's newer Cobra though? User error, probably!
no I don't think it's your fault, I think I've got quite a few different versions of these oxp's around the place in various states of updated-ness which have even more shader errors in than the one that's just shown up now in the new Nvidia driver!
I've started uploading fixed versions into the two folders over at box Core shipset for Oolite v1.77 (and higher) and Core Shipset for Oolite v1.79 (Trunk) - https://app.box.com/shared/rpkms25cc9
updated OXP's are:-

Code: Select all

Griff_Worm_v1.02.1.zip
Griff_Adder_v1.04.1.zip
Griff_Anaconda_v1.04.1.zip
Griff_Asp_v1.04.1.zip
Griff_Boa_Mk2_v1.04.1.zip
Griff_Boa_v1.04.1.zip
Griff_Cobra_Mk1_v1.04.1.zip
Griff_Cobra_Mk3_v1.04.1.zip
Griff_Ferdelance_v1.04.1.zip
Griff_Gecko_v1.04.1.zip
Griff_Krait_v1.04.1.zip
Griff_Mamba_v1.04.1.zip
Griff_Mamba2013_v1.04.1.zip
Griff_Python_v1.04.1.zip
Griff_Shuttle_v1.02.1.zip
Griff_Sidewinder_v1.04.1.zip
Griff_Transporter_v1.03.1.zip
Griff_Viper_v1.02.1.zip
(all the ones with decals in basically). I haven't updated the bundle OXP over at Cmdr Cheyd's deephorizons site, i'll get that sorted soon :D and the other standalone oxp's too - bug, gnat, new viper remake etc
Last edited by Griff on Wed May 28, 2014 10:12 pm, edited 1 time in total.
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 »

Cody wrote:
Gimi wrote:
<Grabs a beer and waits for Cody to post results...>
The man from Del Monte, he say Yes! I had to edit several fragments in the late-model OXP, but it looks fine now, with no errors.
Yes, great, we are getting somewhere.
Cody wrote:
I wonder why it wouldn't work with Griff's newer Cobra though? User error, probably!
Which OXP exactly?
Cody wrote:
I note that those new drivers have a Shader Cache thingy - something I've not seen before in the Nvidia control panel.
I haven't really dug into the nVidia settings, so never noticed any changes. I do notice a better performance with these drivers though, so I'm reluctant to roll back...
"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: 16064
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff's normalmapped ship remakes

Post by Cody »

Shader Cache - reduce CPU usage by saving compiled shaders to a disk cache.
I've enabled it anyway.
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: 271
Joined: Thu Jan 01, 2009 9:45 am

Re: Griff's normalmapped ship remakes

Post by DGill »

I seem to have a problem with Griff_Ferdelance_v1.04.1oxp

shipdata has :

"griff_ferdelance2013-NPC" =
{
like_ship = "oolite_template_ferdelance";

but oolite_template_ferdelance does not seem to be defined in the oxp - is there another oxp I need to install?
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16064
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Griff's normalmapped ship remakes

Post by Cody »

I think that's normal for Griff's ships (and others?) - it should work as is.
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: 271
Joined: Thu Jan 01, 2009 9:45 am

Re: Griff's normalmapped ship remakes

Post by DGill »

Cody wrote:
I think that's normal for Griff's ships (and others?) - it should work as is.
Ok, thanks. It must be something I've done as after installing the ferdelance the log file gives:

14:11:07.097 [shipData.merge.failed]: ***** ERROR: one or more shipdata.plist entries have like_ship references that cannot be resolved

I'll delete the file and see if I can spot what is happening.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Griff's normalmapped ship remakes

Post by cim »

"oolite_template_ferdelance" is defined in the core Oolite files ... but only in 1.79, not in 1.77.1.
DGill
---- E L I T E ----
---- E L I T E ----
Posts: 271
Joined: Thu Jan 01, 2009 9:45 am

Re: Griff's normalmapped ship remakes

Post by DGill »

cim wrote:
"oolite_template_ferdelance" is defined in the core Oolite files ... but only in 1.79, not in 1.77.1.
I'm using development version 1.79.0.5742-140517-f739348

I installed Griff's core shipset files for v1.79(trunk) updated may 28

All ships seem to work ok except ferdalance

13:56:24.147 [files.notFound]: GLSL ERROR: failed to find fragment program griff_ferdelance_new2013-PLAYER.fragment.
13:56:24.154 [files.notFound]: ----- WARNING: Could not find texture file "Hull".
13:56:24.169 [files.notFound]: GLSL ERROR: failed to find fragment program griff_ferdelance_new2013-PLAYER.fragment.
13:56:24.176 [files.notFound]: ----- WARNING: Could not find texture file "Hull".
13:56:24.192 [files.notFound]: GLSL ERROR: failed to find fragment program griff_ferdelance_new2013-PLAYER.fragment.
13:56:24.199 [files.notFound]: ----- WARNING: Could not find texture file "Hull".
13:56:24.214 [files.notFound]: GLSL ERROR: failed to find fragment program griff_ferdelance_new2013-PLAYER.fragment.
13:56:24.221 [files.notFound]: ----- WARNING: Could not find texture file "Hull".
13:56:24.237 [files.notFound]: GLSL ERROR: failed to find fragment program griff_ferdelance_new2013-PLAYER.fragment.
13:56:24.244 [files.notFound]: ----- WARNING: Could not find texture file "Hull".
Post Reply