No announcement yet.

Pathetically long map building time (one room, 2 lights)

  • Filter
  • Time
  • Show
Clear All
new posts

    Pathetically long map building time (one room, 2 lights)

    Ok, so I wanted to test the effects of spotlights in a simple scenario so I built a map with one room with 5 rectangular pieces in it then put a spotlight above it on an angle to cast some nice shadows on the walls/floor. I set the texture lightmap res to "2" and also added a simple skylight @ 0.2 brightness.

    So, thinking it would be an easy build since the map is pretty much as minimal as it can get, I hit the build all button.

    It took a pathetic 12 minutes.

    I've recently built it again (for a second time) and it took just as long, as if none of the info from the previous build set in.

    I have a screenshot of the map, so you can see how VERY small and simple it is. Everything in the map is in this screenshot, nothing has been left out:

    Small, right? UT3 ED obviously doesn't think so.

    EDIT: I almost forgot to mention that the map, yes the one in the screenshot above, came out to 27.5 MB fully built. That absolutely baffles my mind.

    I can't even imagine trying to build a large map full of SM's and lights... it'll take a friggn week.
    I mean, even if I start a new map and subtract one box and add one light it takes more than a minute to build.

    Any ideas as to why it's taking so insanely long to build?

    BTW, my specs:

    AMD 4200+ dual core 2.2ghz
    Geforce 7900GT OC 256mb
    2 gigs PC2-6400 DDR2

    whats ur rig running? depending on your processor speed, it can have a big impact on build times...


      Specs are at the bottom of my post. ^

      They are more than worthy of fast build times. I run UT3 full detail 1024x768 with barely any slow down.


        I suffer from the same problem, but with a nice laptop rig. Especially after it is done rendering, the shadows look like ****. Better up using UE2 to render since it doesnt take light years.


          First of all, subtractive maps take forever to build...period. Setting the lightmap res to 2 on your surfaces will increase the build times immensely and is almost never necessary. I've never had a map, even a fully built and detailed map, take more than around 5-10 minutes to build. That's not to say I couldn't make one take longer, but setting lightmap resolution to high, or low as the case may be, is hardly ever worth the added build time and memory usage that goes along with it.


            that and his problem is the textures are scaled out to much, his computer is trying to bump map every single edge on the texture.


              I want the lightmap resolution to be high so I can get nice shadows. Besides, it's only on maybe 30 faces, so it shouldn't nearly be a problem.
              The fact that it's subtractive shouldn't matter either should it? The huge box surrounding the level isn't even lit so that information doesn't need to be built. I only made it subtractive because it's all indoors.
              I don't understand how making the lightmap res better wouldn't be worth the time, it looks exponentially nicer. I'm only wanting to do this because I'm almost done a BSP-only map in the same vein as the ones Hourences and crew released (HOLP pack), and I want some nice shadows in one area.
              My next map will no doubt have hardly any BSP if any.. so lightmap res shouldn't be an issue.

              @karmatized: Actually, the first build was with a completely custom texture that had no bump/normal/spec maps whatsoever and it took longer.
              Either way, calculating the bump on textures takes practically no time.


                Normal maps (or bump maps as it was stated) shouldn't have anything to do with build times.

                You should be able to get nice shadows without going all the way down to 2 on the lightmap resolution in almost all cases. When you combine the extra build time with the greatly increased memory usage, it usually isn't worth going that far. 30 surfaces with a resolution of 2 is quite a bit in my opinion.

                Yes, using the subtractive level type is slower to rebuild. It does matter. I can't explain to you why as I don't know the inner workings of the engine that well, but it has been stated many times.

                None of this is to say you can't do these things. I am just pointing out the drawbacks to everything. You have to balance the advantages versus the drawbacks and decide what you can live with.


                  So you think the long load time is strictly pertaining to the lightmap resolution then?

                  I guess I'll try something like 8 on as few surfaces as I can and see how it looks.

                  Thankyou for the input


                    No, I think it is partially due to your lightmap resolution and partially due to using a subtractive map. The lightmap resolution you used on that many surfaces would also account for the large map size as the amount of textures needed to create the lightmaps would be large.


                      Is there a lightmap created for every face of a brush, or for every brush, or are they each created for areas or something?

                      BTW, next time I'll start with an additive map..


                        Techno-babble warning...

                        The engine is always Additive.

                        What occurs when you select Subtractive is that it automatically inserts a world size cube brush with properties of:
                        - CSG_Add
                        - 524288 x 524288 x 524288
                        - NULL texture (no warning is generated though because the surfaces are along the world edge)
                        - Lightmap Resolution = 32
                        - Accepts Lights, Accepts Dynamic Lights

                        The extra-long build time is because the triangles of the brush are valid and are being passed through the engine build system including the lighting even though the lightmaps get tossed.

                        The best fix is to not use Subtractive mode but instead use Additive and create an initial build area cube that is slightly larger than your map area, such as 16384x16384x16384. You can always vertex-edit this cube larger if you find that your map play area is exceeding the size of the base cube.

                        To fix this while keeping Subtractive mode, vertex-edit the world cube in [T]op view and select one corner and drag it inwards, then do a geometry Build. Move in [P]erspective view to where you can see those edge surfaces and select all of the world brush surfaces and change them to:
                        - EngineMaterials.BlackUnlitMaterial
                        - Lightmap Resolution: 65536
                        - uncheck options Accept Lights, Accept Dynamic Lights
                        Vertex-edit the cube back to full world size. This should cut about 10 seconds or more off of the build time of an "empty" Subtractive map, ie. it should now build at about the same speed as an empty Additive map.

                        Regarding Surface Lightmap size, as ffej mentioned, 2 is usually too fine. In most cases you do not need to go below 8. If you do some simple tests with shadowcasting objects over a surface you will see that 95% of the time there is no visual difference between 2, 4, and 8.
                        This is because in the engine, the lightmap size for each Surface has a size limit based on standard texture formats. So on a large surface you cannot get below a specific value of lightmap pixel/texel size because it won't fit into a single texture.

                        Regarding your other question, there is a lightmap created for every visible surface that has lightmapping enabled. Multiple small lightmaps are combined if possible into standard texture-sized textures and DXT compressed.

                        Once you build your map you can see these in the editor located under the package name of your map, eg. DM-MyMap. The lightmaps will have names such as LightMapTexture2D_0, ..._1, ..._2, etc.
                        There is usually four lightmap textures per surface set.


                          Also, as far as Lightmap Resolutions go, would it not be a good idea to just stick to 32 or higher (ie less resolution) until just before the final or beta builds? since I find myself rebuilding the entire map every 30 minutes to make sure that all that ugly stuff I am trying to hide away is actually hidden =P. or more precisely, test the map with light >.>...

                          well the prototype vCTF map I am releasing in a few days has ALOT of ugly stuff o.O... my DM-AncientTempleBeta has nothing hidden... shockingly nothing to hide =P.

                          As for DM-AncientTempleBeta, I think I put a light map resolution of 4 on before, toke about 5 minutes for that entire map to build, compared to about 1 minute at a light map resolution of 32... no kidding >.>... that's on what must be at the moment a £500(£1000) Processor... tho I suppose it probably will drop with the new Intel QX9650 =/. ah well.


                            @DGUnreal: thanks for all the info, it really clears up a lot

                            Needless to say, I probably won't be using subtractive mode from now on..

                            @r3sistance: yeah, I've been putting in everything else (pickups included) before I try out the spotlight and higher lightmap resoultions


                              Originally posted by r3sistance View Post
                              Also, as far as Lightmap Resolutions go, would it not be a good idea to just stick to 32 or higher (ie less resolution) until just before the final or beta builds?
                              Yes, usually.
                              After creating most of the geometry in a map I go around and set the surface properties as required. Doing this during early map construction usually gets into wasting time for builds. The same thing can be done with StaticMeshes by leaving them at their default of no lightmap, then go around the map later and enable lightmaps on them if they are relevant.