Announcement

Collapse
No announcement yet.

Lets make Lightmass EPIC (and understandable)

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

    great test !!

    thanks all
    Tcimage3d Studio
    Unreal Artist & Developer in archi & interior Visual
    Real Estate VR Tutor: http://tcimage3d.wixsite.com/3dvr

    Request a quote today:tcimage3d@gmail.com
    Follow us on Facebook: https://www.facebook.com/TCimage/

    Comment


      Just a quick question: Where can I see how long my build time is? Are you guys sitting next to your computer for 4 hours or is there a timestamp somewhere? Thank you!

      Comment


        In the Output Log. (window->dev tools->output log)
        Swarm Agent and Lightmass Troubleshooting

        Comment


          Originally posted by on3studio View Post
          Just a quick question: Where can I see how long my build time is? Are you guys sitting next to your computer for 4 hours or is there a timestamp somewhere? Thank you!
          Open up Swarm Agent. Go to "Log" tab. You will get all details.

          Comment


            Just weighing in on this badboy (awesome thread, gutted I didn't find it sooner).

            One major improvement I'd like to see to lightmass is an improvement to the map processing. Currently it's not possible to divide a single texture up across multiple threads, so build times are always capped at the largest lightmap resolution you have in the scene (usually anyway), and only one thread can do that work while the rest are doing nothing. Something similar to xNormals method where lightmaps are processed one-by-one and split accross all the threads might make lightmass significantly faster. I would have a pop at it myself if I had the first clue where to start, but this is probably one for the rendering team anyway.

            Comment


              ...or ability to choose number of cores, so one can surf/whatever while lightmass is calculating... just a thought... ;-)

              Comment


                Fantastic results from the portal lights.

                I see the suggestion here is to use uncompressed lightmaps. Doing that I also found the quality higher, esp. when larger surfaces considered. But using a lof of 512/1024px maps, this seem to facilitate higher memory usage and thus lightmaps mip-mapping.
                Which shouldn't be a problem with 12gb vram of Titan-X, but I couldn't stop this process by changing all .ini files I found on internet. No matter if I set shadow/lightmap mip-maping to 0/false, or rised value for memory pools, both in project and general folders, etc.. it would always mip-map those lightmaps,
                which is just visually horrible. Anyone with similar issue got this solved ?

                Comment


                  Daniel when you have a chance can you clear up some of these parameters that are being tweaked - it's a whole lot of stabbing in the dark from what I see.
                  I did my best in post #8, I don't have a better explanation than that =) I know ideal would be images and comparisons to explain each one but I don't have time for that.

                  @Nicolas3D : What I have observed is, if we are using other lights along with Skylight we don't need the high Photon Density(Direct as well as Indirect).
                  Skylights shouldn't interfere with other light's indirect lighting. So if you need to jack up photon density for some reason, introducing a skylight will not change that.

                  Increasing the Photon Density, increases the build time by the factor of amount of increase from default value(400).
                  Increasing photon density will only increase the photon emission part of the build by that factor. Photon emitting is usually 15% of a build, so you can raise it quite a bit before doubling your build time. Look at the stages in the swarm visualizer or the swarm log stats once a build completes. In contrast, NumHemisphereSamples and StaticLightingLevelScale are probably the quickest way to increase your build time.

                  @DanielW: Are portals going to be included in a release soon?
                  Well they still only exist on my computer so... Realistically it will be 4 months before any code change I make today will make it into a released build. Of course you can build latest directly from github (once it's checked in), but that tends to be very unstable.

                  Comment


                    One major improvement I'd like to see to lightmass is an improvement to the map processing. Currently it's not possible to divide a single texture up across multiple threads, so build times are always capped at the largest lightmap resolution you have in the scene (usually anyway), and only one thread can do that work while the rest are doing nothing.
                    That was true in UE3 lightmass, but it's been improved in UE4 lightmass. Specifically, the final gather is split into tasks of 128^2 and distributed to any threads that are idle. The largest lightmap component will still be the bottleneck, but your CPU is better utilized during it. This makes the biggest difference in small scenes where you are going for high quality, so there aren't enough components to keep all threads busy. This is done in FStaticLightingSystem::CalculateIndirectLightingTextureMapping in code.

                    Now, there are still other parts of lightmass work for a simple component's lightmap that could be multithreaded better - specifically area shadows.

                    ...or ability to choose number of cores, so one can surf/whatever while lightmass is calculating... just a thought... ;-)
                    This can be set in Swarm agent settings. You can bring up the swarm agent by starting a lighting build once (in a tiny map, or just cancel it), then find the icon hidden in your taskbar and double click it.

                    Comment


                      Fantastic results from the portal lights.
                      Portal light is a bit of a misnomer, they're not lights as they do not emit light. 'Light portal' makes sense though.

                      Which shouldn't be a problem with 12gb vram of Titan-X, but I couldn't stop this process by changing all .ini files I found on internet. No matter if I set shadow/lightmap mip-maping to 0/false, or rised value for memory pools, both in project and general folders, etc.. it would always mip-map those lightmaps,
                      which is just visually horrible. Anyone with similar issue got this solved ?
                      Make sure you are on Epic scalability settings.

                      Texture streaming poolsize settings come from Engine/Config/DefaultScalability.ini

                      [TextureQuality@3]
                      r.Streaming.PoolSize=1000

                      You can also disable lightmap streaming in your project's DefaultEngine.ini. You have to rebuild lighting and resave after changing this. Here's the default (from Engine/Config/BaseEngine.ini)

                      [TextureStreaming]
                      AllowStreamingLightmaps=True
                      Last edited by DanielW; 11-02-2015, 04:13 PM.

                      Comment


                        Why Ue4 not use bc6h for lightmaps? Quality should increase significantly.

                        Comment


                          Originally posted by juraj_talcik View Post
                          Fantastic results from the portal lights.

                          I see the suggestion here is to use uncompressed lightmaps. Doing that I also found the quality higher, esp. when larger surfaces considered. But using a lof of 512/1024px maps, this seem to facilitate higher memory usage and thus lightmaps mip-mapping.
                          Which shouldn't be a problem with 12gb vram of Titan-X, but I couldn't stop this process by changing all .ini files I found on internet. No matter if I set shadow/lightmap mip-maping to 0/false, or rised value for memory pools, both in project and general folders, etc.. it would always mip-map those lightmaps,
                          which is just visually horrible. Anyone with similar issue got this solved ?
                          Like DanielW suggested, increase your memory streaming pool. I had the same problem on my gtx 980 4gb. I increased it to 4000 like that : r.streaming.poolsize 4000 (no more mip mapping like crazy)
                          Never had a problem after that and I usually have 4k textures and 2k lightmaps sometimes!
                          Last edited by heartlessphil; 11-03-2015, 12:17 AM.

                          Comment


                            Really really happy I managed to finish this scene in 59 mins (lighting build time)! I have contact shadows everywhere :-) The only settings I adjusted was the lighting level scale.
                            I took an evermotion model and optimized it for Unreal. I managed that lighting/shadow quality in 59 mins because of this thread and community. You guys rock!

                            Every tile has geometry, walls also have extruded parts, so it wasn't THAT easy to remove all lightmaps artifacts.


                            Click image for larger version

