Can speculaty maps be used on shadeless material in BGE?

In the game engine I typically bake the textures and shadows. Then set the material to shadeless so I won’t use real time lighting in the game. But as soon as I set it to shadleless any sign of specularity disappears. Can I use a specular map to restore the shinyness? Or can you bake the specular right into the full render? Or do you have to apply the specular map to another texslot and then mix it in some special way.

I haven’t tried this but instead of turning them shadeless try messing with the emit setting. I’m pretty sure that should keep the specularity :). If not, there’s another way, I think its GLSL only though. Just create an image with a black background and a faded white circle in the center. Then, add that to a slot in the texture area, setting its mapping to reflection and texture blend to add. That should work, hopefully my instructions are clear enough :slight_smile:

I’ll have to try that, but it sounds like that wouldn’t be a specular map of the actual texture thats applied on the obj. But kind of a way to fake it?

the shadeless option does what it sounds, it completely removes all shading (diffuse, normal, and specular), from the object and just uses the colormap (that’s why it’s called 'shadeless, specularity is essentially shading and thus gets removed).

However, with node materials and GLSL, you can theoretically mix a shadeless material with another that’s completely black other than the specularity and mix it that way.

The point of the baking is to eliminate real time lights. So you set things to shadeless to speed up the game. And the newly baked diffuse map with the shading baked in shows up all right that way.Is there a way to bake the specularity into that difuse map?

How are you suppose to use a specularity map in BGE. If your in GLSL mode with the real time lights on you can see the specularity automaticly already. you can adjust it with the material sliders. So then whats the point of making another specularity map? I thought it must be so you can still get some specularity when your not using real time light. Just trying to wrap my head around this.

One of the reasons why you can’t really bake specularity into the colormap is because it’s a view-dependent effect, if you baked the specuality from an angle where the highlight was at the edge of an object, the baked result would look good from that angle, that until you move around it and notice the highlight not moving and reflecting the position of the lamp.

In fact, I don’t know of any games that make specular into a game environment (it’s always diffuse), because of what I mentioned above.

Copy that, Thanks for the replys.

So as people have mentioned, you can’t have specularity map and shadeless. What they haven’t told you is the proper way to do it:

You need 4 texture layers (ideally):

  1. Texture layer
  2. Lighting layer
  3. Specularity layer
  4. Bump layer

The texture layer is the diffuse map, and is set to texture-blend-mode ‘mix’ (the default)
The lighting layer is the baked AO and lighting, and is set to texture-blend-mode ‘Multiply’ or ‘Linear Light’ or ‘Soft Light’
The specularity and bump layer are dealt with the normal way for such things. (ie set to the correct channel of influence)

Sdfgeoff, When you say the “correct channel of influence” for the normal map, i think your talking about setting it to normal and then turning the color down to zero to see the normal effect. But I don’t know what the correct channel of influence is for the specular map. could you elaberate?

Instead of turning colour down to zero for the normal map, just uncheck the box!
And for the spec map, check the box labeled specular. You may also have to check the box ‘RGB to intensity.’ Unfortunately I forgot to include it, but this should make things somewhat clear

I’ve highlighted the differences from the default setting.
(Sorry for the bad handwriting)

Interesting question… I have tried to come up with a shadeless material and specularity. It is not perfect but it seems to work.
You have some dynamic specular variation based on the angle.
I have mixed a spec map via the normal angle with the shadeless material.

Here is an example. This is a completely shadeless material.


FakeSpec.blend (1.04 MB)

Just tried the download from ndee. But I don’t see speculaity, I just see some white surface texture colorations. But in the 3D window of the game window i don’t see any shinyness. I tried making it rotate in the BGE and stil I don’t see anything. If I enable tex slot 2, I see all kinds of black and white spotyness.

One kind of crappy way is to to make a high contrast black and white of the texture and put it in tex slot 2 and bring up the color sliider till some of the white from the high contrast areas shows through. But of course thats not any kind of real specularity.

But thanks for the help ndee and sdfgeoff.