Home Technical Talk

[MAX] Baking Normal map lighting info into diffuse map...

Spur
polycounter lvl 6
Offline / Send Message
Spur polycounter lvl 6
Hi guys. I have a situation where I need to import pre existing models into a game. All the models have diffuse, normal and spec maps. The game they are going into only allows for a diffuse map. I still want all that subtle lighting info included so I figured my options are as follows:

A. Bite the bullet and hand paint the lighting info for the rivets/panel lines. Time wise I don't like this option. I need something as quick and streamlined as possible.


B. Somehow extract that info from the normal map itself. I've experimented with creating cavity maps with the XNormal plugin. It seems to work ok and may be a standby if I can't bake the info directly.



C. Import the model in Max, light it and bake that info into the diffuse using render to texture. The kicker is I dont really want any AO (have a separate AO map for that), or shadows from the geometry itself, just highlights and shadows from the normal map info.


Even though its somewhat a secondary program for me. I'd like to use 3DS Max since I have some basic knowledge of it and liked the results I have seen with 'render to texture'. I was also thinking of setting the models color to 50% grey, then baking the lighting from the normal info that way I could use it as an overlay in Photoshop and be able to adjust it more. Any thoughts, ideas?

Replies

  • Spur
    Offline / Send Message
    Spur polycounter lvl 6
    Check out Knald. It will derive occlusion and some other texture maps from a normal map. You won't get specific lighting information (ie cast shadows), per se, since tangent space normal maps are meant to work with dynamic lighting. But the occlusion and other maps you'll get out of Knald should help you.

    https://www.knaldtech.com/knald-videos/

    And you could always do an additional lighting bake in Max as well if you want the cast shadows or other specific lighting information baked out.

    Thanks. I've never heard of that but will check it out. I do need the specific lighting info so what I have done is:

    1. import model and set up a quick MR Omni area light (turned shadows off)

    2. rendered to texture as a complete map. The rivet and panel detail in the normal map came out really nice.

    Of course with that set up only a small portion of the model rendered to texture since it was lit by one area light. I'm assuming I'll have to just set up several area lights around the model then render it in order to get all of it. Maybe there's another way to go about it I'm missing?
  • Racer445
    Offline / Send Message
    Racer445 polycounter lvl 12
    i once did something like what you want to do, but without normal maps. it's kinda shitty but was quick and worked.

    1. in max, get your model set up with a normal bump material and all that. regular scanline renderer.

    2. light the scene. Make sure it's set up symmetrically and the lights are set to NOT cast shadows. make sure any kind of AO effect is disabled.

    3. RTT from multiple angles and composite them together in photoshop. this is quicker than it sounds.
  • gsokol
    Offline / Send Message
    gsokol polycounter lvl 14
    This might be sketchy, but you can just try pulling out the values from the green channel of the normal map, and use that as a mask/multiply layer on top of the diffuse.

    Since the Y channel of the normal map stores the normal vectors that face up and down in uv space, you might end up with the effect of having a light casting down where the normal mapped details were.
  • Spur
    Offline / Send Message
    Spur polycounter lvl 6
    Racer445 wrote: »
    3. RTT from multiple angles and composite them together in photoshop. this is quicker than it sounds.

    Yeah that was something I was hoping there would be a work around but thinking of it, if you lit the whole model evenly and consistently , the normals would wash out. I'll try your compositing trick, with a render for each of the 4 sides and top. Bottom I'm not too worried about since it's in shadow any way. So far the results are really nice.

    Thanks for the suggestions guys.
Sign In or Register to comment.