Lightmap / texture bake help

I want to have static shadows in the game engine. I’ve found out that i need to do some texture baking or light mapping? Is this the same thing? Ive searched the forums but I cannot find full tutorials or help. I did find one http://www.continuousphysics.com/lightmap/LightMapTutorial.html - but couldnt follow it well. Does anyone know of a full tutorial or any guidance on this topic, thank you :frowning:

Sure,
Try this, it automatically bakes light maps, and soon will have real time shadows integrated with it.

http://www.crystalspace3d.org/main/Main_Page

with the blender2crystal plug in, it is just as easy to use as the standard BGE.
the time diffrence in running the game is because of the light maps automatically baking…

the Crystal space light maps are compatible with Dynamic lighting too which is also a pretty desirable feature :slight_smile:

Hello again, sorry to bring this up again, but I really can’t figure this out. I want it all done in blender becoase thats what my college has. I’ve tried to follow this tutorial: http://www.continuousphysics.com/lightmap/LightMapTutorial.html but I get stuck at the first part:

“Select the main mesh and go into the editing buttons (F9). In the mesh panel you should see something like this.”

Where it says that, I have no buttons that look like that. I think it might be because i have Blender 2.42a. I’ve heard that 3 is out, but older files don’t work in it:( I’ve searched for fuller tutorials for older versions of Blender but cant find anything and a script i tried did not work either. Does anyone know any step by step guides atall?

This is what I have done: Theres a spot light shining through a window. I have the UV mapped the room and the objects inside. When I tried to make the lightmap without that tutorial, I selected the room, went to face select mode, added a new image and then went to UV’s -> Texture Baker. This made an image but it was just all black. I have also tried this way without adding a new image which didnt seem to work.

Thanks in advance for any sort of help…been trying to figure this for days :frowning:

Attachments


lightmapping was introduced for 2.43 RC’s, its not technically a feature in 2.42a. The beauty of lightmapping is that your able to apply a generic lighting to an area with a low resolution UV map. This requires a separate UV layout. In 2.42a you only get one UV layout to work with. So there would be no point in produces a lightmap at the same resolution as your diffuse map. You would save more space by simply painting the shadows onto the diffuse map. The place where lightmapping really shines in when placed over your tiling textures.

okay, I’ve downloaded latest blender version on adifferent computer and opened my file. I was able to create a new UV image like first picture here:
http://www.continuousphysics.com/lightmap/LightMapTutorial.html
Then i created a new image like in the second picture on the tutorial. I didn’t run the script because it doesnt seem to work atall for me. I’ve had a little more progress by goingto render->bake render meshes->full render. From this I was able to see the light in my room. The problem is that objects don’t seem to be casting shadows in the light? anyone know the reason why?
cheers
UPDATE:
I’ve followed the tutorial and managed to bake the light from a spot lamp onto a texture. I am still have ing problems with objects not casting shadows in my textures :frowning:

are you getting shadows when you render the scene. Its likely you need to change your lamps settings or possibly your objects material settings. Lamp to give shadows, object to recieve shadows.

I think I’ve done those things. I compared the light and material settings with another clean blender file and I couldnt see the difference. Heres a link to my test file, anyone see any problems?

http://www.filefactory.com/file/616bdb/

you have to click where it says “download for free with file factory basic” and type a verification code. You dont have to install anything like someone else thought. Thanks

hi, if u want a cast shadow from spotlight u can set buf.Shadow button on at Shadow and Spot panel, than assign a new image for room to ligthmap uv set and baking full render.

cheers, sorta got it now. shadows back…yay! it wasnt set to shad buf or something :S I’m slowly dragging myself through this lightmap stuff. Managed to get a lightmap and save it, but only one set of UV coordinate are displayed at a time now, and i have a black patch on my lightmap for some reason. I did figure out that you can combine youre original UV texture and lightmap in photoshop, save it and load into blender. This works alright but i do want to find out how to combine them properly on blender. Thanks for the help so far guys, is much appreciated :yes:

…but only one set of UV coordinate are displayed at a time now…

hi have u setup the for all textures UV and set the linked uvset name?
i.e. color texture— UV:colormap + mix mode
lightmap texture—UV:lightmap + add mode
and u should activate the colormap UVset button when u start the GE.

http://img149.imageshack.us/img149/3142/lightmapsetupgk5.th.png

I dont know how, propably because I’ve been ill for a while and not used Blender, but I’m making backward process on this lightmap thing :frowning:

I’ve decided to try complete this tut:

http://www.continuousphysics.com/lightmap/LightMapTutorial.html

I’m alright until I do a full render bake. I have the lightmap channel selected but when I bake the full render, it seems to copy over the base images.

I did make a new image for it to copy over but it still does it. I think I have problems when it says:

" Make sure to assign the new image to the mesh coordinates just created."

I’m not quite sure what this means, this is probably what I’m doing wrong. Cheers for trying to help, this thread propably getting annoying, I really just don’t get this :frowning:

Well I made it through that tutorial and everything came out perfect. Tried the exact same thing on my project and it just doesnt seem to work. I either have lightmap texture showing or the base one depending on which channel I select.

I’ve uploaded part of my project here:

http://www.filefactory.com/file/4c43ad/

You have to click on “download now with file factory basic” you dont have to install anything don’t worry - just hard to figure a way around the page :confused:

Could someone have a look at it please and tell me where I went wrong. I’m sure I’ve done everything right. Thanks.

PS - wasd to move, mouse click and hold to look - excuse the crapness of everything - just trying to get the lightmap done first…

Ok, to get it working:

1: Enable “Use Blender Materials” from the “Game” menu.
2: In the UV Editor, assign your base texture to the mesh (UV mode -> select all faces -> choose your base texture in the UV window).

Unless you’re applying a single texture directly to the mesh (via the UV editor), you have to enable “Use Blender Materials”. If your going to use “TexFace” in the material you have to have a texture assigned via the UV Editor, as it’s this texture that the material uses for the first texture channel.

Piran

I can’t select “use blender materials” because this is a seperated room from a larger project that has been UV mapped —>that would mean they would disappear and be replaced by the default blender material wouldnt it? Ill make sure I’ve assigned the base texture like you said, but I’m sure I have because i can switch between the two in the editing buttons. I’ll have another look when I get home?
PS - did you figure this from looking at my file? If so, could you send it to me so i could have a look at the changes you made? be beig help - cheers

1 Like

yes but you can give those objects a blender material and tell is it to use Texface which means it will use image maps applied by the UV editor…

Yes, I looked at your file and those are the steps to take to get that file working.
There’s no way around this, if you want to use multi-texturing effects, you have to use Blender materials. This will not get rid of any assigned UV maps, but as kirado says, you can just assign a new blank material and enable “TexFace”. Your existing texturing will be fine.

Piran

Thank you so much everyone, you’re all really helping me in this. I’ve nearly finished I think, want to decorate the hall and give the bathroom a door. The light in the bathroom needs to be a lot brighter I think. If you’re not sure what I’m doing here, it’s and art project for college (or school if your american I think) where each room is decorated in a certain way. Lichtenstein, Hopper, Caulfield, Hamilton :eyebrowlift: Got a bit of the problem with getting rid of unused textures again and some of them could probably do with shrinking. You can see what I’ve done so far and comment if you want. File size is 17mb cos of the texture business I think but you can see if you want :slight_smile: When I find time around revision I’ll get this down hopefully.

http://www.sharebigfile.com/file/109210/Walkthrough-zip.html

Again, thanks for the help so far, will no doubt be needing more.