No announcement yet.

Big World: Best practices? [info here]

  • Filter
  • Time
  • Show
Clear All
new posts

    bringing this thread back from the dead
    updated the info a little from the texturing section, and most importantly: terrain chunks produce some nasty seams if you use LOD


      Chosker this info is really usefull for the jungle level im making thanks


        i tried something similar to this (but failed) do you have a video or something to demo to us?


          I noticed a couple of things that need to be clarified with texture use.

          RE: 2.2

          The maximum number of textures that you can use depends upon the Shader Model of your graphics card. The average computer today has a SM 3.0 GPU. They can handle 16 texture samples from a given source. Note that this is NOT per layer. It is total. In fact, layers can use up these slots, as I'll explain later. The way UE3 deals with terrain is by dividing the terrain up into chunks. Each of these chunks acts like a discreet mesh for the purpose of render calls. The size of these chunks is determined by your terrains Terrain.MaxComponentSize property. So, if you have your MaxComponentSize set to 16X16, then each 16X16 tiles will count as a discreet mesh and be able to have a total of 16 textures. Each of these chunks could have a different set of textures, if you took the time to determine exactly where the engine would divide them at. I don't know of any good way to see where these boundaries are to ensure that you're not allowing textures that you don't want to bleed into a different patch.

          UE3 uses alpha maps and light maps to control the layers and shadows on the terrain. Thus, you will not have all 16 to play with.
          The UE3 requires 3 of those slots for lighting/shadowing. It also uses alpha maps (Weight Maps) for each layer. This is how it knows where to apply the material when you paint it. It uses a greyscale 8bit image as a reference.

          Because the weightmap is 8bit, the engine can pack up to 4 of them into a single image. Thus, the first layer requires a texture sample, while the second does not. It will be added as a new channel in the 1st layer alpha texture, similar to a supermask. The 5th layer would require a 2nd texture and would start over from there.

          You can find the tech reference here: Support

          Also RE: 2.1.3

          I don't have UDK in front of me, so I can't look to find the exact setting for you, but...
          In the Terrain Properties, you'll find a box that you can tick to make all textures tile from the world 0.0 instead of the terrain 0,0. It is specifically for streaming levels to ensure texture tiling remains consistent. You'll have to take a look and see if you can find it. I don't remember the exact name of the setting.


            Basic questions about big-world level streaming

            This question is mainly for Chosker but anyone else can chime in.

            I'm new to UDK (sort of, I have already made some basic levels with it) and I have a few questions about outdoor distance level streaming and level construction using UDK.

            First here are a couple of planned "assumptions".

            1) The "island" I am designing will have many distinct areas that are broken up by natural boundaries into manageable areas. (eg. World of Warcraft)

            2) I will attempt to make any "seams" not viewable by the player (as much as can be done.) I don't want ugly seams, so making them higher than player view in most cases should resolve that problem. No, the character will not be able to fly.

            3) If it helps with performance, fog volumes will be used to limit view, as was stated in previous posts on this thread. As long as the player has some eye candy to look it, this shouldn't detract from game play too much.

            4) For underground areas, either volume level streaming will be used, or I may use "portals" of some type to load the new level. I don't care if I need to throw up a load screen if the content beyond it is decent.

            5) I plan on building the terrain first, then breaking it up. My plan is (although I don't know if this will work) would be to build the entire island as a "blank" master level. Then, I would break it into streaming level chunks to test the streaming and make sure it all works right before I start adding detail, and then use each chunk as it's own "level" for further, more detailed development.

            Is this the correct work flow, and will it work like I think it should?

            I understand the basic concept of level streaming and how to use trigger volumes to do basic level streaming. One persistent "wrapper" level (invisible) that calls other levels into being based on player location, volume trigger, etc. This is great for dungeons, building interiors, etc. but it's highly impractical for outside terrain.

            My questions revolve around the specific mechanics used to actually create an external "world", and get the distance streaming to work right with a minimum of ugly seams.

            I would think that since UDK maps can be approximately 10 square miles in size that making the entire island first, then breaking it up into chunks to be streamed in would be the best way to go about it, but I have concerns about whether this approach would actually work in actual practice, and if it would work, what about the poly counts for the terrain?

            Not with the final level, because that will be streamed in and out, but poly count within the editor itself so that the terrain doesn't become bloated and unmanageable within the editor before it is broken up.

            Here are my specific questions:

            1) It is realistic to create the whole island using just one large level using terrain?

            2) If so, how do I break that up that big level into stream-able chunks?

            3) Are chunks always squares or can irregular shapes be used?

            4) Any suggestions (besides putting seems out of sight) to minimize the impact of seams?

            I could really use a tutorial on all of this. Will be requesting one in short order.

            Any help is appreciated. Thanks!


              just the way you explained, it should work. your assumptions no.1 and no.2 make your life a lot easier than the average "I want a very open world" guy (that's me!).
              assumption no.5 seems the way to go
              now while UDK allow you to create a 10x10km map (1000 square km), I wouldn't recommend anyone to go anywhere near something so big, the drawbacks are obvious.
              btw I'm not even sure fog volumes do limit view, and I don't think portals (the ones that cull geometry in areas) are usable in UDK. to load your streaming levels though, you don't need any of the two.

              on to the answers:
              1. yeah why not? if you optimize everything properly in theory you can have a big map to be your only level. of course if you can make indoors or undergrounds separate levels life would be easier for you.

              2. you create your big terrain, use the terrain "Split Y" or "Split X" tool, select your new terrain chunk, go to Browser Windows -> Levels, Level -> New level from selected geometry. it's that simple.

              3. any shape will do. streaming levels aren't like boxes you tile next to eachother, think of it as a Photoshop Layer (or AutoCAD or 3DSMax layer, that's more accurate), there is no spatial boundary where a level should start and another should end.

              4. instead of putting some obvious line of rocks or trees to cover the seam, you could put some geometry below them. seams are only seen from afar anyway.

              hope that helps


                For those arguing that scaling sucks remember this is vector related and scaling something by a factor of 2 to 32 is not going to effect the vector to screen drawing. If it did then this engine would be the first one I ever ran across that did not allow visual scaling. If it is the state of the art best **** engine built then scaling by a factor of 256 should be possible.

                Now, how large of a world do you really want?

                You need to populate this world with content. Just having a huge world with nothing else leads to complete boredom for players. If it is a flight simulation you still need to make content of some sort.

                Basic information I gathered suggests that doubling or halving the scale has no great impact on physics therefore halving the scale of all mesh will double the world size. You may need to adjust some of the scripts but over all the game scripts as they are should work.

                Still not enough world area with 1/2 scale?

                When you get past this though it is going to get VERY complex and require a lot more effort on your part since you are going to have to change every constant value in the scripts that is related to view distance, physics, LOD distance, Speedtree settings and on and on.

                /rant on

                Why in the name of Hades did the developers not make a universal scaling factor and put it in the scripts? I mean it adds zero time to runtime since compilers per calculate constants. If they really want to make it a state of the art do anything engine, this is one major fail on the forward thinking of developing a engine that is suppose to do anything.

                /rant off -- Back on topic.

                DO not under any circumstances use odd number scaling since the detail is based on the tessellation of the terrain. Scale it by a factor power of 2. So halve the scale again and get 4 times the amount of game area. Now the land mass will lose detail so you need to double tessellation to accommodate the scale change. Because you double the tessellation you need to double the levels. You see where this is going? Also your horizontal scale is changing so you altitude of the terrain needs to be adjusted.

                Level streaming and volume streaming make it possible to populate the entire world with terrain but you need to use this wisely to keep from getting initial loading spikes so keep the levels small (256 is plenty big and doubling it through tessellation is 512 which is really marginal). Best bet is 128 to 256. Most game engines make patching around (32x32) or (64x64). Because you keep the levels small, it adds a lot of work to your design but the payoff is less game stutter while things load and unload as you move across the terrain.

                NOTE: initial terrain needs to be N+1 but is scales back when importing G16 data so making terrain 129 and doubling the tessellation will still give 256 when importing since N+1 drops the last line. If you're drawing the terrain it has no big impact.

                Use the nine block rule. for loading. keep the player in the center. If your view distance is beyond the border of your blocks then you need to adjust the view distance. If the view distance is not enough then adjust the terrain size but keep the view inside the nine blocks

                The biggest factor here determining how big a world is not the limitation of the 512K square world size. It is the number of levels the engine is capable of counting. The question I would ask is -- If I make 65536 (256x256 grid) levels can the engine handle them?


                  Neat thread and very informative, thanks!


                    Our game is supposed to have destructible environments and object penetration, which cannot be reconciled with seperate interiors. How do we enhance performance with that in mind? Just use smaller load areas?


                      keep in mind this thread is quite old and was aimed for when Terrain was used instead of Landscape

                      anyway I'm not sure, how "destructable" is your environment? what is object penetration? what do you mean with cannot be reconciled with separate interiors? and what kind of game is your game anyway?
                      I have yet to see if I can manage to have interiors and exteriors together and streaming in the same area without any loading screens, just using level streaming on distance and streaming all of a zone's interiors and exteriors. of course I don't know if it will work performance-wise, but smaller load zones sounds a good idea


                        Originally posted by Chosker View Post
                        anyway I'm not sure, how "destructable" is your environment?
                        As in "If you can hit it, you can destroy it."

                        what is object penetration?
                        As in "bullets can go through objects."

                        what do you mean with cannot be reconciled with separate interiors?
                        If you can blast into the side of a building, or shoot through the wall to hit people on the other side, how would that work if there's nothing in the building until you enter it?

                        and what kind of game is your game anyway?
                        Odd as it sounds, it's an RPG/FPS. A fantasy, at that. But you can destroy everything around you, and there are guns which can shoot through objects.

                        I have yet to see if I can manage to have interiors and exteriors together and streaming in the same area without any loading screens, just using level streaming on distance and streaming all of a zone's interiors and exteriors. of course I don't know if it will work performance-wise, but smaller load zones sounds a good idea
                        And lower graphics. We're using that to enhance performance as well.