Home Technical Talk

Question about making light maps

My question stems mostly from creating a light map.
I know that when you make a light map, that it has to be on a second UV channel and if the object that is being UV'd has overlapping UVs on the first UV channel, then you need to make the second UV channel have different UVs that are non overlapping.

But, what I don't understand is how to create a light map. Is it just a bake in your 3D software onto your object? Do I need to know what the lighting of my game will look ahead of time to have an accurate light map?

I was reading Kevin Johnstone's post in this thread:

http://boards.polycount.net/showthread.php?p=678052#post678052

and he said something that got me more curious to this process:
The advantage of applying materials that are representative of the final design in max is that then you can set up a lighting arrangement or 2 and process a diffuse map, specular map, lighting map, height map and normal map all at once and it gives the texture artists a great headstart.

I tend to rely on a hand made lighting scene for generating as lightmap that indicates where the shadows might fall based on top down lights. I then do one using a skylight only which indicates the depth of each area relative to the normals of the low poly which is very helpful also.

I am unsure of what he means by all of this. I guess I'm confused as to where this is helpful or where it can be used. I feel like it's mostly my confusion as to what a light map IS, how it is created, and how it is used.

Is he basically saying here that he creates a sort of "dummy" light set up? One that may not be used in game, just one that can be used to make THAT particular environment piece look better? And he takes that "dummy" light set up and bakes it onto the object and stores it in the second UV set?

Or is this something that when baked will be taken into Photoshop and multiplied or overlayed in someway to the diffuse or specular map?


So, obviously, I have alot of questions. :P

I really hope someone can help me with this.

Thanks alot! :)

P.S. I should probably mention that my 3D package of choice is Maya. Just so if someone was going to tell me how to work through creating a light map that'll know what software I use. :)

Replies

  • warby
    Options
    Offline / Send Message
    warby polycounter lvl 18
    don't use lightmaps unless your game engine has a built in" at the end of the pipeline" automated solution for it

    ... like unreal or source

    if you don't have an engine that does that ! DONT USE LIGHTMAPS ! because you are gonna have to bite a shit-ton of sour apples.

    -your geometry has to be all unique (no instances for you sir )
    -cant share materials across levels because everything has to have the lightmap of their respective level hooked into it.
    -gameplay related stuff even perfectly static stuff that is added afterward in your editor will not cast a shadow into it (or receive from the world)
    -will not seamlessly blend with the dynamic lighting /shading of your dynamic objects.
    - light maps are a huge memory waster especially if its directional lightmaps that work with normal maps (also an issue with unreal / source)
    - expect a metric shit ton of artifacts, staircaseing / jaggys and uv seams ^^ ( general lightmap rant)
  • aerynSun
    Options
    Offline / Send Message
    The engines I generally work in are source and unreal.

    So.....what would the workflow be for that then?
  • warby
    Options
    Offline / Send Message
    warby polycounter lvl 18
    unreal - meshes: make a second uv Chanel and uniquely map it as tightly packed into the 0-1 uv range as you can http://www.hourences.com/book/tutorialsue3lightmap.htm
    unreal - brush based csg: the lightmapping on this is completely automatically handled by the engine

    source - brush based csg: the lightmapping on this is completely automatically handled by the engine
    source - meshes: doesn't support lightmaps but source has a pretty fancy way of generating a "dynamic" light setup per mesh instance that VERY closely resembles the lighting conditions in the meshes location with global illumination light bounces and everything ... it looks really good ! only problem is things can not be partially in shadow they are either completely in shadow or not
  • DEElekgolo
    Options
    Offline / Send Message
    DEElekgolo interpolator
    Actually. There is a great advantage to custom lightmaps. For those of you that remember Halo 1. There is a process I use to bake lightmaps in vray and put it in the Halo 1 Engine. Here is a picture of a map lightmapped using halo 1's normal lightmapping system:
    haloce2008122019444051hi3.jpg

    And here is a picture of the same map custom lightmapped by me:
    haloce2008121822042815oc9.jpg


    The outcomes are MUCh better and you can use commercial rendering engines for lightmaps as well. I use Vray for mines.

    As for workflow. I would have your model with your lightmap uv's and all your props and scenery setup in the model as well. Objects with opacity should have this setup in the material. But the diffuse for everything should be pure white. Then using what ever rendering system you are using, start setting up the lighting of you map the way you want it to. Make preview renders to ensure it looks good. Things like self illuminateing objects and HDR lighting should be setup also. Once this is done then use the Render To Texture tool to render the lightings map for all the models. For unreal engine specifically I dont know. But using my workflow then at least you have the bitmaps to play around with for what ever engine your going to use it for.

    Edit: Oh wait you use maya. Only max cant handle such awesome. Sorry!
  • Ryno
    Options
    Offline / Send Message
    Ryno polycounter lvl 18
    aerynSun, when you say "lightmaps" are you talking about ambient occlusion/shadow overlay maps (really AO maps), or totally pre-lit baked lighting for a scene (true lightmaps)?

    People tend to use these terms interchangeably, but there really is a difference. For AO maps, these simply contibute additional shading to crevices and dark areas on a model that is still being lit by real-time lighting. For true lightmaps, there is no realtime lighting of the objects themselves. It is entirely pre-rendered lighting.
  • arrangemonk
    Options
    Offline / Send Message
    arrangemonk polycounter lvl 15
    gile
    does the job for lazy ass lightmappers
    it works almost the same like in 3ds mith autounwrap ans stuff but scene based, i think its freeware now
    http://www.frecle.net/index.php?show=&section=giles&sub=download

    edit;
    http://www.frecle.net/forum/viewtopic.php?t=665
    here is a turoial for gile
    (it seems this tutorial is nor for the beta version :D)
  • boyluya
    Options
    Offline / Send Message
    boyluya polycounter lvl 10
    aerynSun wrote: »
    My question stems mostly from creating a light map.
    I know that when you make a light map, that it has to be on a second UV channel and if the object that is being UV'd has overlapping UVs on the first UV channel, then you need to make the second UV channel have different UVs that are non overlapping.

    But, what I don't understand is how to create a light map. Is it just a bake in your 3D software onto your object? Do I need to know what the lighting of my game will look ahead of time to have an accurate light map?

    I was reading Kevin Johnstone's post in this thread:

    http://boards.polycount.net/showthread.php?p=678052#post678052

    and he said something that got me more curious to this process:



    I am unsure of what he means by all of this. I guess I'm confused as to where this is helpful or where it can be used. I feel like it's mostly my confusion as to what a light map IS, how it is created, and how it is used.

    Is he basically saying here that he creates a sort of "dummy" light set up? One that may not be used in game, just one that can be used to make THAT particular environment piece look better? And he takes that "dummy" light set up and bakes it onto the object and stores it in the second UV set?

    Or is this something that when baked will be taken into Photoshop and multiplied or overlayed in someway to the diffuse or specular map?


    So, obviously, I have alot of questions. :P

    I really hope someone can help me with this.

    Thanks alot! :)

    P.S. I should probably mention that my 3D package of choice is Maya. Just so if someone was going to tell me how to work through creating a light map that'll know what software I use. :)

    I just want to bump this thread up cause I have same questions as the threadstarter. I'm a total newb with lightmaps (honestly, i dunno what the heck lightmap is and where is it used for) so hopefully there would be kindhearted ones to help me be enlightened with lightmaps.
Sign In or Register to comment.