Home Technical Talk

3D MAX. How to render without lights but with light map!

Hi everybody!

I need to render the scene using the light map as the lighting. I've baked the light map but I can't apply it! My attempt to use it through the self illumination has failed. It gives black/white lighting. There is no color information of lighting. Please help!!! Any advice?

Replies

  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Using the map as a self-illumination map in a material should work - however there is a checkbox next to the map slot in the Material Editor for self-illumination, if I remember right - if you don't click it then it will not use the colours from your self-illumination map, for some reason.
  • ajv3d
    Options
    Offline / Send Message
    ajv3d polycounter lvl 7
    Hi,

    There really shouldn't be any color information within your lightmap. Self-Illumination is the right direction. How did you UV all the meshes for your lightmap? Make sure you have the correct UV map specified in the parameters of the material you plug into the self-illumination.

    luft wrote: »
    Hi everybody!

    I need to render the scene using the light map as the lighting. I've baked the light map but I can't apply it! My attempt to use it through the self illumination has failed. It gives black/white lighting. There is no color information of lighting. Please help!!! Any advice?
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    ajv3d wrote: »
    There really shouldn't be any color information within your lightmap. Self-Illumination is the right direction.

    Where on earth did you hear that? Lightmaps should allways contain colour information.

    A nice way to do it in max is to put your map in the self illumation slot, turn on 'Color' under the 'self illumation group' in 'basic blinn parameters'

    to setup the map create RGB multiply node and multiply the lightmap by the diffuse map. You will probably want to increase the output amount of the bitmap to about 2 or 4 to get nice results.. presuming your not using a HDR
  • ajv3d
    Options
    Offline / Send Message
    ajv3d polycounter lvl 7
    Are you referring to the color of the lights? My lightmaps only contain lighting information, so if it's color from the lights, yes, but I wasn't sure exactly what color he was referring too. btw, what's the easiest way you lightmap your entire scene?
    r_fletch_r wrote: »
    Where on earth did you hear that? Lightmaps should allways contain colour information.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Lightmaps will contain colour from your lights and from indirect diffuse reflections. (Bounced light) if you have coloured objects in your scene they will have an affect on the lights colour. even if your using pure white lights (which your shouldnt)
  • ajv3d
    Options
    Offline / Send Message
    ajv3d polycounter lvl 7
    Does the indirect diffuse reflection happen automatically or does it need to be setup? Here's a really bad example of a lightmap generated using Flatiron, The lights are primarily whitish blue.

    test_lightmap.jpg
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    It depends what your rendering with. It looks like your using light tracer. Which supports light bounces but does it very slowly. you need to turn up the bounce number in the light tracer options.(or is it bleed.. its one of the two)

    Personally I'd use mental ray for it. Set your FG to low/Medium, turn off noise reduction and set the diffuse bounces between 2-5 (depending on your scene.)
  • ajv3d
    Options
    Offline / Send Message
    ajv3d polycounter lvl 7
    Hmm, light tracer isn't active. I'm using Max's default scanline rendering, maybe that's the issue. I'll check out and see if Mental Ray makes a difference. It seems like you have a lot of experience with lightmaps, It's pretty fresh for me. I came across a tutorial on the web that specified combining all the meshes in the scene and using Render to Texture to generate a shadow map. This didn't seem like a good practice to me...and Flatiron automaps and packs the entire scene into it's own UV set. What's your opinion on the best approach on light mapping the entire scene? Individually light mapping each object and packing them into the same map (which would take hours but probably offer the best result) or is there another way?
  • cman2k
    Options
    Offline / Send Message
    cman2k polycounter lvl 17
    Mental Ray makes a HUGE difference. It's going to be slower but way more accurate. Using Global Illumination along with Final Gather can give some absolutely fantastic results though.

    Flatiron is a good tool, but I don't let it decide how to split up my scene into different lightmaps. I make several large objects that are composed of many attached objects. I use flatiron to unwrap these, usually iteratively until I get good results. I hand-massage the UVs a bit if necessary, and I use render-to-texture to bake out my maps.
  • ajv3d
    Options
    Offline / Send Message
    ajv3d polycounter lvl 7
    Hey cman2k, thanks for the response. I was just playing with Mental Ray and it does make a big difference. I cranked up FG and turned on GI and the scene was a little dark but very crisp.

    Flatiron is a pos in my opinion. It's fast but sloppy as hell. I need to do the entire scene into a 512*512 lightmap and I'm having a rough time working on a good workflow. I came across a workflow on the web that explained to combine the entire scene into one piece of geometry, automapping it, and using Render to Texture to bake out the lightmap as you explained. My question on this is, how could you reapply the materials (with the newly created lightmap in the self-illumination slot) to each object individually after I've combined it all?

    I'm a Maya user, so I'm really trying to get 3DS under my belt, but It seems like there would have to be a better workflow than what I found.
  • cman2k
    Options
    Offline / Send Message
    cman2k polycounter lvl 17
    What you found is more or less the best process. The vital step you haven't seemed to mention is the use of a 2nd UV channel.

    By using a 2nd UV channel, you should not have to change your materials or their application at all. The 2nd UV channel is what will get 'automapped' and Render-to-textured, and it will only hold the lighting information.
  • ajv3d
    Options
    Offline / Send Message
    ajv3d polycounter lvl 7
    Yeah 2nd UV channel it's common, If that's the best practice then I'm good with that. I set up the materials a certain way though. I used a standard material, and used an rgb multiply in the diffuse slot and plugged in both my texture and a vertex color node. Then I plugged in my lightmap into the self illumination slot under 'maps' and changed its UV channel to 2. Is this a good approach in Max for creating the material for diffuse vertex color and lightmap?
  • cman2k
    Options
    Offline / Send Message
    cman2k polycounter lvl 17
    If you are just using vertex colors for extra coloring information, then yes, that is a perfectly valid setup.
  • ajv3d
    Options
    Offline / Send Message
    ajv3d polycounter lvl 7
    Sweet, nice to know that setup works :) I noticed that the lightmap isn't as bright as what the render looks like with the actual lights. How can you tell you're getting an accurate bake, and is there a way to adjust it without needing to rebake the map again?

    cman2k wrote: »
    If you are just using vertex colors for extra coloring information, then yes, that is a perfectly valid setup.
  • cman2k
    Options
    Offline / Send Message
    cman2k polycounter lvl 17
    What's the end purpose of this lightmapping? Is it just for rendering?

    If so, I think you may need to make sure you are storing your lightmaps in a 32-bit format so you get a wider range of possible values...? I'm not too sure, I don't deal with rendering and 32-bit stuff often.

    If not, and this is for an engine of some kind, then you need to figure out how you will deal with exposure and stuff. 16-bit textures are inherently going to be limited to a limited range of values. If you have lights that go beyond those values, they won't translate into a texture well. Some people render their lightmaps out in a purposely underexposed way, then overexpose them in their engine using shaders and whatnot.
  • ajv3d
    Options
    Offline / Send Message
    ajv3d polycounter lvl 7
    Yep, I'm rendering the scene within Max, but it's for an iPhone company, so I'm not sure of its emphasis. I'm using uncomressed targa 32-bit for my lightmaps, the results I've had aren't what I'm looking for, but I did take it into photoshop and cranked up the values and noticed a definite difference when applied back to the scene...I just wish I there was a better way to tweak them so I don't need to constantly adjust lighting, and or UV's and bake again. :)
Sign In or Register to comment.