After going through the process of baking out textures multiple times I decided enough was enough! A simple tool was needed that could let artists easily render out custom baked maps.
Although Maya comes with a few default options to do this, I always felt it was really convoluted to do every time, especially at the rate we were doing it. After the artist selects the objects they want to bake out they get the option to select a couple of passes:
- AO, ambient occlusion
- Luminance, basically light intensity over the surface
- SelfShadow, drop shadows the objects (or other objects) cast on themselves
- Color (albedo), baking the main texture
- UV, generates a UV snapshot
The user is allowed to give a basename for the rendered maps, an output folder (which by default is based on the scene's location) and set the resolution. Time to put it in the oven!
To bake it out our models use a special UV set (since a lightmap can't have any overlapping UVs) called UVset_lightmap. If this is not found the script assumes you want to use the primary UV set. We could also do this automatically, but I prefer the artist to do it themselves so they can determine some custom shell layout and sizing.
For the different passes I opted to use a separate scene with specific materials that is referenced in at runtime (and removed after) Although I'm not a big fan of scripts needing other files to work, in this case it's just easier to tweak and set up. This also gives the flexibility to create your own passes by adding in different materials. It would be possible to check the materials from the referenced file (using a specific naming convention so you can include and exclude materials and derive a suffix from it) and generate the renderpass options on the fly.
Depending on the pass we're baking the objects are assigned the material from the referenced file and baked out. Since some bakes can take a while, I added a progressbar explaining which pass is currently being baked.
In part 2, I'll talk about how we process these baked maps in Photoshop.
To bake it out our models use a special UV set (since a lightmap can't have any overlapping UVs) called UVset_lightmap. If this is not found the script assumes you want to use the primary UV set. We could also do this automatically, but I prefer the artist to do it themselves so they can determine some custom shell layout and sizing.
For the different passes I opted to use a separate scene with specific materials that is referenced in at runtime (and removed after) Although I'm not a big fan of scripts needing other files to work, in this case it's just easier to tweak and set up. This also gives the flexibility to create your own passes by adding in different materials. It would be possible to check the materials from the referenced file (using a specific naming convention so you can include and exclude materials and derive a suffix from it) and generate the renderpass options on the fly.
Depending on the pass we're baking the objects are assigned the material from the referenced file and baked out. Since some bakes can take a while, I added a progressbar explaining which pass is currently being baked.
In part 2, I'll talk about how we process these baked maps in Photoshop.
No comments:
Post a Comment