Announcement

Collapse
No announcement yet.

material's and UV's in blender

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

    material's and UV's in blender

    Hi ,I am a still a beginner at modelling, now I cam make decent meshes but I need some help with 3 things

    first I need to know how to apply multiple materials to a mesh and weather its better to make a mesh as one solid mesh or two meshes/segment's put together. for example if I made a TV and wanted the screen shiny and the rest dull would I be able to apply two materials to it if it was all one set of linked vertices or would the screen have to be a separate single plane.

    My second question is about multiple UV's. now I know how to make a model with multiple UV's but when I import to the UDK and rebuild lighting it gives me a warning about overlapping textures and I want to know how to fix this.

    And third how do I choose the UV channel in blender so when I import to the UDK I can set it up better, for example if I had 3 UV's I want the first UV in channel=0 the second in channel=1 and the third in channel=2.

    also in the export option what's the difference between "linking to object" and "linking to objet data".

    I use blender 2.64 and I know these basic questions will have been asked before but any help would be appreciated.

    #2
    You can apply two different materials on a single mesh, give them two different materials inside blender and export as FBX. Although it will be tricky in UDK because the static mesh viewer doesn't allow you to specify materials like the skeletal mesh viewer does, so you'll have make sure the content browser creates your materials upon import. This also makes sharing of materials between static meshes difficult.

    UDK assumes that UV channel 0 is textures and channel 1 is for lightmap. The order they appear in blender from the top is the order UDK assumes from 0 to 3 or something. You can specify in the static mesh viewer which channel should be used for lightmap. As for which channel materials use, that can be specified in the material editor with a texture coordinate index node.

    I dont know about your last question, that must be in ASE or something, I only use the FBX exporter.

    Comment


      #3
      ok you might want to have a quick look at my blender -> udk as i cover most of these things

      as for the material for most things you'll only need 1 material which then uses the diffuse, specular, normal maps/textures

      Comment


        #4
        Originally posted by nabiul View Post
        You can apply two different materials on a single mesh, give them two different materials inside blender and export as FBX. Although it will be tricky in UDK because the static mesh viewer doesn't allow you to specify materials like the skeletal mesh viewer does, so you'll have make sure the content browser creates your materials upon import. This also makes sharing of materials between static meshes difficult.

        UDK assumes that UV channel 0 is textures and channel 1 is for lightmap. The order they appear in blender from the top is the order UDK assumes from 0 to 3 or something. You can specify in the static mesh viewer which channel should be used for lightmap. As for which channel materials use, that can be specified in the material editor with a texture coordinate index node.

        I dont know about your last question, that must be in ASE or something, I only use the FBX exporter.
        You can definitely apply two different materials in the static mesh editor. There will be multiple LOD slots for each material applied to the model in your 3D app.

        Comment


          #5
          ok thanks for your answers ,that's a lot of info, maybe it will help if a take you through my workflow

          #1 I create my mesh(all good)
          #2 I unwrap my UV
          #3 open UV editor, click "new image" button (choose size...ect)
          #4 paint basic colour on mesh/UV in blender.
          #5 save my UV map image as Targa, and whole thing as blend file.
          #6 close blender and open gimp to add detail and alpha to image if needed(switching between blender and gimp just to make sure it looks good)
          #7 use gimp's normal map plug-in to create the normal
          #8 reopen blender and apply material and fiddle with diffuse and specular slider's till it look's realistic
          #9 save all and export to FBX, then convert with autodesk FBX converter.
          #10 then import to UDK and put together.

          now this works pretty good for most meshes but there are two types of meshes where this does not work.

          the first witch I gave a bad example for earlier (TV) is things like windows (glass, and frame as one model) because the glass needs to be transparent and have a reflection and the frame lets (say plastic/wood) needs to be duller with no reflection...ect, witch is why I asked about multiple materials.(if I make them as separate meshes the frame is easy and the glass I can make transparent by adding alpha In gimp and when putting together in UDK changing Blend_opaque to Blend translucent,i mean it's not reflective but hay S*** happens)

          the second is big meshes eg: I made a big container "approx. size in UDK 4m x 2m 2m(like a shipping container) but I want it to look half decent but to do it on a single UV image the image has to be at least 5120x5120 witch is huge so I wanted to make it as 3 UV images. I managed to work out how to do it but as I said earlier when I import to UDK, put it all together and try to build lighting (just to test and see how it would look) it stops building the lighting and I get a warning message about overlapping UV's

          I would have included screenshots of the meshes and warning (but I don't know how to take and post screenshots)

          PS. sorry about the terrible grammer in my first post, I mean I have used the wrong letter here and there before but that thing had whole words missing "BLOODY RIDICULAS"

          Comment


            #6
            forgot to say if anyone see's any problem's with my workflow let me know

            Comment


              #7
              Originally posted by JessieG View Post
              You can definitely apply two different materials in the static mesh editor. There will be multiple LOD slots for each material applied to the model in your 3D app.
              Really, I've been trying to figure out how forever. I really need this, would save me having to split up meshes and reimport them each time I need something changed.

              Comment


                #8
                Without seeing some screen shots of your UV layout and such, it's hard to give specific advice. If you can use Blender and UDK, I am a bit surprised that you don't know how to take and post screen shots. Print screen button (in windows) and Paint/GIMP can help in the first part. If you have Windows 7, there is a "Snipping Tool" program that can let you box select any part of your monitor and quickly save it as an image file.

                I admit I don't use UDK (I am a UT 3 mapper), but I do use Blender. I found that that laying out your lightmap UVs should be different than your diffuse UVs. Lightmap UVs shouldn't overlap. I have also found they work better when they are organized in a way that matches the faces on your mesh, at least for faces that connect to form a "side" on your mesh.

                Granted, you can use multiple materials as others have stated, but from a performance point of view, the fewer the better. If it's only going to be used once or twice, it's not that big of a deal. If it's going to be used many times, it will probably lower your frame rates, especially if it uses a complex material.

                Also keep in mind that for your Diffuse/Color UVs, you can overlap for certain meshes. Your container example would probably apply as most of it will be the base metal texture.

                I don't know if this will speed up your workflow, but McCampagnini has a .ASE exporter for Blender (which has been kept up to date) that works great for static meshes. It can't export textures, but seeing how you have an extra step, it might be helpful.

                Comment


                  #9
                  yes I can use blender and UDK but I am still a beginner, the reason I don't know how to post screenshots is I have only had a laptop for 8 months, and I found blender in the beginning of june and UDK at the end of june, also I have already tried .ASE exporter bu faces kept disappearing or displaying material incorrectly in UDK. just a side note I have windows 8.

                  this is a bench I made using my normal workflow



                  this is my container.


                  this is a very basic UV (5120x5120)

                  Comment


                    #10
                    Faces probably disappear from a mesh when you import it because you made the mesh too small. Check this video for a good idea of how to get the sizes in Blender correct:

                    http://www.youtube.com/watch?v=z2ybZN4Es1M


                    That bench could use some dirtying up to break up the texture a bit. I also see some black on the top of the bottom most backboard that looks like you didn't paint in enough of the UVs to cover that area. For the UV map for that box, unless you plan on having unique textures on every single face of the mesh, you could probably overlap a lot of those UVs to save space and have a higher resolution over the whole thing. 5120 x 5120 is HUGE, and that size is not supported by UDK anyway because the limit is 4096x4096 and 5120 is not a power of 2. It's fine to work with huge files originally but they should be scaled down when finished, and having overlapping UVs for similar parts of the model will help to lower the size even more without a significant loss of quality.


                    As for the multiple materials in Blender, if you apply more than one material to different faces of a mesh, they should carry over in the FBX into UDK. If you open the content browser and expand the LODinfo section, they should be there. Here's an example of a mesh that had 2 materials applied to it and where to find the slots for them in the static mesh editor:

                    [shot]http://img543.imageshack.us/img543/8264/staticmesheditormateria.jpg[/shot]

                    Comment


                      #11
                      Hi,
                      Faces in blender can "disappear" when imported into UDK because the normals on the face is pointed the wrong direction (i.e. reversed). You can use the "Flip Normal" on individual faces or use the command cntrl-n when you finished your model which recomputes all faces to be pointed outside.

                      Comment


                        #12
                        hello everyone, thank you for your answers and patience.
                        I think I just figured something out.
                        this is my container in UDK from about 10metres away (I textured a panel so you can see part of my problem better)

                        as you can see it does not look to bad but when you get closer like this

                        it does not look as good because it is a large mesh and if I want it to look good it needs good resolution so I need to use multiple UV's.
                        this is an exploded view of the mesh so you can all see how I put it together better

                        now I wanted to use 3 UV images for this, one for the frame, one for the main box, and one for the poles hinges and keypad on the door(this is mainly because I want the keypad to have decent detail on the numbers...ect). after I import to UDK I set up a material for each UV image and assign them in the proper places in mesh viewer and all is well, but when I place in UDK and build any level of lighting (preview to production) it stops before completion and gives me a warning about overlapping UV's. now I think it is because of two possible reasons, the first is where the outer frame intersects with the main box, and the second possibility is the hinges on the front. the problem with the hinges is that the front face of the main box occupies the same space as the back faces of the hinges, therefore so would the UV's and so the two UV images would be rendered in the same space. does that make sense to anyone?

                        to Jessie G I agree the texture does need to be dirtied up or worn down, although it's not just one bench it's six (as shown below)and it would take ages to dirty them all up

                        also the black bit you mentioned was because I didn't set light map res high enough. here is what it look's like with light map res of 320 and production level lighting. i used a different more distressed looking texture and would like your opinion of it and if its more to your liking rather than the one I used before.


                        and to any and everyone commenting on the .ASE exporter I appreciate it but I use the .FBX exporter then convert using autodesk's .FBX converter (just because blender export's to .FBX2010 and UDK uses >FBX2013)

                        now that is a long post pheeeeewwwww

                        Comment


                          #13
                          The benches would be super easy to dirty up. You only need one texture at that. You can make the normal brown one, add some wear and weathering to it since its out in the open, and before plugging the texture into the diffuse slot of the material, multiply it by a constant 3 vector. If you want a blue version of it, you would right click the material in the content browser and create a material instance of it. Apply that to another bench, open the material instance, and change the constant 3 vector to a blue color. This way would give you unlimited color variations with a single texture.

                          For the crate, you can use multiple UVs but that would require multiple textures as well. Simply overlapping similar parts and scaling those UVs up would give you good resolution with a single texture.

                          Comment


                            #14
                            Originally posted by JessieG View Post
                            For the crate, you can use multiple UVs but that would require multiple textures as well. Simply overlapping similar parts and scaling those UVs up would give you good resolution with a single texture.
                            To better illustrate Jessie's comment...

                            Click image for larger version

Name:	big_container_UVlayout2.jpg
Views:	1
Size:	92.1 KB
ID:	3249682

                            1. All of that black space is wasted pixels and should be used better.
                            2. Assuming most of the crate uses the same base texture, most of those UVs can overlap each other. At minimum, all of the red ones and the blue ones can go right on top of each other. But they should all go on top of each other, but in slightly different places, especially the big sides. Then, you can use some of the texture space for any decals or signs or different colored pieces.

                            Diffuse/Color UVs can overlap as long as they will display the same "color". But with a lightmap UV, none of the faces can overlap as they won't share the same light/shadow information.

                            Comment


                              #15
                              hello, I tried applying multiple UV's again
                              here are the 3 UV's(I kept them simple for quickness)
                              main

                              frame

                              front

                              now after I import them and the mesh into UDK I set materials up like this

                              this is how it look's in UDK

                              witch is the type of resolution I want it to have, and why I need the 3 UV's but when I build lighting I get this message

                              I thought it was because of this part of the mesh

                              because the two faces overlap and therefore so would the UV's witch would explain the warning. if I use only 1 UV(as shown before) it woks fine and I get no warning.
                              the only other thing I can think of is where part's of the mesh intersect like this

                              any thought's?

                              Comment

                              Working...
                              X