Game Development Community

Lightwave Texture Baker

by Deleted deleted · in Artist Corner · 10/28/2004 (9:34 am) · 5 replies

I am in the process of teaching myself some 3D modeling and I use lightwave. So far I love the workflow (I have tried almost all the major players out there) and Lightwave is great, but the Texture Baker always seems to yield different results everytime. I am certain it would do what I want it to do if I knew what I was doing with it, well here is the problem:
I need to create some dirty looking desert camo textures so what I do is start with a tileable camoflague texture. But on top of that I want to add some of the procedual textures and lower their opacities and so on to create some random grudge, then I add some bumpmapping, and I want that all baked into a nice texture. I guess I could just use photoshop, but I was trying to get the most efficient workflow and this seemed like it, but anyway here is my layer setup.

ColorMap
--Procedural Map(s) [~50% opacitys]
--Image Map (repeated and mapped to y-axis)[100% opacity]

BumpMap
--Procedural Map(s)

In the Surface Baker shader, I have a UV map selected. How can I get all of these baked into a texture? I do not want shadows baked into the texture because this is a dts and I am assuming will cast shadows on itself in torque?

Thoughts, am I crazy? Should I just use a paint/photo manipulation? I will use photoshop to tweak the final baked texture of course, but I want to use Lightwave for a starting point.

#1
10/28/2004 (10:51 am)
Sounds like you would be better off using the burn and dodge tools in photo shop. I haven't used lightwave since version 2 :O but I try to use procedurals as little as possible.
#2
10/28/2004 (11:22 am)
Well I would also like the get the bumpmapping baked on their if I could.

Why do you avoid procedurals, any particular reason why I should avoid them as well?
#3
10/28/2004 (11:28 am)
Greetings!

Well, LightWave has come along quite a ways since version 2! Heck, it was still part of the Video Toaster back then. :o)

Coleman, it's quite easy to make a colour map through texture baking in LightWave. I'd recommend you ask around at spinquad.com or cgtalk.com, or find a tutorial at flay.com. I've done it before, but unfortunately don't have time at the moment to write up a tutorial.

To get it to work with Torque, the process would be no different than for another engine.

Also note that there is no self-shadowing within the TGE, so adding in "fake" shadows to a colour map is quite common.

Here's the result of a baked LightWave object built using only procedurals and gradients displayed in the TGE (built as an experiment):

www.gnometech.com/torque/images/bakedstone.jpg
As for bump mapping, I've not yet tried to bake that out as a separate image. If you're after normal mapping (all the rage now, and usable in the TSE) I know there is a plug-in out there to extract the information from LightWave and into an image map. Again, I'd recommend searching the above sites.

I hope that helps out a little. If you have a specific question feel free to ask and I'll see what I can do, although I may not be prompt. :o)

- LightWave Dave
#4
11/04/2004 (1:43 pm)
So basically all proceduals and gradiants need to be baked onto an image, there is no way to have those exported as well?

If that is the case I will just need to learn how to properly UV map my models for the image baking.
#5
11/04/2004 (3:07 pm)
Hi Coleman,

I've used radiosity-baked procedurals as a starting point for object textures on a couple of Torque engine projects.

First, you'll want to make a UV map in Modeler for your object. You can use whatever projections you like and arrange them in a Modeler viewport (there's a "UV texture" option in the viewport pulldowns) for best use of space.

Once you've got your UVs set up, you can bring the object into Layout. Set up your lighting and whatnot, and then you can go into the Surface Editor and add the Surface Baker shader to one of the object's surfaces.

In most cases, you'll want to check the "Bake Entire Object" option. (If you plan to use several texture maps for a single object, you may not want to bake the object, but that's a segment for another show... ;) )

Since you want to bake it to an image map, choose Image in the "Bake to" pull down.

Mark checkboxes for the things you wish to have baked (color, illumination, shaders, etc.)

Use the "UV Map" pulldown to choose the map that you created in Modeler, and set the resolution to 512 for use in Torque (most of the time). The question of whether to use antialiasing....well, it depends. Depending on the model, surfacing, and lighting, you may way to bake at 1024 with no AA and then reduce the texture size to 512. Other times, you may just want to bake at 512 with AA.

For image type, I tend to use Targa (not the numbered LW_TGAs, but the "Targa Format" option all the way at the bottom of the list). Once I get the model over into Photoshop for some tweaking, I tend to add layers and save the master as a PSD, then output Torque-friendly PNGs from there.

Be sure to make note of where you save the baked texture file and what you name it so you can find it later.

To do the baking, just hit F9 to render the scene. When LightWave goes to render the first poly of the model with the Surface Baker applied, it will start the baking process.

A few more things -- common troubles for first-time bakers:

1. As soon as your baking is done and you are going to go work with your baked texture in your image editor or whatever, UNCHECK the Surface Baker option in the Shader tab of the Surface Editor. If you don't, the next time you render the scene, it will overwrite your baked texture if none of the names have been changed.

2. When you import the baked texture into LightWave and apply it to the model, be sure to disable the texture's alpha channel in the Image Editor. I don't think this is as much a problem with PNGs and DTS exports, but with some file formats, it can be troublesome when rendering with LightWave.

3. Gradients based on any kind of incidence (incidence angle/light incidence) are specific to the camera's position and will not be baked.

The thing I can't seem to remember at the moment is whether I put textures with radiosity-baked illumination (for self-shadowing) into the luminosity channel or just the color channel of the Surface Editor before exporting to DTS...

In any case, this should get you on your way.