Announcement

Collapse
No announcement yet.

Terrain Texture issues

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

    Terrain Texture issues

    I made a terrain. I added a soil texture. I then add a grass texture. All is well.
    I then added I rock texture. Everything now goes bizarre. Now my grass that is already painted on the terrain turned to the rock texture. Also I can no longer paint with my soil texture it now acts like the height layer and changes height. Here is how my layers are setup.

    Height layer <-- moves the height of the terrain
    Soil layer <-- also moves the height of the terrain, does not paint at all
    Grass layer <-- Paints the rock texture not the grass texture
    Rock layer <-- Paints the rock texture

    If I delete the rock layer the grass magically reappears but the soil still controls height and not soil painting.

    I am using the August build.

    Any thoughts????

    #2
    Is there a limit to the number of textures you can use on a terrain?

    Comment


      #3
      There is a limit based upon your graphics card and dx version. But, if you pass the limit, your map becomes a giant rainbow. So, that isn't the problem.

      I'm not really sure what the issue here is. The first layer, Soil, should automatically cover the entire terrain and move terrain height when painted. Think of it like a background that you choose. You paint your other layers on top of it.

      As far as the Grass and Rock layers go, I'd first open their properties and make sure that you don't have any options checked that would limit their min/max angle or height and make sure that you're not using any noise. Once both of their settings are set to paint anywhere, see if it works. If it does, then it's just a settings issue.

      And, keep in mind that your rock should paint on top of your grass. So, no grass can show up anywhere that you have rock. If you suddenly have a lot of rock everywhere, you'll need to erase your rock in order to see your grass.

      Comment


        #4
        Originally posted by Wyldhunt View Post
        There is a limit based upon your graphics card and dx version. But, if you pass the limit, your map becomes a giant rainbow. So, that isn't the problem.
        Is this memory issue? (I mean how much ram is on your GPU?)

        I am facing this issue with just 5 terrain layers, but all my textures are 1024x1024 so I think I am going over my 512MB GPU's memory limit then. I am going to try lowering the resolution of textures.

        Actually I think making terrain as a mesh is a better idea. Less headache since terrain editor seems crash randomly at odd times (like adding a new layer or just moving layer up and down).

        Just out of curiosity, we can make the whole terrain a mesh in separate app without adding a single inch of UDK's own terrain, right? Or do we need a bit of UDK terrain to build map?

        Comment


          #5
          You can use your own mesh without using any terrain anything. Your mesh won't be able to dynamically adjust for LOD and such though, so it may run slower. I've never tried it, so I have no idea how to make sure that it uses NavMesh and all of that tech stuff you'll need to control your AI and things.

          That limit is mostly from the DirectX version and Shader Model of your graphics card.
          DirectX 9.0c, the default version that UDK uses, can push any GPU with a shader model 3.0 or less. You can enable DX10 in your ini files, which should allow you to use Shader Model 4.0 cards.

          A SM3.0 card can store up to 16 texture files at one time on a terrain map. UDK reserves 3 or 4 of them for its lightmaps and 1 more slot for each 4 terrain layers that you use to store the weightmaps. Each texture that your terrain references will use another slot. This is not the same as Materials. A single material may use many textures. So, if you use a material that has a Diffuse texture, a Normal Map texture, and a Specular texture, then your material will use up 3 of your texture slots.

          You can get the same rainbow error with any mesh if you fill up all of your GPU Shader Texture slots with textures on the model. You just see it more often with terrains because people tend to mix so many complex materials on them.

          So, static mesh terrains would have similar issues. You'd have an extra slot or 2 from not needing the weight maps, but that's about it. Unless you textured the whole thing externally and skinned it as a single texture file, I suppose.

          And, if you want to avoid the crashing, I find that it works much faster and more stable if you hide your layers before you move them or adjust them. Then unhide them when you're finished. In fact, hide all of your layers when you adjust height and you'll be amazed at how much faster it is. All of that lag comes from UDK trying to adjust its shader cache.

          Comment


            #6
            No it isn't crashing while adjusting height layer, I was just working with texture layers (I can actually edit height map and paint without any crashes). The crashes mostly happen only when adding new layers or moving layers up/down.

            Right now it is giving me error while building that the terrain is referencing two missing materials (which I deleted). Is there any way to get rid of this error? It's like ghost layers/material referencing. Some older texture layer materials even use other materials even though they have different material assigned to them (some serious bugs with this thing).

            I have decided to just go for mesh (textured outside editor of course) at the moment.

            As far as rainbow error is concerned, I have 9800GTX+ so it supports DX10 easily. I'll enable the DX10 ini setting (I thought it was disabled since it wasn't implemented). So this DX10 setting is to be used for development purposes only, right?


            EDIT: So if I am understanding you right, the resolution of textures isn't really a issue here? I can just go ahead with 1024 res unless I am going to package game (where I can optimize the game at the end by lowering res).

            Comment


              #7
              There is a button to re-build your texture shader cache that 'should' remove your ghost references. It's in the upper right corner of the terrain edit window somewhere, I think.
              DX10 is still in beta. It does seem to work, but no one has verified that it allows enhanced use of SM4.0 cards yet. It should since that's part of DX10 and not UDK.
              If you enable it, then it should be a feature of your game. I haven't verified it yet, but if you make your game with enough textures to require a SM4.0 card, then DX10 (and windows Vista or better) and SM 4.0 cards would be a minimum requirement to run your finished game as well. Anyone trying to run your game with SM 3.0 would get rainbows. So, I hope that the DX10 setting carries over. Else your game won't be playable.

              Texture size can cause lag issues, but shouldn't crash your game. If your card memory fills up, it'll use paging files or ram... Probably paging files. So, small textures definitely speed things up, but they are not a requirement.

              Depending upon your hard drive read/write speed and your CPU, you could crash from the lag if it has to update the pagefile faster than it's capable of because of too many large textures, but that's not directly because of your GPU limitations. It's just lag death. Needing more than it can get because of over use of pagefile.

              EDIT:
              I'm actually using 2048 for my terrain textures with a 512mb SM3.0 card. I'm using... I think 6 texture slots total for my 3 material layers. I get no lag at all on my dual core 2.6ghz machine and 2gb of ram. If I add another material (2 more 2048 textures), then I get lag.

              Comment


                #8
                check if you did not copied your terrain actor by mistake, which is very easy to do while painting (ALT+lmb drag paints or copies actors). Open terrain editor and look if you have more than terrain_0 there in dropdown.

                Comment


                  #9
                  Originally posted by Wyldhunt View Post
                  There is a button to re-build your texture shader cache that 'should' remove your ghost references. It's in the upper right corner of the terrain edit window somewhere, I think.

                  EDIT:
                  I'm actually using 2048 for my terrain textures with a 512mb SM3.0 card. I'm using... I think 6 texture slots total for my 3 material layers. I get no lag at all on my dual core 2.6ghz machine and 2gb of ram. If I add another material (2 more 2048 textures), then I get lag.

                  Yup, found the button and it fixed the issue. No more ghost textures appearing and the error in build log is gone as well. You are a genius. Thanks.

                  I was able to add the fifth layer and paint with the texture but that's it. Adding 6th gives the rainbow error again. I don't want to use DX10 for final build so I won't enable it for the editing but it seems odd that with 6GB system memory and 6GB page file I can run games like Crysis and GTA4 with highest texture quality, but here with 5 1024 textures and few custom meshes in screen UDK starts croaking.

                  As far as lag is concerned, I have no lag so far. I created 1024 limit for everything on-screen (instead of 2048.. which I will probably use for mountain meshes later on) intentionally and I have like 6 meshes using three 1024 textures on the terrain. With that and 5 terrain layers on my average PC ( 2.7Ghz Athlon X2) setup, it seems to run without any lag so far (do note that I have pretty much maxed out the visual quality as well in ini, including dynamic shadows in screen with highest quality shadows being rendered).

                  Well, I guess I will have to mix the UDK terrain with custom terrain mesh, somehow. This'll be PITA, but a blessing as well I guess (reusing terrain for other areas).

                  Thanks for the help btw.

                  Comment

                  Working...
                  X