View Full Version : Best light and distance to use with baking?

02-29-2012, 02:33 PM
Hey what should I be weary of when baking textures to UV Map for computer game models?

I usually use Area light for baking because it lights up areas well but when I bake it sometimes leaves holes or black areas.

What is the best light to use? and what is the best distance from camera to use?

Or any other tips please, thanks :)

I'm using crazy bump for normal maps and projecting the textures first that are bumped then using surface baking camera to render everything to the UV Map.

02-29-2012, 02:46 PM
IMHO- you shouldn't use any lights while baking textures and nodes to images ;)

I have made even command SurfaceBakingLights tool which you can find at http://www.trueart.pl
which is turning off all lights and leaves just raw RGB data.

Baking with lights is good for interiors and exteriors (if you never intend to change weather or day time).

If you will bake lights on character which is moving, transforming it will look no good. Lights should be added to moving character and items by game engine. Character/item should also cast shadow to the scene, but it's not job for LW but game engine.

For baking characters people use Occlusion shaders/nodes.

02-29-2012, 02:58 PM
If you're not familiar with occlusion shaders here is couple videos

Occlusion sends rays in all directions to check whether there is geometry close to spot, and if so, darkening spot. So corners will be darker than straight wall. See end of last video. That looks quite good.

02-29-2012, 03:04 PM
Thanks guys will take a look in a minute, crazy bump lets you do occlusion instead of normal so will give that a try.

02-29-2012, 03:22 PM
Do u have a trial version of that? don't have 50 dollars on me lol.

02-29-2012, 03:42 PM
Do u have a trial version of that? don't have 50 dollars on me lol.

Of what?
SurfaceBakingLights is for free.

02-29-2012, 03:46 PM
lol so it is , im sorry was looking at the wrong one lol

02-29-2012, 04:21 PM
This tool is fantastic thanks so much mate :D

Can I still use normal maps now though? Occlusion seems to be great for shadows but seeing as my models are really low poly and most of the detail is in the texture normal maps seem the best thing for me to use?

02-29-2012, 04:27 PM
Use Occlusion II node, it will take Normal and Bump into account.

02-29-2012, 04:29 PM
Actually when I bake it with normal map looks horrible when exported all blurry :(

Should I just bake the texture without the normal maps?

02-29-2012, 04:34 PM
Because this is the method I am using at the moment if it makes sense...

I pick single surfaces for example will select one side of a house instead of four and texture them individually planar projected onto the model...

Use normal map in Lightwave then surface baking camera, only trouble is looks stunning before you bake the texture but once its baked and the UV is wrapped it looks **** and blurry,

02-29-2012, 04:36 PM
Better show screen-shots and/or attach scene..

Texture should be at minimum 1024x1024, the more the better. You need to optimize space, so as much is used.

02-29-2012, 04:39 PM
btw, did you used Occlusion II node, but didn't turn off Interpolation?

02-29-2012, 05:12 PM
I have made ball, default settings, but sub-patched.

Then main UV map, default sphere.

So you can remake it.

Then used Occlussion II node, connected to Diffuse Shading, bake it.


Then added 3D Textures > Crumple and connected to Bump.



288 polygons and see how much of details because of Occlusion and procedural texture that has been baked to image.

02-29-2012, 05:41 PM
Hey mate cannot find Occlusion II in the node editor :S

02-29-2012, 05:44 PM
enter name of node and press enter. That's what for LW v11 has filter string control.

It's in Shaders > Diffuse > Occlusion II

02-29-2012, 05:57 PM
Thanks did that looks awesome when rendered, but still looks no depth to it and blurry when just baking to UV and putting the UV back on the model even with 1024 X 1024

02-29-2012, 06:02 PM
But where blurry? In OpenGL viewport or in rerendering after putting back?

If it's viewport- press 'd' and in GL tab pick up texture resolution.

ps. Interpolated in Occlusion II node settings.

03-01-2012, 02:38 AM
Works brilliantly thanks mate :D

Could I improve the texture itself by making the distance greater when baking than 100 um? If so what distance would you reccomend?

03-01-2012, 10:25 AM
Surface baking camera is implemented as camera that flies above whole object. So f.e. spot at world_spot_position vector is rendered. Camera location will be world_spot_position + direction * distance. Ray is casted from that location to spot. There are cases like corners, dense geometry etc. where ray might not be hitting desired geometry. And only in such situations you need to adjust distance parameter.

03-01-2012, 10:40 AM
That makes no sense to me mate im sorry :( I'm not very techincal on the teminology when it comes to Lightwave lol.

Will post some screenshots later.