Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Optimizing for UT3

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

  • Optimizing for UT3

    Ive written a quick tutorial for optimizing your maps for UT3. This isn't really a how to do, but more of a what to what to do tutorial. Also this tutorial doesn't really cover older things that you could do for UT2004 a whole lot, mostly what's new with UE3. Although the tutorial is mostly finished there are a few things that I have left out which will be added in the coming day or two.

    http://www.evilmrfrank.com/Optimizing.htm

  • #2
    A few caveats.

    Remove Surface Material is only useful in instances where you absolutely do not want that BSP to help occlusion. So, using it on the undersides and edges of additive BSP used for floors is probably OK, taking out the whole side of an additive BSP building which contains more meshes, probably not a good idea.

    I generally find BSP that I can optimize or make black and set it to default texture so I can easily select them all at once and re-do the 65536 lightmap and uncheck all the lighting options.

    In regards to BSP lightmaps, you're pretty much spot on, except sometimes we go as high as 256 or 1024 even in areas where you can get close to the surface. Sometimes they're lit so flatly that you can make the lightmap really blobby and you won't notice the difference.

    I generally start by setting all of the BSP in the map to 8 and rebuild to see what shadows I feel are important, then I save them to the selection, set the others low and just pump up the detail on the important surfaces.

    On Cull Distance. Now we have Cull Distance volumes to specify what sizes of meshes in that particular area get culled at what distance. You don't have to do it manually mesh-by-mesh anymore.

    On Terrain. Be weary of large lightmaps on terrain. Unlike BSP, a higher number = better terrain lightmap resolution. So, a setting of 16 on a large terrain would be ridiculous.

    On Blocking Volumes, I've never found them to be much of a drain (either in terms of performance or memory) in comparison to things like greedy lightmap usage or leaving unnecessary meshes with ragdoll collision enabled, etc.

    One addition I think would be helpful...

    You can lightmap static mesh actors that have a proper 2nd UV channel. Many of the meshes in the game have usable 2nd UV channels for lightmapping, but some do not. You can get HUGE overall memory savings by swapping away from vertex lit meshes to using small lightmaps (16x16 or 32x32). This is located in the StaticMeshComponent dropdown under OverriddenLightMapResolution.

    The tradeoff is that the lightmaps generated get added to the texture pool. So, doing this too much on a console system would add unnecessary overhead and limit your ability to stream in textures to their full detail level. If your level has some excess texture space and you want to hack the file size down considerably, doing a lightmapping pass on static meshes in the level will do wonders.

    If you open the generic browser and go to the Primitive Stats tab, you can sort by Lightmap (KByte) to get a feel for how much vertex memory is taking up in your levels. It's not uncommon for a mesh to be used 100 times or more in a level, and if the mesh has a lot of verts, if often ends up taking more than 1mb worth of vertex lighting data to light that mesh across the entire level. I generally start by getting all lightmap usage under 1mb then I re-cook and see if it fits in memory. If not, I'll to go 500k, then 100K. Sometimes getting a mesh that low isn't possible, but you do it where you can.

    If you double click on the worst offenders, you can select them all and set an appropriate lightmap size. A 32x32 lightmap starts to become an attractive option on meshes of 1000 verts or more.

    You can check the mesh to see if it will take well to lightmapping by selecting it, right clicking and doing a "sync in generic browser," opening the mesh viewer, and clicking to show the 2nd UV channel. You can usually tell by looking at it whether or not it's set up for lightmaps or not.

    It's usually a good idea to apply the lightmaps to all the meshes and rebuild lighting to make sure it still looks ok afterward.

    WAR-Powersurge is a good example of a map that's been lightmapped into oblivion.

    Sorry, this is probably a bit long winded and random since I didn't really proofread this, but I hope it adds a bit for you. Cool tutorials by the way, it's good to see people willing to step up and help the community.

    Comment


    • #3
      Ah I learned a lot from reading your post The thing you posted on the remove surface feature I didn't know. That is pretty important. Also I didn't really write anything about the static mesh lightmaps so that is something else I need to add And your right blocking volumes aren't that bad on performance but they are worse than using a mesh plane to block stuff off It appears I have a bit more retouching to my tutorial than I thought :P I wrote it off the top of my head so I knew there were things I was forgetting. Also forgot the clean bsp surfaces

      Thanks for the tips, I will make the changes when I can

      Comment


      • #4
        So I'm assuming that the lightmaps set at 8 are very low resolution while upping it up to something like 32X32 is "high" resolution?

        How big of a deal is this for PC version users? I'm guessing by the amount of RAM talk here that this is primarily for PS3 users.

        Comment


        • #5
          When talking memory most of the things can be taken into account for both PS3, and PC. Probably most important on the PS3 though since it actually has a limit. PC basically just to keep load times down and download size lower for servers. 32X32 is a high resolution for a terrain. Lower numbers for the terrain = lower quality lightmaps. Lower numbers for bsp surfaces = higher quality lightmaps.

          Comment


          • #6
            A note regarding the presentation of the article, it would be far easier to read if you got rid of the rather annoyingly small iframe and allowed it to expand to the height of the user's browser.

            Comment


            • #7
              i may be a little dumb for asking this question but,how do i set meshes to 32x32 or 16x16 and how do i set them under 1 MB?


              /edit

              ok i found out how to do the 16x16 stuff but i still need to know how to get them under the 1 MB mark

              Comment


              • #8
                There is no set way to get it to 1MB You just have to change the res on it and keep your eye on the lightmap area under the primitive stats browser for your mesh.

                Comment


                • #9
                  cool thx..now for one last question...i want to add some anti-portals in my map...i can't seem to find them anywhere, did epic keep them or did they get rid of them?

                  Comment


                  • #10
                    A friend showed me your optimization tips a long time ago at http://evilmrfrank.com/Optimizing.html. I was afraid you took it down and weren't going to put it back up. Thanks for putting it up again. It helped me out alot back then, and it can help me out now.

                    Comment


                    • #11
                      Anti-Portals aren't used or needed anymore since most everything occludes now.

                      Kyben - Glad I could help.

                      I plan to update the tutorial when I get the free time as there are some things I need to fix and some things I need to add. I have been updating my website so thats why the old link is no longer working correctly.

                      Comment


                      • #12
                        Great, thanks a lot

                        If only I'd have found this a couple weeks ago, but at least I can use it for my next map

                        Comment


                        • #13
                          When looking in the primitive stats browser, what kind of individual figures would be too high for Inst Triangles and Shadowmaps?

                          Comment


                          • #14
                            just for the sake of it what's better for map cooking? the editor or the UTfrontend? also what is a "fixed seed"? i saw it in the UTfrontend in the SP tab

                            Comment


                            • #15
                              For the primitive stats browser question it depends on how often you use a mesh since the stats in there will give you the over all stats for that mesh overall within a level. I suppose it also depends on how much your level actually has other than that individual one your looking at. As for an exact number for one mesh I can't give you an exact number but if your using meshes from Epic I'd say you probably don't need to worry about how costly one specific mesh is unless your planning on using it a lot.

                              For map cooking I'm not sure if there is much of a difference between doing it in the editor and UTfrontend other than UTfrontend gives you more options and is probably better to use. I'm not sure what the fixed seed option does, perhaps thats a better question for WillHaven. Ive never had to use it for cooking maps and I'm guessing you won't need to either for UT3 maps but I dont know :P

                              Comment

                              Working...
                              X