Replies: 29 (Who?), Viewed: 23282 times.
Page 1 of 2
Instructor
Original Poster
#1 Old 23rd Aug 2010 at 1:47 PM
Default Baking in Blender
Hi
I have tried to use Blender 2.49b for baking my models then it is quite time consuming to do it manually.
I import an obj model and they appear in Blender. I have previously made a UV map that I import to Blenders UV window. But when I try to bake the model, I only get one error: "No image found to bake to". I've tried almost everything. Is there a tutorial for baking in Blender, or what am I doing wrong. How will it be?

When I import, should the model be grouped or can I have an ungrouped model?
Advertisement
Alchemist
#2 Old 23rd Aug 2010 at 2:16 PM
After you open the image editor in Blender are you creating a new image and entering the size you want the IMG to be?
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#3 Old 23rd Aug 2010 at 2:17 PM
I've done a tutorial for baking in Blender, I've just been slow to post it. Here is the text of it, it should help you:

Quote:
AO baking


Setup

1 Open blender and press delete to delete the cube.

2 Move your cursor to the bottom edge of the top header (until the cursor changes to the scale arrows).

3 Right click and select "split area". Drag the line that appears to the middle of the screen (it will turn purple).

4 In the new pane you just created, click the button in the bottom left-hand corner. It has a little picture of a grid on it. Select UV/image editor from the menu. Next to that button (which should have a face on it now) click Image->New and in the dialogue enter a name and set the size (you can also change the background color) and click OK.

5 In the top header again, click file/import/Wavefront (.obj). The browser should open in the bottom pane. Browse to your .obj and click the "import" button on the left. In the dialogue, click Group then Import.

6 With your cursor in the 3D pane(where your mesh is), press B to box select and left click and drag the box around the whole mesh. Then type R (rotate),X (use the x axis), -90(-90 degrees), and Enter. This is because of the different axis orientation from MS.

7 Right click on the group you want to bake and press TAB to enter edit mode. You should now see your uv map in the uv map editor. In the uv editor next to the UV menu is a box with up and down arrows on it. Click this and select you image, which assigns this image to your uv map. Press TAB to go back into Object mode.

Baking

8 Press F5 four times and down in the bottom pane you'll see a set of tabs starting with Preview. Click on the Amb Occ(ambient occlusion or AO) tab and click the Ambient Occlusion button. Under that change Raytracing to Approximate and Error to 0. Raytracing works well, its just slow.

9 Press F10 and click on the Bake tab in the bottom pane. Click the AO button and click bake. Blender will bake the AO texture to your image.

10 In the UV editor pane click Image->Save. You can change what type of file to save it as at the bottom of the UV editor pane (default is Targa).

Under the AO tab, there is a Add, Sub, and Both button. Default is add, so change it to both. That will accentuate the shadows a little more.


I guess I should get off my bum and post this properly :P

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Instructor
Original Poster
#4 Old 23rd Aug 2010 at 2:20 PM
Quote:
Originally Posted by orangemittens
After you open the image editor in Blender are you creating a new image and entering the size you want the IMG to be?


I make a new UV image (512x512 pixels) and import a image with the same proportions as underlay for my UV map in Blender.

Where's the "Image editor" in Blender?
Alchemist
#5 Old 23rd Aug 2010 at 2:24 PM
Quote:
Originally Posted by cmomoney
I've done a tutorial for baking in Blender, I've just been slow to post it.


This is a great tutorial and very easy to follow. I just have one question. In step 3 getting that purple line to appear so you can split the screen often takes me multiple tries.

It's as if there is a pixel-sized sweet spot that makes it appear and I can never figure out where that spot is going to be. It's the most time-consuming part of baking for me. Is there some way you just *know* where to click to get the purple line?
Instructor
Original Poster
#6 Old 23rd Aug 2010 at 2:54 PM
Thank you cmomoney I will try your tutorial. The problem is that I can not get rid of my previous model. I can delete it but when I went to select New, then the the model came back again. It is dyed very bright pink. Even if I finish the program and start again the same model shows up again. I'm very confused Blender is very strange!
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#7 Old 23rd Aug 2010 at 2:58 PM
OM:
I usually try closer to the corner. After step 3 you could go to File/Save default settings(or Ctrl+U), and when you start Blender again (or File/New) it will open the way you left it without having to do it every time.