Name:	light.jpg
Views:	1
Size:	320.6 KB
ID:	1092464
                            Click image for larger version

Name:	full.jpg
Views:	1
Size:	639.7 KB
ID:	1092465
                            Attached Files
                            Last edited by heartlessphil; 11-03-2015, 01:15 AM.

                            Comment


                              Looks great Phil. However, I found that it's a bit odd that using smaller value for Static Lighting Level Scale can make the rendering more faster (as long as the other value in Lightmass kept to default, except Indirect Lighting Bounce). Especially because the tooltip says that using smaller values (less than 1) will increase build time greatly. I also found that using 0.4 gives better shadows and faster rendering time than value of 1.
                              Swarm Agent and Lightmass Troubleshooting

                              Comment


                                Yes it will increase the build time but compared to the other settings, it's really not that bad. I left indirect lighting quality to 1, bounces to 10, smoothness to 1 and it's the defaut baselightmass.ini. I really only used a scale of .4, uncompressed lightmaps. :-) My previous version took 16 hours and looked worse with the other settings cranked up. This scene lighting is simple tho, just a skylight with Epic's HRDI.

                                Also, by leaving the rest of the settings to default, I was able to raise the resolution of my lightmaps to 1024 to clear all artifacts, something impossible in my previous attempt that took 16 hours with 256x256 lightmaps :-S

                                Comment

                                Working...
                                X