Surface baking

From LightWiki

Jump to: navigation, search

back to the Tutorial Ideas page

In the past, LightWave users that wanted to bake their textures had to use LightWave's Surface Baker shader to do so. It wasn't very fast and it meant that you needed to add it and remove it manually for each object you wished to bake. With LightWave v9 there's a much simpler solution that relies on the new surface baking camera. You can leave your scene as it is and add new surface baking cameras to it that you switch between for rendering the baked surfaces. Obviously, this method relies on all the skills pertaining to surface baking normally, so this tutorial won't go into the need or the method for creating UV maps for your objects, nor which components you should bake.

There are two steps to this tutorial. The first is setting up cameras for each object for wish you wish to bake a surface, the second is arranging that you can simply hit F10 and walk away knowing that your images directory will get filled with the baked images for all the objects you've set up a camera.

Oh and by the way, if, even after reading this superb explanation of a far superior workflow you'd still like to go back to single-threaded old Surface Baker you are more than welcome, but good luck getting it to work nicely. It keeps crashing on me these days if I try.

Setting up your cameras

If you already have cameras in your scene, don't move them. You should need to add additional cameras and because the surface baking camera works a little differently to the others - you don't need to move it at all. Make sure the name you give it is unambiguous for your own sake. I always call the cameras "SBCAM_" and end the name with the object name or a description.

The next step is to go into the Camera Properties for the surface baking camera and choose the mesh you wish to bake, along with the UV map you are going to bake to.

Once you've done this you should set the resolution you are going to use for rendering, along with the anti-aliasing, if any. Using the Globals for this is very useful since you can decide on one resolution to make all your texture maps. Equally, you can choose individual settings here if you so desire.

Setting up camera switching

You are going to want to save your scene under a different name for the purposes of baking your textures, but other than that it can be unchanged. Once done, use the Master plug-in CameraSelector (hit Ctrl-q to get the panel). Don't add a switch to frame 0 since LightWave is normally set up to render frames 1-n, but other than that you are only going to need as many frames as you have surfaces to bake. Just go to the frame you want, select the camera you want and hit Add to the CameraSelector panel. LightWave makes this very quick to do since you can frame advance by hitting the right cursor and change camera (if it's your currently selected item) by hitting the down cursor.

Caveats

  • Don't use the Camera Motion Options Modifier CameraSelector Trigger

It is not needed in LightWave v9 and can cause navigation problems in your scene - not allowing you to select a different camera on a specific frame, etc.

  • Don't use different bake resolutions

Right now in LightWave v9.0 (build 998) there is a bug that causes LightWave to crash out completely if you have different resolutions for your cameras when you hit F10. The bug has already been reported and will no doubt be swiftly resolved. For the time being, unfortunately you'll need to render to the highest resolution you require and scale the image in an art package afterwards.

  • Don't use the old Surface Baker

It's single-threaded and cranky.


There's lots more to write and some pics too...

Views
Personal tools