Announcement

Collapse
No announcement yet.

Need advice for UVW Mapping...3DSMax

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need advice for UVW Mapping...3DSMax

    Can someone tell me the easiest way to map standard textures to individual sufraces of a model? I've figured out how to do a UVWUnwrap on the model then do flatten mapping (model is a simple stairway) to create a UVW template, which I can then open in photoshop and paint the textures on. Is this the easiest way to do this? I want to use the standard textures for my models for the time and it seems that this method defeats that. Or am I just not understanding this process? Is it not possible to apply textures to individual surfaces then edit them in the same way that you texture with UnrealEd in 3DSMax?

    Can someone point me in the right direction on UVW mapping several different textures to several different faces of a model, while using the standard texture sets? Any help is appreciated!!

    #2
    Flattening the UV's and photoshopping is how you skin a mesh, which is not the way that I recommend most meshes be made for a couple of reasons.

    All you need to do is create a Multi/Sub Material that has the number of textures you wish to use and assign each of the desired UT2004 textures to those diffuses.
    Then go to your mesh and assign the Material ID to the faces where you wish each of those textures to appear.
    If the textures require different UV coordinates, detach the faces for each specific texture if they are on the same object, they will then be their own object that you can assign a UV Map to and adjust the mapping type/size accordingly.

    Save this mesh as .max so that you have the source setup.
    When you export, select all objects, do a Collapse on their stack, then select a base object and Attach all others to it, then select all Vertices and Weld, and export as .ase.

    Be sure to create your own simplified collision model if your mesh is complex or a lot of polys. They are easy to do. See UDN. I use MCDCX Type 1 collisions created out of basic primitive shapes (cubes and cylinders), I set them to the dark red color, and convert them to Editable Mesh. Since they have the same name prefix, it is easy to hide them if you need to tweak the mesh such as adjusting UVs.

    Fordy's tutorial will probably help...

    Comment


      #3
      OK, maybe I'm misunderstanding this a bit.

      When you skin a mesh, lets say by flatten mapping and painting the textures on the UVW template, does the template get saved as part of the mesh or is the template a new custom texture that needs to be saved in a texture package? I've refrained from skinning any meshes as of yet because I have it in my head that by skinning the mesh this way I'm creating new custom textures for each mesh. If the mapping information and texture template information is actually saved as part of the mesh then I'll not worry about it and go ahead and start skinning my meshes. I just don't want a bunch of custom texture files that will only be useful for these meshes if I can help it. If that's just the nature of the beast when creating your own custom meshes then I'll just have to deal with it I suppose. I just need to be clear on this before I proceed.
      Thanks in advance for clearing this up for me!

      Comment


        #4
        OK, maybe I'm misunderstanding this a bit.

        When you skin a mesh, lets say by flatten mapping and painting the textures on the UVW template, does the template get saved as part of the mesh or is the template a new custom texture that needs to be saved in a texture package? I've refrained from skinning any meshes as of yet because I have it in my head that by skinning the mesh this way I'm creating new custom textures for each mesh. If the mapping information and texture template information is actually saved as part of the mesh then I'll not worry about it and go ahead and start skinning my meshes. I just don't want a bunch of custom texture files that will only be useful for these meshes if I can help it. If that's just the nature of the beast when creating your own custom meshes then I'll just have to deal with it I suppose. I just need to be clear on this before I proceed.
        Thanks in advance for clearing this up for me!

        Comment


          #5
          You have two methods you can use when you wish to have multiple textures assigned to one mesh: Multi/Sub-Object texturing or Skinning.

          In most cases you should use the Multi/Sub-Object method.
          In both cases, any UV mapping applied with UV Map or UVW Unwrap becomes part of the mesh itself. If you don't collapse Max's stack, you will see the UV modifiers on each object in Max.


          The UV coordinates on each face, whether you simply apply a UV Map modifier and set it to Box, Planar, or Cylindrical, or whether you flatten with the UVW Unwrap modifier, are saved with the mesh model.
          Just like you can create certain primitives or loft and select the automatic mapping coordinates creation option within Max.
          The coordinates basically become part of the properties of each face.


          For Multi/Sub-Object, you simply create a Multi/Sub-Object Material which effectively allows you to assign multiple textures to a mesh object on a per-face level (ie. sub-object). Simply assign that Material (just drag it onto) to a mesh, and it gives you per-face control over what textures are applied.

          Each face in the mesh has a Material ID property which directly relates numerically to the entries in the Multi/Sub-Object Material.

          This method works best and easiest with UnrealEd since you can use stock textures and apply them to various faces of the mesh.
          The advantage to this method is that you don't have to spend the time creating any custom textures, you are simply referencing the stock UT textures and telling the engine where to show them on your mesh. One big advantage to this is that the textures are usually tileable, so you can create mapping coordinates that are more real-world scale and the mesh will look of higher quality. Just make sure that you have the required stock package loaded when you import your mesh, otherwise you have to manually re-assign the textures to the StaticMesh Material slots in UnrealEd.
          Over the past few years I have exported many of the stock UT textures and converted them to .bmp or .tga so that I can reference them in Max when I am creating my custom meshes.
          Create your mesh how you want, then simply go around and pick the various faces that you want to be specific textures, and change their Material ID accordingly.

          If the various textures require different mapping coordinates, due to scale or rotational differences, you simply use multiple UV Map modifiers and apply the required Box, Planar, Cylindrical mapping as you need it on those groups of faces.
          This may require that you detach certain faces to accomplish this.

          For example, you could create a simple cylinder and wish to use one texture around its circumference and another texture on its caps.
          For two textures, you would create a Multi/Sub-Object Material and specify two textures as the number, then assign the UT2004 textures to the Diffuse property of each sub-material.
          Then on the model you would go to Face level and select the circumference faces and change their Material ID to 1, then select the caps and change their Material ID to 2. Now we have two textures applied to one mesh.
          You could simply try using the UV Map cylindrical mapping with Caps checked, but the caps may not be textured the way you want.
          So you would select the caps and Detach them as a separate object -- this does not affect the Multi/Sub-Object Material that was previously applied.
          Now you can apply another UV Map modifier to the caps such as Planar and adjust it however you require.
          Multiple mesh objects in a scene can all share this one same Multi/Sub-Object Material, so when you are done, you simply select all objects, Collapse their stacks, Attach them all into one mesh, Weld all of the Vertices, then export this as .ase.
          You end up with one mesh object that has multiple materials -- each material in the original mesh becomes a property in the UnrealEd StaticMesh browser, so in the case of the cylinder, you would see two Material entries in UnrealEd where the textures were specified.


          For flattening (skinning) though, you must also save out from Max that flattened UV information as a texture that you can then paint on.

          The downsides to skinning are that it creates a new custom texture for every unique skinned mesh which can increase your map size quickly; skinning is only really any good for small and medium size models, large models with a single 1024x1024 skin usually look really blurry up close (look at the PipeStatic mesh package); flattening UVs doesn't always result in a good polygon layout and on certain designs of models you will visually see texture stretching and other anomalies, skinning also requires that you be a good artist and it can take a lot of hours to paint up the custom textures.


          For small objects like Pickup Bases and Projectiles, skinning is the way to go, but for virtually all other meshes the Multi/Sub-Object is usually faster to create and usually results in a better looking final mesh.

          Comment


            #6
            Thanks DG!
            You answered exactly what I was asking! Sometimes my questions can be vague at best. It was the custom texture per mesh when using the skinning method that I was concerned about. That wouldn't be a bad way to texture something simple that was going to require your very own texture, such as my water tank that I want stenciled with my own wording, but for wall panels and such I wouldn't have wanted to have to go through the skinning process and create a new texture for each different panel.

            Thanks for the in depth explanation of the proper way to do this!! This will save me much headache!!

            Comment


              #7
              You're welcome.
              I guess that I should create a step-by-step Max to UnrealEd mesh tutorial.

              Concerning the water tank stencil, instead of creating a full single skin for the entire tank, I would do either of two things (depending on the actual mesh design and complexity):

              - Export a UT texture such as a 512x512 rusted metal and simply add the text to it and re-import it, then use a standard cylindrical UV mapping on the tank to apply the modified texture.
              This way, if the tank mesh has other details like pipes, valves, bands, footings, those can be additional Multi/Sub-Object textures along with my one single custom texture. By still using multiple higher-resolution textures, the detail quality of the tank will look better.
              There will still be one large custom texture, but that will be used in conjunction with other large stock textures for higher quality.
              This is guaranteed to look better than most skinned meshes that have only just the one 1024x1024 texture for the entire object.

              If you wish to use a lower resolution custom texture so that your map file size is smaller, the text can be placed onto the mesh as a texture that is applied to a panel built into the mesh itself, so only those faces would have that sub-object material, the rest of the tank would be the high-res stock textures.
              This method also works well for things such as console displays and wall computers, where you can use high-res stock textures for the "frame" and then portions of the mesh, such as the small faces of the actual screen panels and displays, can be smaller custom textures.
              The displays in my Arctika map are done like this.

              - Apply the text to the tank as a decal using a Projector. I do this in a lot of my maps where I want custom text such as the name of a Base or Room, adding self-illum caution striping and warning messages, etc.
              See the bases in my SandStone map for an example.

              Comment


                #8
                just remember when you switch to UE3 that multi/sub object materials on meshes are a VERY BAD IDEA.

                Comment


                  #9
                  According to?
                  I don't recall seeing anything regarding that on UDN 3.

                  Many of the Epic UE3 meshes are using multiple materials.
                  So if it is that bad, then why are they doing it?

                  And DirectX itself on mesh functions (such as D3DXComputeTangentFrame etc.) also directly supports multiple textures/texture-coordinates per mesh.

                  However, in both engines (UE2.x and UE3) you want to be careful how many textures you apply to one mesh as the renderer may render a mesh with multiple textures slower than a mesh with only one texture.

                  Always skinning in UE3 can be a bad idea simply because of the number of unique textures that result from this.
                  See this BUF thread post...
                  Here is the full thread (long)...

                  And due to no Detail Textures in UE3, it makes skinning look very poor IMHO, especially if the mesh detail (face count) is high, as that leaves less texture area per face, resulting in blocky blurry meshes.

                  There are a number of differences in how the two engines render staticmeshes, so anyone moving across the engines must be aware of these. Including the differences of optimum face count per mesh, lighting, and culling.

                  Comment


                    #10
                    as far as i know, each time you render a material on a mesh in UE3, you are in essence causing the engine to re-render the mesh. so, diffuse, spec and normal and you've already tripled your CPU hit. the memory footprint adds up QUICKLY. there is, or course, a balance to that, which needs to take into account material usage over the entire level, which could balance texture calls vs. mesh renders, and a host of other issues.

                    i have worked on/am working on several UE3 titles (Mass Effect, Rogue Warrior, and a few unannounced titles) and all of them have STRESSED using a traditional, single material skinning method. i've discussed this at length with a couple creative directors, and followed the UDN emails and threads discussing this. multi/sub obj can be done, but it's good to save it for when you REALLY need it.

                    besides, using multi/sub obj materials on UE3 meshes is just apt to look bad, because the seams between the materials will be that much harder to hide (unless you can work them into the design). add in UE3 automatically adding edges where UV seams are and you even highlight the problem. and don't get me started on how much a pain it can be to get multiple normal maps to work together fluently. (especially over seams....)

                    so, yes, it can be done, but if I were an art lead (which i'm not, but i've done assets for UE3 games) i would stray FAR AWAY from multi/sub materials unless my texel scale absolutely required it. (which, for the games i've worked on, wasn't necessary...128 pixels per foot is pretty standard and easy to do with one texture) large assets with tilable areas (buildlings, for instance) are a good exception to the rule since you'll be using a lot of them over the course of one level.

                    so, like, there is my two cents.

                    oh, IMO the lack of detail textures in UE3 is more than made up for by specular maps, normal maps, emissive, specular power, etc....

                    Comment


                      #11
                      Originally posted by BIOS View Post
                      so, like, there is my two cents.
                      No problem, just a friendly discussion on the forums...

                      I also do engine programming, and I am currently writing a new VS2005/DX9 3D graphics engine for my new Unreal Engine Licensee terrain tool, so I am quite familiar with what goes on under the hood.


                      First off, in the average fps game you normally would not want to create the levels where every unique mesh used a unique skin, due to texture memory limits with the only "fix" being the use of lower resolution skins, which detracts from the visual quality -- unless every mesh you were creating in your map was only small to medium in size; you wouldn't want to create per-pixel lightmaps for every staticmesh, due to build time and texture memory limits, so many staticmeshes can still be lit per-vertex in the scene; nor would you want to have every single material used in-game be a complex shader with normal, specular, etc. as that requires additional texture memory and GPU power.

                      This and some of the other things that we are mentioning in this thread are going to be part of the reason why community mappers are going to find UT2007 mapping considerably more work (and confusing).


                      Originally posted by BIOS View Post
                      each time you render a material on a mesh in UE3, you are in essence causing the engine to re-render the mesh.
                      Kinda close...
                      This is assuming that all textures applied to the mesh are in fact running shader effect materials.
                      For example, in DX engines when you apply per-pixel specular highlights, the mesh in question will have to pass through a transform before the specular lighting calculations can be done.
                      This is not the same as what most people might assume as "rendering the mesh to screen" -- this occurs in memory using a set of fast operations that calculate and store such things as the vertex transformations, texture coordinates, light direction, etc. It would also be pointless to return pixel color outputs for the faces that are not mapped to the specific sub-object material that is currently on its specific pass.
                      So if you were to perform an in-game speed test between the same mesh model with one or three textures, the difference in rendering speed will be negligible if even noticeable (I've tried it and saw virtually no difference in framerate on a medium density scene).
                      However, like UT2004/UE2.5, you should be careful to not overdo the number of texture in a Multi/Sub-Object mesh, preferably keeping the number between two and four textures.
                      Also be aware that Pixel Shader 2.0 has additional optimization features over Pixel Shader 1.1, so newer shader operations can occur faster.

                      Originally posted by BIOS View Post
                      all of them have STRESSED using a traditional, single material skinning method.
                      This I do not agree with (IMHO) and I feel that it can lead to a mistake in level design.

                      Unlike simpler engines like UT2004/UE2.5, newer engines like UE3 require a considerably larger amount of pre-design and pre-thought on the construction end of things.
                      With the nex-gen engines it is really easy to run out of system resources if a person attempts to run everything at maximum capabilities -- pixel shaders have limits, there is texture memory limits, etc., and (as I am sure you already know), you can quickly eat through all of these resources with complex shaders and many discrete textures (with normal maps and specular) and per-staticmesh lightmaps. Sure, you may luck out and get something that plays ok on the current cutting-edge systems, but most gamers aren't running that level of hardware.
                      It is to the point where virtually every material and every mesh designed needs to be weighed as to its "importance" in the scene, and a decision as to the texturing (multi or skin, resolution, etc.), lighting (per-vertex, per-pixel), etc. has to be made in order to optimize the map for play.

                      When a developer drops down to all medium resolution skins, IMHO the overall visual quality of the game suffers. Sure, Normal Maps and the cool new shaders help to some degree, but if you examine the actual "texture quality" of games like FEAR, RoboBlitz, etc., they IMHO don't come anywhere near what well designed UT2004 maps have with the use of 1024x1024 textures and Detail textures (sorry guys, not meaning to flame your games mentioned here, they are still great, just using them as examples of current nex-gen engines).
                      Walk up to a wall in FEAR (even at highest quality which is what I run on my system) and it looks like Unreal 1 or DOOM 2 quality... (no offense intended).

                      For retail games that are shipping everything on DVD they can be a bit more sloppy on this, but for downloadable custom content (ie. bonus or community maps) it is going to become a real concern as file size increases quickly.

                      I do agree that anything smaller in the scene can (and should) be skinned.
                      But any objects larger than the player model start to look crappy even with 1024x1024 skins, unless you are the equivalent of 20 feet or more away from it. Plus if the engine renders lower Mips for better performance on slower hardware, it only gets much worse looking.

                      Originally posted by BIOS View Post
                      using multi/sub obj materials on UE3 meshes is just apt to look bad
                      I would have to see specific mesh examples of what you are referring to.
                      I've not seen any Multi/Sub-Object textured UE3 meshes that looked bad or had these visual anomalies you mention.
                      And in many cases, such as the facade in the screenshot I show below, the multi-texture method looks very good.

                      Originally posted by BIOS View Post
                      so, yes, it can be done, but if I were an art lead (which i'm not, but i've done assets for UE3 games) i would stray FAR AWAY from multi/sub materials unless my texel scale absolutely required it. (which, for the games i've worked on, wasn't necessary...128 pixels per foot is pretty standard and easy to do with one texture) large assets with tilable areas (buildlings, for instance) are a good exception to the rule since you'll be using a lot of them over the course of one level.
                      It is a balance IMHO... going with all skins (assuming you want decent quality skins and not a bunch of 128x128 through 512x512 skins for everything), is going to eat up the texture memory on most video cards real fast. Many of the Epic UE3 assets that I have are using 1024x1024 skins with Normal map, which is a combined 3MB per pair.

                      Originally posted by BIOS View Post
                      oh, IMO the lack of detail textures in UE3 is more than made up for by specular maps, normal maps, emissive, specular power, etc....
                      I disagree on this...
                      Normal Maps in no way make up for Detail Textures.
                      Normal Maps are fine for distance viewing, but are totally useless within five feet of the object.
                      In UE3 you would have to get into Scalers and other messy stuff to approximate the proper effect.
                      See the screenshot below.

                      My apologies to Epic for showing one of their assets, hopefully they won't mind.

                      Comment


                        #12
                        i see your points, and they are all valid. i think our viewpoints illustrate the myriad of ways you can approach things in UE3 (or UE2), and how varied the development process can be. the only thing you REALLY need to know is how to adapt to changing methods and idealogies, if you can do that, you'll survive long in this industry.

                        Comment


                          #13
                          I agree.

                          It will be up to each game developer to make the decisions as to which way they wish to implement the game engine capabilities for their particular game design.
                          Whether that be optimizing the render path by using medium resolution skins to get the best framerate possible, or provide higher visual quality with hi-res multi-texturing and hi-res skins at a cost of additional shader operations and fewer large textures per scene.
                          Personally, I think a mixed approach to texture/skin/multi is the way to go, but requires considerably more pre-design work.

                          I believe the complexity of the game design issues we state is also why more studios are moving towards hiring people for specific areas of the level designing process. It is becoming more involved and more difficult for one person to cover all of the bases from texture and material creation, to mesh modeling, to mapping -- and do them all equally well.

                          I'm not knocking games like FEAR when I mentioned them in my previous post.
                          I felt that even with the low-res texturing and skinning and the absence of Detail Textures, it was an awesome game that I found very absorbing.
                          That one thing would be enough for me to give it a 9/10 instead of a 10/10 though.

                          Unfortunately, not every gamer has hi-end gear, so on average I'm sure we are limited to P4-3GHz HT, 1GB RAM, 256MB T&L DX9 video. Which means that game developers will have to deliver UE3 content that is still playable on that platform.
                          And the bad part of it is that over the next few years once multi-core processors and DX10 video cards become the standard rig hardware for gamers, UE4 will start to be used for game development and that level of hardware will again be no longer sufficient to run every feature at highest quality...

                          We've really gone off-topic...

                          (and I apologize for my long posts)

                          Comment


                            #14
                            Obviously both of you know far more about the workings of the engine than do I. Actually I'm just learning to do level design for UT2004, and have yet to put anything together. (Actually, I've put any further design on the back burner until I get proficient with 3DSMax as I've concluded that it's crucial to original level design.) Still, I can comment on what I feel is the way of "common sense". Common sense tells me that I wouldn't want a custom texture for every different mesh that I create for a couple of reasons.
                            First, and the most important reason in my mind, is the file size issue. The files end up large enough the way it is, let alone if you were to create a custom texture per mesh. Any map with any kind of unique detail would have an enormous file size.
                            Secondly, common sense also tells me that all those stock textures were meant to be used in their current form, without modification, otherwise you'd see texture files full of nothing but mesh skins and a few detail textures. Even as a beginner, the skinning method of flatten mapping / UVW Unwrap threw up flags to me telling me there had to be a way to skin the meshes with the textures in their stock form.
                            I also, after reading DG's reply, opened several stock Epic created meshes in UnrealEd and looked into their properties to see how they had been textured. In ALL the meshes that I viewed they had used Sub/Multi Material and Material ID's to skin their meshes.
                            Now I'm not saying that flatten mapping / UVW Unwrap doesn't have it's place. There are certain instances where flatten/unwrap would be ideal (and to me this would be mostly smallish, highly detailed, complicated meshes that would be used multiple times throughout the level, or meshes that would take several textures to get the desired results). At least in that scenario you would be making the custom textures worth the added file size. I just think that skinning a large simplistic mesh that would only be used once or twice throughout the level with the flatten/unwrap method would be plain silly. It would not justify the added file size. This is what lead me to question the flatten/unwrap method to begin with.
                            But hey, everyone has their way of doing things. I'm not into arguing which is right and which is wrong, so I'll take the answers and comments posted here into consideration and use what I feel is my "common sense" to determine how to skin any given mesh. That being said, DG's approach more fits what my "common sense" was already telling me to begin with.

                            SO.... I'm led to one last question on the subject, and once this one is answered I'll be set to skin my meshes the way I think is correct. OK, this concerns trim textures. These consist of one large texture broken down into smaller "strips". Each strip contains a different trim texture, but all strips are a part of the parent texture. My question is:
                            How in the world do you tell the mesh exactly which horizontal "section" of the texture to use? I've not figured out how to move the texture once it is applied. I know I'm missing something simple here. I figure I'm missing a way to pan the material, but I'll leave it to someone who knows to point out to me where I'm missing it.

                            Comment


                              #15
                              Originally posted by spectre68 View Post
                              These consist of one large texture broken down into smaller "strips".
                              As a simple example, let's assume that the "trim" texture is 1024x1024 and contains eight different trim textures of equal height stacked in it.
                              That would be the equivalent of 1024x128 for each piece of trim.

                              So, if I had a building face that was in its entirety 1024x1024 units in total size, and the top ledge portion of the building that I wanted to trim was 128 units tall, then I would:

                              - Apply the texture to those faces (set their Material ID appropriately to match the number in the Multi/Sub-Object Material)
                              Note that these faces would have to be detached from the rest of the building so that I can apply a unique UVW coordinate to them...
                              - Apply a Planar or Box UVMap modifier to that ledge object, set its properties to 1024x1024x1024 so that it is equivalent to the width and height of the ledge (ledge is 128 high and so is each trim strip).
                              - On the UVMap modifier go into sub-object editing and move the UVW Gizmo up or down so that the appropriate portion of the texture is applied where I want it.
                              Think of it like a big sheet of wallpaper that you are adjusting up or down until you get the proper pattern lined up where you want it -- moving the UVMap Gizmo does exactly this.

                              Now in real mesh designs, I tend to create the entire model, then detach groups of faces where required, and UVMap those resulting objects as required. Then collapse, attach, weld and export.

                              So in this example, I would probably detach the ledge front faces, bottom faces and top faces individually so that I could apply the desired Material ID and then set the UVMap coordinates as required on each piece.
                              Sometimes you can get by with using Box mapping, and move it both up-down (Z) and closer-further (X or Y) in 3d space so that the ledge front (Z) and ledge top and bottom (X or Y) are mapped as required.

                              This can be done with more than just trim textures. You can adjust the UVMap modifier to anything you want (within reason) to apply portions of textures to various mesh objects.
                              I use this feature on things like Flag Stands and Vehicle Pads, where I will choose a texture that has a nice circular detail in the middle, then adjust the UVMap Gizmo accordingly in size/rotation/placement so that I get just the circle in the texture mapped to my mesh.

                              The UVW Map Modifier Gizmo can be moved, rotated and scaled just like as if it were a mesh object. Many of the modifiers work this way.

                              Hope you go that...

                              Comment

                              Working...
                              X