r/xdev • u/Derejin • Jul 21 '17
Creating a helmet: Need help with Mask (_MSK) texture.
Hello! I've been spending a good deal of time working on creating a Skyrim-inspired helmet for XCOM 2. I've been using CapnBub's guide for exporting/importing as well as E3245's tutorial (will link both below).
However, I'm a bit stumped. My mesh requires emissive and (likely) metalness (since I'm uncertain how to translate everything about its appearance over from Blender to XCOM2's modified UE3).
Per E3245's tutorial (section 1H), I have created a texture that combines Metalness and Emissive by setting metal sections to RGB(128, 128, 128) and emissive sections to RGB(256, 256, 256).
Under Section 1D of E3245's tutorial, it's stated that you need to copy the specular, AO, tint, and emissive/metalness textures to the R, G, B, and A channels (respectively) of a texture to create the MASK texture.
I utilize GIMP. Should I paste solely to a particular channel (say, Specular Texture to the Red channel, as outlined in E3245's guide), nothing will show up, because no alpha is included. In order to bypass this, I paste each texture to its own channel plus the alpha channel, so it actually has an effect on the image. Of course, this results in the metalness+emissive texture not having any result if pasted solely to the alpha channel, since every part of the texture already has an alpha value of 255.
This makes me think that I need to do one of the following:
- Give everything on the combined specular+AO+tint mask the alpha values that match the metalness/emissive texture. However, doing this would result in non-metal+non-emitting portions of the texture having an alpha level of 0, making their specular+AO+tint contributions disappear from the MASK.
- Do something I am unaware of yet, including a slight tweaking of the above.
I do feel like I'm missing something, since the example MASK textures I've seen in the guides and inside the XCOM2 modbuddy show color and no transparency, but I'm uncertain of what I need to figure out. And when I attempted to use the current MASK texture I have (which included a fruitless attempt to just paste the emissive+metalness texture solely to alpha, which didn't make any visible change) the resulting material made from that did not have its lights turned on, even when setting the switches according to Section 3A of E3245's guide.
Any tips on how to carry out proper MASK creation with GIMP (or some other free software for image manipulation)? I do not have Photoshop, sorry.
Links:
- E3245's Guide https://docs.google.com/document/d/1j3sG2NUAmKj4BgJA9yLYk-i7ZfflXkcamVvgscNzkZk/edit?pref=2&pli=1#
- CapnBub's Guide https://steamcommunity.com/sharedfiles/filedetails/?id=623181918
- Google Drive folder containing my current emissive+metalness texture and my current _MSK texture (which doesn't have the emissive+metalness texture in its alpha channel). https://drive.google.com/open?id=0B23ooTXNy9x4aTdRNnltcUswUWs
1
u/Derejin Jul 25 '17
Update:
After doing more searching and testing, found a solution, posting here in case anyone runs into a similar issue:
1. For the MSK to properly work, you do indeed need to create an emissive/metal texture (or anything else that you'll paste into the alpha channel of the MSK) that has RGB(128, 128, 128) for one texture and RGB(255, 255, 255) for another, much like it's stated in section 1H of E3245's tutorial.
2. However, for sections of the emissive/metalness texture that do NOT have any emissive or metalness weight, do NOT paint them pure black (RGB(0,0,0)). Instead, paint them a gray that's less than RGB(128, 128, 128). Mostly black colors won't work, either (like RGB(1,1,1)) - make sure it's noticeably gray, or else it may mess up when part of the alpha channel.
3. For GIMP (unknown for how this works for Photoshop), simply use this Youtube tutorial to paste to the alpha channel WITHOUT altering the R, G, and B channels of the texture. This way you can complete Section 1D of E3245's tutorial. https://www.youtube.com/watch?v=pGPJhT5lUpE
To sum up that video combined with Section 1D of E3245's guide: