Fixing “alphaGen lightingSpecular keyword not supported”

Ask questions about mapping in general, and show off your in-progress work.
User avatar
illwieckz
Project Head
Posts: 473
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Fixing “alphaGen lightingSpecular keyword not supported”

Postby illwieckz » Fri Feb 27, 2015 7:26 pm UTC

Hi, some old map I try to port get this kind of message:

Code: Select all

WARNING: alphaGen lightingSpecular keyword not supported in shader 'textures/transit/stannum_wall_shinybluemetal1'
WARNING: alphaGen lightingSpecular keyword not supported in shader 'textures/transit/stannum_tin'


And some textures are overbrighten, it seems related:

Image
Image

How can I fix that, or workaround that?

Edit, the shader are:

Code: Select all

textures/transit/stannum_tin
{
   qer_editorimage textures/transit/tin
   {
      rgbGen identity
      map $lightmap
   }
   {
      map textures/transit/tin
      blendFunc GL_DST_COLOR GL_SRC_ALPHA
      rgbGen identity
      alphaGen lightingSpecular
   }
}

Code: Select all

textures/transit/stannum_wall_shinybluemetal1
{
   {
      map $lightmap
      rgbgen identity     
   }
   {
      map textures/transit/stannum_wall_shinybluemetal1
      blendFunc GL_DST_COLOR GL_SRC_ALPHA
      rgbGen identity
      alphaGen lightingSpecular
   }         
}
User avatar
Viech
Project Head
Posts: 2139
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: Fixing “alphaGen lightingSpecular keyword not supported”

Postby Viech » Fri Feb 27, 2015 10:26 pm UTC

I wouldn't know, but somewhere in the XreaL shader manual there should be a solution. :wink:
Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction
User avatar
illwieckz
Project Head
Posts: 473
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: Fixing “alphaGen lightingSpecular keyword not supported”

Postby illwieckz » Sat Feb 28, 2015 8:33 pm UTC

Well, I don't found how to do, the XreaL shader manuel list a specularMap keyword but I don't know how to use it. :confused:

But if I replace that:

Code: Select all

textures/transit/stannum_tin
{
   qer_editorimage textures/transit/tin
   {
      rgbGen identity
      map $lightmap
   }
   {
      map textures/transit/tin
      blendFunc GL_DST_COLOR GL_SRC_ALPHA
      rgbGen identity
      alphaGen lightingSpecular
   }
}


By that:

Code: Select all

textures/transit/stannum_tin
{
   diffuseMap textures/transit/tin
}


I lose the shiny effect but the map is playable:

Image
Image

So if I do not manage to port these unsupported shaders, perhaps I will release the maps with this bad workaround.
User avatar
illwieckz
Project Head
Posts: 473
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: Fixing “alphaGen lightingSpecular keyword not supported”

Postby illwieckz » Wed Mar 04, 2015 4:28 pm UTC

Tip for people porting maps: if the object is a transparent object (mirror, glass), does not use “diffuseMap” as a workaround (or the object will be mat), keep the whole shader and comment out only the line “alphaGen lightingSpecular”, it's a an acceptable workaround in many cases.

Also, in many case you can use “alphaGen const 0.7” as a workaround to “alphaGen portal 256”, it's only a workaround (you lose functionnalities), but the map will probably be playable with this kind of trick. For example on ancient-remains map, the grass must disappear in front of the the player while he walks. But with this broken line the grass does not appear at all. If you only comment out this line, the grass appears with some weird effect (grass textures from behind appears in front of). If you use “alphaGen const 0.7”, the grass appears, is a little transparent (so you see in front of you), and the more grass there is the more opaque it is, which is acceptable.

You can also use this trick on mirrors (with a lower value) when there is dirty textures on them that must not be opaque !

These tricks are only workaround, you lose functionalities ! So if someone has an idea to correctly port these unsupported shader from Q3 shader to XreaL shader, feel free to explain!
:grin:

Return to “Level Design”

Who is online

Users browsing this forum: No registered users and 2 guests