Multi/Sub-Object vs texturing an unwrap
I might be misinterpreting its use, but multi/sub-objects allow you to export multiple materials as one material? You still have to import the textures in UDK, but this groups everything in one file of sorts? I'm not understanding how you apply a multi/sub-object material to an object you've already unwrapped and textured? For instance, I just watched a tutorial where an Ak-47 was modeled, the wood parts of the model were given ID 1, and the metal parts to ID 2. I understand how to apply the IDs, but can't figure out the process behind unwrapping and texturing in the 0-1 UV space vs applying material IDs. It seems like a waste of memory to apply individual textures to an object you have to unwrap anyways, but I know I'm missing some vital piece of information to lift this cloud of confusion.
Multi/Sub offers you the possibility, to apply multiple materials onto one mesh. For instance a window, where you have two different materials for the glass and the frame. But it does need Unwrap too. Every material ID is never the less based on the UV coordinates. You always need UV coordinates, but you might not need seperate IDs. I assume it's a consideration of performance if you use different materials or doing all in one material and using masks instead.
Different UV sets however just give you the opportunity to align textures differently. However I still do not know how you can apply different materials/textures to different UV sets or even address different UVs in one material. I know the basic skysphere for example comes with 4 UV Setups, but I haven't figured out why or if it's even used. If it's even possible at all.
In addition to that Unwrap is not only for the coordinates of your diffuse texture, but for lighmaps too. Check out this for more in-depth information: http://udn.epicgames.com/Three/LightMapUnwrapping.html
What is best for performance, for example building that have 3 multisub textures size 512x512 also those textures can be used for other meshes walls, floors etc, or one single 1024x1024 made strictly for that building.
MSgt. Shooter Person
I would try to keep 1 material to a mesh when possible. It's not always possible, but you can certainly achieve the same results with clever shading. I do this because if I have a mesh with three materials on it, the engine has to draw (render) that mesh 3 times (probably multiple draw calls per time). If there's a single material, you cut down the times that mesh needs to be drawn. That's what I try to do anyways and why.
So, it really boils down to what's in your scene and whether or not you have the overhead to allow for MSO's. Other considerations are, like you pointed out, three textures that can be used for other meshes. Well, are those tiled textures or just a flat texture sheet? If they are tileable textures, it'd be hard to stack those in quads on a single sheet, right?
Lot's of considerations here...but when I come across this, I consider how I can NOT use MSO's and work it from there. Sometimes the answer is, I have to use MSO's anyway.
@haldolium: You CAN apply different UV coordinates to a single mesh. By default, (in UDK) channel 0 is texture and 1 is lightmap. But you can stack multiple channels for different effects. As an example, you can have a tiled map for, say, a brick wall and also have another set of UV's on a different channel for something like grunge or an effects layer or whatever. In fact, using multiple UV channels, you can achieve cool effects.
I know. The question is how do I tell Unreal to use them? So far the only channel option I've ever seen is the one for the Lightmap-Channel. What material node and/or other setting is required to *apply* a texture to a certain UV channel other then the default 0?
MSgt. Shooter Person
TextCoord into the textures UV nub. Set the Coordinate Index in the TextCoord.
I'm pretty sure I understand things now. I just put to practice what you said about tillable textures and their unwrap. I feel like an idiot haha. For some reason I didn't think Unreal would remember how I set the UV's for a tiling texture. Silly me haha. I can see how a multi/sub-object works now. Like you said Tearl, the whole draw call increase might be a deciding factor when using multi/sub-object materials.
Last edited by Chaserm2; 04-07-2012 at 04:06 AM.