Home Technical Talk

Baking unreal shader

polycounter lvl 14
Offline / Send Message
Cathodeus polycounter lvl 14
Hi,

I did a quiet complex shader.

Do you know guys if there is a way to output the all shader as textures.

Just output the specular informations, the nmap infomations, the diffuse information. Inside textures 1 texture per pass.

Like this that will be simplyfying the shader and keep the same visual.

Thanks in advance.
Massimo

Replies

  • Cathodeus
    Options
    Offline / Send Message
    Cathodeus polycounter lvl 14
    The option "flatten material to texture for mobile device" do the trick. But when i try to export it as a texture to the harddisk it do anything. Wich mean the texture is not saved to file.

    Other advice ?
  • Cathodeus
    Options
    Offline / Send Message
    Cathodeus polycounter lvl 14
    Ok i'm now able to export the texture. But the resulted texture is overburn (more light than what i see in the shader). It seems to be affected by the lighting model. but no flat lighting model exist. So here are the steps :

    1.Plug the thing you want to export to the diffuse output of the shader. So if you want to export the specular information of your shader as a texture plug it to diffuse. (Normal map must be plugged to the normal map output because they are not calculated the same way.)
    2.Than hit the "flatten material to texture for mobile device" button.
    3.Select the baked texture and export to file it to you hardrive.

    I still must find how to keep the resulted bake texture not lighted by the lighting model of the shader. Any help is really welcome.
  • Eric Chadwick
    Options
    Offline / Send Message
    Could you manually include the light in the shader, so you could control the light itself? I know I can do this in Shader FX. Not sure about UDK.
  • Cathodeus
    Options
    Offline / Send Message
    Cathodeus polycounter lvl 14
    I think it's really possible Eric. I found my problem. In fact if we want to output just the diffuse we must unlink the nmap. Because the engine bake a complete map as diffuse. So it include normal map information, as well as everything linked (specular, etc ...).

    So this method is ok but we must bake one texture at a time.
Sign In or Register to comment.