Texture Baking: Baking Patterns To Use In An Incompatible Render
By Neil Blevins
Created On: Dec 16th 2013
Updated On: Feb 17th 2014

So lets say you want to use the technique outlined in my Worn Edges Using A Distorted Vertex Map tutorial, but you want to render your model in mentalray for 3dsmax, and mentalray doesn't have the WarpTexture plugin necessary to use the technique. Well one way around this issue is Texture Baking. Texture Baking allows you to take any map or map chain and bake it into a series of texture maps. This can be used to speed up slower to render maps, or to use maps in an incompatible renderer, or any number of other uses. Think of texture baking as a way to take one method for placing your texture onto a surface and transfer it to a new placement method, frequently UVs or PTEX.

So for this tutorial, lets start with a mesh, and first perform the steps described in my Worn Edges Using A Distorted Vertex Map tutorial to add edge wear.

Now because this map requires the use of the WarpTexture plugin, you cannot render this map in mentalray. So lets do a texture bake.

For this tutorial, you'll need my Soulburn Script pack, as you'll be using the texmapBaker Script.

1) Select your objects
2) Open the Material Editor and have active the map you want to bake (in this case, your WarpTexture)

3) Open the texmapBaker UI

4) Choose the path you want to bake to (this will write out one bitmap per object into this path, each file named after the object.)
5) Since my objects don't already have UVs, I'm choosing Automatic UV Unwrap
6) Turn on Map Switcher, set to Mentalray Multi-Map (since we're going to render the final result in mentalray)
7) Hit Apply.
8) You'll now have a series of texture written out to that directory...

9) You also now have in slot 2 of your Material Editor a mentalray Multi-Map that's pointing to all of these maps...

10) And if you check out your objects, they each have an Object ID that's been set to match the maps and their place in the Multi-Map...

11) Now replace the WarpTexture Map in the material editor with your Multi-Map.
12) Change renderer to mentalray, and hit render

There you go, you can now use the result of a WarpTexture in mentalray.

There are some disadvantages of this technique. Since you have all of these bitmaps, you're now probably going to use up a lot more texture memory than using the original map. Also, mentalray's Multi-Map has a limit for 20 slots, so this specific technique won't work with over 20 objects. But if you're baking something to be used in vray, Vray's MultiSubTex has unlimited slots and so works fine with larger object sets, or you can also use Vray's VrayHDRI map to load an unlimited number of bitmaps.

For more information on which Switcher map to use and which ID type to choose, read my lesson on Switchers And IDs, Which To Use When.

Anyways, hope that helps show an example of where Texture Baking can be useful for your workflow.

This site is ©2023 by Neil Blevins, All rights are reserved.
NeilBlevins.com Twitter Mastodon Bluesky Instagram Blogger Facebook LinkedIn ArtStation Kickstarter Gumroad YouTube IMDB