Lisen801:
Go to "File/Load factory settings" to go back to the default.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Instructor
Original Poster
#8 Old 23rd Aug 2010 at 3:09 PM
Thank you cmomoney I was going to reinstall the program!
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#9 Old 23rd Aug 2010 at 3:14 PM
You may want to also do what I suggested to OM about the default settings.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Alchemist
#10 Old 23rd Aug 2010 at 3:35 PM
Excellent! That's a perfect solution for me since I only use Blender to bake with right now. Thank you
Instructor
Original Poster
#11 Old 23rd Aug 2010 at 3:56 PM Last edited by Lisen801 : 23rd Aug 2010 at 4:12 PM.
cmomoney...
Ok I load the "Factory settings" and get rid of the pink object. But when <I start the program again the %&%/&¤?@£@ pink model is there! Why is it so pink, I haven't seen it before and how can I get rid of it for permanent?

If I have a model with many parts, shall I group it all before importing to Blender? I notice if I import ungrouped I can only select one part of the model

This program is driving me crazy. If I import the model grouped I can't go in any other mode than Object. I can't get the UV mesh in the UV window.
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#12 Old 23rd Aug 2010 at 4:17 PM
Load the factory settings, delete the cube, split the screen, then press Ctrl+u. It will start this way from now on. The model is pink because it's selected.

To select more than one group, you hold Shift and right click on the group you want to select. But you will have to assign each group to the image (step 7) first.

If you can't go into edit mode, it's probably because the object isn't selected.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Wiki Wizard
#13 Old 23rd Aug 2010 at 4:36 PM
Listen, are you still sturggling with the original problem? Because i had this issue to, and all you do is press 'image', then 'new' in the sub category, then it will allow you to bake. Sorry if this has already been answered but i got confused trying to read everything


It's ok, we all laugh-snort occasionally!
Check out some of my other stuff here.
Instructor
Original Poster
#14 Old 23rd Aug 2010 at 7:15 PM
I really don't understand this program Blender. I model my mesh in another 3D program, Form-Z, that I can manage good. I've been working with it for many years.
I export the mesh to Milkshape for grouping and joints. I export from Milkshape to UltimatUnwrap3DPro for the UV mesh and for maps. I import the UV's to MS and group etc.
Well I then export an obj-file for Blender. If I export a grouped object I can do nothing with it in Blender and I can't go in another mode but Object. If I export the model ungrouped I can select only one piece (group) and it shows up in the UV editor. But what I notice is that the scale in the UV window don't match the imported multiplier image I've imported but both are set to the same size, 512x512 pixels. The imported image is in jpg-format.

Well, I don't know. I would like to use Blender for baking only. For modelling I think I prefer FormZ.
˙uʍop ǝpᴉsdn ǝɹ,noʎ 'oN
#15 Old 23rd Aug 2010 at 7:34 PM
If you can't go into edit mode it's because you don't have anything selected (well, it may be selected, but it may not be the active object). You have to right click on the mesh. As for the UV problem, I don't know because I unwrap in Blender.

"Part of being a mesher is being persistent through your own confusedness" - HystericalParoxysm
| (• ◡•)| (❍ᴥ❍ʋ) [◕ ‿ ◕]
Instructor
Original Poster
#16 Old 23rd Aug 2010 at 8:16 PM
I really don't know what I did but suddenly it works for me to select Edit mode and the UV-map show up in the UV window in correct size???
I also make a baking which looks rater strange but I'll test it in game.
Thank you all for your time.
Scholar
#17 Old 24th Aug 2010 at 2:14 AM Last edited by Jonesi : 25th Aug 2010 at 9:16 PM.
When you first open Blender there is a "default" cube mesh that is always already open. Press Delete and then the bottom selection (from the menu that appears when pressing delete key) to delete it.


1. Then go to File > Import > Wavefront OBJ.
2. Browse to your .obj file.
3a. Click "Smooth Groups" to turn it off, Change the clamp scale to zero and click Image Search to turn it on, click Import.
3. Split the screen by hovering over the middle separating line, wait for the cursor to turn into a double ended arrow then right click and choose Split.
4. On the left you should see your mesh. On the right go to the little "grid" icon and select UV/Image. Your right side should now turn to a blank uvmap grid.
5. Click in the left mesh screen, press A to deselect the mesh.
6. Right click on the mesh to reselect it and hit the TAB key.
7. The UV map should appear on the right side of the screen now. You don't need to import a map, Blender takes the map from the already mapped mesh.
8. Now click Image > New and change the dimensions to what you need them to be. You should now see your uvmap on a black background.
9. Press F8, Hit the Amb Occ tab. Change the Samples from 5 to 10.
10. Press F10, click the Bake tab, click Ambient Occlusion and then hit the BAKE button just to the left.
11. Wait whilst your map bakes. Once finished go to Image > Save As....change from Targa to .jpg, rename and save to your working folder.

