Game Development Community

Problem baking lightmap in Blender

by Derry Bryson · in Artist Corner · 06/19/2013 (8:34 pm) · 9 replies

I am working on developing models in Blender and using Blender to generate lightmaps. I created a simple model of an interior with two small rooms. I placed a point light in each room. I have a primary uvmap for the textures and a second uvmap for the lightmap using the "Lightmap Pack" option to generate the uv mapping. I then bake the lightmap selecting 'Full Render'. Here is a picture of the results I get in Blender:

imgur.com/Oefnk18

Something is obviously wrong. One thing I find weird is that some of the walls are done right and the rest is messed up.

Does anyone know what I am doing wrong? I have successfully created a simple scene using a plane for the floor with some cubes and generated the lightmap and everything looked great, but when I try it with my only slightly more detailed model it fails.

Thanks in advance.

#1
06/20/2013 (4:58 am)
I would assume that you actually didn`t baked a lightmap
try following this tutorial


or if you don`t mind
upload the blend i will take a look at it
however i still believe you just tried to bake the ao
#2
06/20/2013 (7:28 am)
Yeah, I watched that video to learn how to do and made a scene like the one in the video and that worked fine. I'll upload the blend file when I get a chance this afternoon. Thanks.
#3
06/20/2013 (10:34 am)
@JOlinar: Here is the blend file:

dl.dropboxusercontent.com/u/61548410/room.blend

If you have time to look at it, that would great. Thanks.
#4
06/20/2013 (12:16 pm)
www.fileswap.com/dl/Yro9vCT2y/

here you go

your problem was the following
under coordinates there is another point that is called Map and in the previous blender Version it was called Layer

now its called map and you need to select your uvlightmap
and then move on to bake

i have edited your blend/ best just open it with ui enabled to see what
i mean, don`t worry i have kept the standard layout and its a separate scene

and here is a picture just to make it a bit more clear

i.imgur.com/028F5aIl.png
hope that helps
#5
06/20/2013 (5:21 pm)
I screwed up with the blend file I uploaded. Rather than upload the whole file I am working on, I created a new file and appended the room model. I then tested to see if it still had the problem, and it did. Then, just for the hell of it, I moved the room model and the lights to layer 1 and saved that out and uploaded it.

Unfortunately, when I moved the model, the child meshes (collision mesh cubes) didn't get moved with it (they are still on layer 12) and that, it turns out, is what was causing the problem. I needed to set the collision meshes to not be renderable. It even explains why some of the walls are fine because I haven't created the collision meshes for those walls yet.

Thanks for your help, I really appreciate it.
#6
06/20/2013 (8:06 pm)
np
would you mind - showing your collision meshes?
or a blend with those
just curios
and did you created lods?
i mean teh room itself is pretty polyheavy tbh
and not really suitable if you ask me
but i guess it was more of a advanced test regarding lightmap baking
#7
06/20/2013 (9:12 pm)
Actually, the collision meshes are in the blend file, just on layer 12, rather than on layer 1 with the room. They are just cubes for the different wall sections.

I did not create any lods.

The room is pretty poly heavy for what it is, I guess, but it makes it easy for me to uv unwrap and use with textures at a 1x1 meter/unit scaling to be able to just change textures to create a different look with the same models. I am more of a programmer than a modeler. I am experimenting with creating kits where you have many separate models that can be combined to create rooms, etc. Like they do to create games like Skyrim.
#8
06/21/2013 (11:26 am)
ic that explains it
now if you don`t mind me sugegsting something
as it comes purely from a artist pov

currently in T3D we do not have advanced snapping options
we do have some
however
for modular building assets and such we would need a advanced snap to vertex option and some other stuff

so if you are like you said a programmer and
if you wish todo something useful
where you could actually let other ppl use your creations
(feature modualr building kits)

then the first step would be to enhance the snapping options in T3D
if you feel that you are up to the task

take a look at
the UDK way of things
as in UDK you have those snapping options
we would really need something along those lines in T3D to
be able to use modular building assets properly

at the end this would be a win win situation in the long run
anyways its just a idea
if you take it as a plan
is your beer ;)
#9
06/21/2013 (9:18 pm)
Yeah, I think I saw a feature request for advanced snapping options. Once I get familiar with the source code, perhaps I could work on that and contribute. Right now, I am evaluating what I can do with engine and whether it suits my needs. Thanks for your help.