I am not skillful enough, so I thought I might suggest a useful feature for blender, hoping that some coder who is, might like the idea or the challenge…
At the moment, you can bake all kinds of maps in blender: AO, normals, textures, displacement and full render.
But there is no possibility to bake specular maps ;(
It would be awesome to have this feature, because if you have a model with several different materials you have already set the specular values… but you can’t transfer them to a single map to be used in an external game engine.
I guess there is no solution to this problem right now, so a script that could be integrated into the blender trunk later would be necessary.
Is there someone interested in this feature? Or am I missing sth?
What do you think?
(Sorry, I really can’t solve this problem. I try to contribute to the blender community in other ways possible; compatible with my skills. So in this matter I can only ask kindly, hoping the best)
PS: I know that one can use the AO map as a starting point for a specular map, but it would still ignore the available spec-settings that are already defined in the material settings. So that wouldn’t be the answer to the problem…
I think the reason for why it’s not possible to bake specular maps is the same as why you cannot bake mirror maps. Both specularity and mirror are dependent on view. Therefore it is not possible to produce a map that would work in all cases (it would work in just that one).
If someone knows a software that can bake either mirror or specular maps, let me know…
Yeah, as BeBraw said… specularity if it’s baked would only look right with the camera in 1 specific position/orientation. And then baking becomes a mute point. It’s the nature of the beast.
Try drawing a map as you’d expect it yourself… then apply it to the model… it probably won’t look as you expect.
no, I disagree… or well, maybe I didn’t make myself clear:
All materials of one object have specular values, right? What you will see in a render is a mixture of these settings and the current light set up and the camera view.
What I want to bake now is not the rendered specularity. If I would, then I would only get the view and light dependent outcome you talked about.
What I would love to bake is the specular-values of all materials of one object put into one texture. This way I could get rid of all materials, apply this new spec-texture and the object would still have the same different specs that it would have if I kept the materials.
Let’s get some things straight first
All materials of one object have specular value, indeed, but unless told otherwise, e.g with the use of a specular map, any 3D program will apply the same value of specularity along the surface of the model. The only thing then that can further define it is the geometry of the model and the light setup, as you’ve already mentioned. Sculpting for example will add a lot of detail on the geometry, thus affecting the specularity of the model accordingly. Sure, you won’t see any large flat surfaces any more, but still the specular value will be the same for the whole model.
I think you’re trying to start from the end, that is the end 3D result, to get your specular maps, when the best and most common method is 2D manipulation of you textures. You can very easily convert your RGB texture map to a greyscale specular map, using , say, GIMP, or use a bump map (or even a normal map in some cases) instead. Why go into the trouble of render baking when you can edit the source, that has all the information you need? You can take the color values, that hint where a model should be most shiny and where not, and alter them to your heart’s content.
Take a look at this tutorial (there are also a bunch of others)
A specular map out of a bump map, in Photoshop, but the principles apply to GIMP as well.
Hope it helps
I think zapman’s talking about baking a map with (greyscale) hues correlating to the ‘Spec’ sliders under Shading > Material buttons > Shaders.
This way, a mesh object with multiple materials applied could be baked to separate Diffuse and Specular maps, for use in Shading > Material Buttons > MapTo.
I think this would be definitely possible, for use in games at least, as the specular highlights will only show up when a light source is present on the affected area.
Max has this feature and it is shown in the screenie below.
The screenie is taken from Eat3d’s Old Pillar tutorial DVD which is located at http://eat3d.com/training_videos/pillar
AFAIK to enable the specular rendering in MentalRay the model must be assigned to a raytrace material and all the user needs to do is assign a separate material to each part of the model that has a different secularity value.
Maybe if some sort of global illumination was used to light the whole model equally, capturing the specular highlights would be possible.
Im going to have a play around with the nodes and see if i can come up with something with some AO and normal maps.
Thanks so very much for taking your time to create this very useful and informative site. I have learned a lot from your site. Thanks!!0 ------ Bobby Jones (retro jordans).
But I want to use this map in a custom game engine outside of blender.
The main goal is to model and texture game objects in blender that are to be used with an external game engine. Since blender materials are rarely supported by any game engines I need to convert the blender materials somehow.
My workflow is as follows:
In Blender I do modeling and texturing. For texturing I make use of different Blender materials and apply procedural as well as image based textures. At the end I do a UV-unwrap for the whole model and bake the diffuse map based on my blender materials.
I would like to do the same with the spec values I set under “Shading > Material buttons > Shaders” to generate a specular map that is based on the materials specular settings.
The diffuse and the spec maps could then be used externally (ogre based for example) to be applied to my model (now only one material for the whole object since I have baked all blender materials into textures that completely cover the object). The result should be visually (roughly) the same as in blender.
In the end I would have:
a 3D mesh of my model that has UV-coordinates
one diffuse texture for this model
one specular texture for this model
one normal map for this model
Of course one can still tweak the generated spec map by hand, but I really think that is is much easier if you can rely on a generated spec map based on your uv-layout and the blender-material settings for specularity. All you would still have to do is doge/burn some details into your generated spec-map
This would be a pain, but it would work: Disable all your textures except the one that affect spec., change those textures to color, make your mats shadeless and a shade of gray corasponding to the specularity of the mat, and then bake a full render. I just made a simple test of this method: it works both in the game engine and render, but you have to set ‘no rgb’ in the map to settings.
Yes, this is getting close. The only downside is that it’s really cumbersomely and you ignore the specular settings in Shading > Material buttons > Shaders.
If you have textures already that define the spec values, then you can simply change the settings in “Map to” from spec to color and then bake, that’s right.
But I don’t have any specular textures, I would mainly like to bake the values set in Shading > Material buttons > Shaders for ALL materials into ONE texture.
How very presumptive of you.
It is also correct to use a noun when describing a “specular” map…not an adjective which describes its attributes.
This is unfortunately a very common misconception.
To create a good specular map takes practice and patience…just as creating a diffuse map does.
The point of this request is so users can define the specularity of individual objects with precision and then bake them onto a texture which would be far more accurate and much quicker as you could create materials in Blender for a number of different surfaces for use later on.
In the end this would increase efficiency and speed up the users workflow.
at least I am not the only one who could use this feature…
the spec values are already available if you have an object with dozens of materials, so why not bake these values into one map? (to be used easily outside blender )