I've just recited that from memory but pretty sure I haven't missed a step. It looks confusing but it's really easy and once you've done it a couple of times you won't even have to look at instructions, literally takes two minutes once it's in your head.

I'm doing some "meshing lessons" over at my forum this month, one of the lessons will be a blender tute, might want to drop by and have a nose once it's up. x
Instructor
#18 Old 24th Aug 2010 at 12:24 PM
You haven't missed anything Jonesi, that's how it's done and like you said, it takes only a couple of minutes.

You can find more of my stuff here: http://www.blackpearlsims.com/downloads.php
Test Subject
#19 Old 1st Sep 2010 at 4:17 AM
Baking? What's baking in Blender?
Alchemist
#20 Old 1st Sep 2010 at 2:24 PM
It is a function that Blender has that allows it to render your greyscale IMG for an object. That is, it creates your shadowmap for you.
Lab Assistant
#21 Old 12th Sep 2010 at 5:26 PM
Currently I am learning to mesh, thanks to the meshing lessons by the talented Jonesi at BlackPearlSims
But something odd is happening while baking the mesh in Blender. Since Jonesi also didn't know what was wrong, I hope someone out here might now why it happens and maybe even know a solution to fix this!
The picture below is the baked multiplier. The mesh is a round coffee table with four legs and support bars. The shading of the legs is strangely pixelated instead of having a nice smooth area. I already made a new uv map and tried again, but this didn't help either. I used the same instructions for the baking process that Jonesi posted in this thread a few posts up.
Any help would be much appreciated!

Lab Assistant
#22 Old 15th Sep 2010 at 1:58 AM
That happens when you bake a texture where the same part of the image is assigned to multiple parts of the mesh, it's rendering the area several times over. You'd have to either map each leg in a separate area, or you can be tricky and only bake the AO for one of the legs in a way that still looks right when applied to the other three.

Of course, your mesh may already have each leg mapped separately, I can't tell without seeing your UV layout, but that's the cause when I run into that.
Wiki Wizard
#23 Old 15th Sep 2010 at 9:48 PM
^^ That is more or less what is probably happening, when you map an object to bake, every front face needs to be mapped separately, don't worry about backfaces they don't matter, just make sure all the normal faces have a different and separate area on the map. I usually cut mine all at every edge then manually stitch it together, it is quite time consuming but you get a really good map that is completely even and correct proportions


It's ok, we all laugh-snort occasionally!
Check out some of my other stuff here.
Lab Assistant
#24 Old 17th Sep 2010 at 2:59 PM Last edited by Simlicious : 17th Sep 2010 at 4:18 PM.
Umm okay, I really am a total newbie when it comes to baking and uvmapping... actually everything concerning meshing
But of course, I'm willing to learn.

I did map out each area separately, but maybe I moved the parts too closely together, I don't know.

This is my uv map:


and I fixed the multiplier by hand now, just copied one of the legs and pasted it over the other areas... Quick and dirty. It's not perfect but I guess it'll do for my first object for now, until I know how to make things better.
Deluxe Designs, About the front- and backfaces, how can you tell them apart? And could you explain your method of manually stitching things together in more detailed steps or maybe with pictures? That would be really helpful
I am a bit of a perfectionist (okay, that's an understatement ) and wouldn't mind touching up things manually to make them better.

This is the manually fixed multiplier:

Shadowing does look a bit dark in some places when viewed in game. I still have a lot to learn, but I am enjoying it very much!

EDIT:
I think I found out what caused the baking issues:
You both were right, there really was something overlapping on the uvmap.
Somehow the ground shadow was on the uvmap. Must have saved a wrong version or imported something wrong while editing something. I deleted the shadow on the uv map and baked the mesh again and now it looks like it is supposed to!
Wiki Wizard
#25 Old 18th Sep 2010 at 12:54 PM
That's good, just to answer you questions quickly, in terms of telling backfaces, you can usually find an option to hide backfaces, and then you can see if there are parts missing, or usually in milkshape you can see them because they are black, not grey. In terms of stitching, i'm not sure about other meshing programs like milkshape or blender, but i use wings, and i make my uv map in that, and you select an edge of 2 faces next to each other and choose 'stitch' on the UV map, and it automatically adjusts itself, so if you make a detailed mesh you can stitch a curve with lots of faces so the pattern in game flows down it naturally, instead of looking disjointed


It's ok, we all laugh-snort occasionally!
Check out some of my other stuff here.
Page 1 of 2
Back to top