Monday, October 8, 2012

Adding a 2nd Material slot for an asset (like glass!) for UDK

The goal here is to create a 2nd Material slot for our object so that we can create 2 materials inside of UDK - 1 for our regular texture / material for our asset, and the 2nd material for glass.

To begin with, I have an Iron Lung asset I want to add glass to. Here's the asset inside of 3ds Max:

Notice I have modeled the glass and it is simply floating in place with a standard "blue" material I slapped on it. The rest of the object is unwrapped and attached properly. I now have 2 objects in the scene - one for the glass, and one for everything else.

I also have UV'd both the regular prop, AND the glass as though they were separate. Here's the Iron Lung UVs:

And here are the UVs for the glass:

Next up - Attach everything together so that you now have ONE asset, with both the "regular" prop and the glass attached. When this happens, if you add another Unwrap UVW modifier, you will see both "parts" UV's on top of one another. Don't panic - this is fine:

The last step to get it to work "right" is to select all of the Polygons of the glass (or Elements) and Assign a brand new, random texture to the faces. It doesn't matter if it's your "proper" glass texture, or a picture of you from Facebook - SOMEthing needs to be applied to the glass. You can wait for final textures once it's in Unreal, but an actual texture needs to be applied. A colored material slot won't work. Here I've gone ahead and applied a random picture on my desktop to the faces of the glass:

Export the model from 3ds Max just like normal, and import into UDK the same as you normally would. If done correctly, when you open the asset up inside of Unreal, you should see 2 material slots as opposed to the traditional 1. One will be for your glass, the other for your asset. Simply UV, texture, and create materials accordingly for both material slots and plug them in to the necessary location:

And just like magic, you should now be able to create a sweet material for both of your different material slots. Huzzah.

No comments:

Post a Comment