Hi everyone, this is my first tutorial on the blog.
I’m going to describe a technique that reduces number of texture files used on your asset by almost 3 times. On multiple occasions, I saw game artists store different information in R,G and B channels of a texture map, and in that way reduce the number of textures in engine. For example, store bump into Red channel, specular into Green channel and AO into Blue channel.
I wanted to replicate this technique in Mari, without a need to manually add channels in Photoshop, because when you have a large number of tiles, that can be a tedious work. After a couple of tests and some search on forums, I couldn’t make it to work, so I asked Jens Kafitz, lookdev/texture Artist and creator of the great Mari Extension Pack. After a couple of emails, he described me a way how to make Mari write different information into different channels. Because there is little to none information about this online (or I couldn’t find it), I decided to describe this technique and share it with everyone.
First, I’m going to show this method on a simple box, as it will be easier to explain. I’ll start by creating a new project, and basic channels – Red, Green and Blue – which will serve for testing purposes.
After that, I painted R, G and B letters in Red, Green and Blue channels respectively, just so we can see the difference in information written in the channels.
Next, I created a new channel called utility.RGB, in which we will store our R,G and B channel information. Add Red, Green and Blue channels as layers to the new utility.RGB channel using right click > Add Channel Layer. After that you will have something like this:
Add a color switch adjustment stack in each layer and set the color switch adjustment as following: for Red layer turn off everything except Red, for Green layer turn off everything except Green, and for Blue layer turn off everything except Blue.
Now, select each of our layers (Red, Green and Blue) and set them to Add blend mode. After this step you will get colorful representation of your channel information. Group Red, Green and Blue layers and set the new group to the CopyRGB blend mode. In the end you will have something like this:
After that, you can export your texture. If everything is ok, you should have different information in each channel of the texture. You can import it in Photoshop and check the channels. I created a short video about the entire process, so feel free to watch it. 🙂
Using the same technique you can write different information into different channels. For example, I’ve used this technique when I did a car for my artwork Long Exposure. I created two channels called utility.budsts (R – bump, G – diffuse strength, B – transmission strength) and utility.rerosm (R – reflectivity, G – spec roughness, B – shell mask). With these two channels I covered six shader slots. If I were to use each channel on a separate texture file I would have to have six different textures, and now I have only two. It doesn’t sounds as much, but I had 115 UV tiles for the entire car, each 4k. That is a lot of saved disk space, ram for rendering, time for export and .tx conversion (I use Arnold for rendering). When you add a diffuse channel into account, you would end up with 920 texture files. With this technique I reduced the number to 345 files (diffuse, utility.budsts and utility.rerosm). Here is the picture of my final shader for the car and one of the colorful utility channels:
That’s all for this blog post. I hope I helped someone with this technique. Also, I wish to thank Jens Kafitz for helping me with this matter. Again, check his website and Mari Extension pack, it’s a great set of new tools, nodes, procedurals, etc.
This is the first time I wrote a tutorial by myself and if you have any comments or suggestions on how to improve the content, let me know through the comments or contact section. If you like this type of content Subscribe to my blog.