Announcement

Collapse
No announcement yet.

(Another) Lightmap question

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

    (Another) Lightmap question

    hi guys. I'm making a transition from static 3ds max and blender renderings to Archviz in UE4. so far I've been spending days trying to figure out the best workflow for importing objects into UE4 and generating lightmaps. I think I've figured it out for most part, but I'm not quite there yet. I've built walls out of many different parts that snap together. while inside the room, lighting looks good, no problems there, no bleeding, etc... but, as you can see in the image, where two wall parts meet I get different shadow tint. you can see it in front by the arch and in the back by the second arch. does anyone know why is this happening? I've paid good attention while unwrapping to have enough padding, lightmap res is set to 256 (when changed to 1024 - which is overkill for a small wall part - the result is the same). I got the same problem when I built this apartment out of default brush boxes.

    and while I'm asking, what's with the splotches? you can see them in second image. do I need to let more light in or is something else causing it?

    any info appreciated. I've tried looking for answers but came empty handed. THX!!!!

    EDIT: I figured it out regarding splotches. the UV islands in question were rather small. I've tried to make all objects have roughly the same texel size, but that made some of the UV's just too small(er). redoing UVs and/or increasing lightmap res did the trick.

    the initial problem remains, though. it happens on two walls that are connected, on the same (planar?) side. shouldn't they be equally lit?
    Attached Files
    Last edited by heraSK; 11-10-2014, 10:14 AM.

    #2
    the initial problem remains, though. it happens on two walls that are connected, on the same (planar?) side. shouldn't they be equally lit?
    This is not the case with UE4. You will need to adjust some settings in your World Settings > Lightmass

    Depending on how you've setup your UVs and that they are on the grid for the specified resolution you're targeting you may be able to tweak the settings here and get the results to lessen.

    You can find a more in-depth walk through of possibilities to reduce the seam in this forum thread: https://forums.unrealengine.com/show...ghting-Problem

    The reason this occurs though is because lighting is baked on different threads and by doing this things are not perfectly lit. Using the settings in the post can reduce this effect but will also increase build times. You may also need to build lighting on higher levels than preview to really see the changes as well.

    Thank you!

    Tim
    Tim Hobson | Learning Resources | Epic Games
    UE4 Documentation

    Comment


      #3
      thank you, tim. there are some great tips inside that thread. meanwhile, I did find some info on common LM and UV issues (for UDK, though, but I guess concepts still apply). with all that info I believe I could make it work inside my project.

      being complete n00b in UE I'm still figuring out best workflows, how to prepare meshes for import, lighting (^^)... it's all...well... overwhelming at times :-D. but ****, I wanna make videos like koola did :-)))!!

      Comment


        #4
        Yeah the concepts still apply for good lightmapping techniques!

        World of Level Design has always been a great source of information and is where I started when I was first working with UDK and wondering what these bad shadows were. It's a learning step I think that everyone goes through.

        Epic, more specifically Brian Karis, is working to make this a more streamlined process. In a perfect world worrying about lightmapping wouldn't be that big of a concern. The new generated lightmapping technique in UE4 that was introduced with 4.5 works really well so long as you have a broken up geometry for your texture UV. For instance, if you have a sphere or cylinder that has not had it's seam broken and flattened then the generated LMs will not work. It will not cut seams. It only repacks them to be more efficient based of the texture UV islands.

        For simple objects I've found myself using this more, as others at Epic have done as well, but for the most control and if I need to make sure something is setup perfectly I'll do a custom lightmap and make sure all my edges are on grid lines for my targeted LM resolution.

        It's definitely a process and a time sink to learn at first but the results when you get good lightmaps make it completely worth it!

        Feel free to ask or send me a message anytime you have questions. I don't mind helping.

        Tim
        Tim Hobson | Learning Resources | Epic Games
        UE4 Documentation

        Comment


          #5
          your solution for getting the lighting more even worked, thank you. and you're right about learning process. for the last few days I've been digging intensively through UE4. it's a whole new world to grasp. my mind is running on multiple tracks at once, and I think I'm getting a mild headache, haha!!

          since the engine is being used for archviz only recently it's hard to find some good info on the subject, so I apologize for another set of questions. :-) now I'm wondering, how would an archviz scene look like if lit only by dynamic lights? (I'm currently at work, doing reading A LOT of posts, and articles about dynamic, stationary and static lights) static lights with baked lightmaps onto static geometry is obvious solution because not heavy on CPU/GPU. but setting up all lightmap UVs is a major pain in the <beep>, especially if you have library with premade, bought objects w/o good UVs, etc.

          would you happen to have some insight on how much of an impact would a scene have with let's say walls, floors and ceilings being static meshes, and smaller stuff like chairs, tables, even sofas being dynamic? of course, everything would have to be lit with stationary lights to accommodate the idea. my thinking is, that is no large level, with hundreds of buildings, npc's and whatnot, which could have great impact on system. so, in theory should it be doable? as I understood, there's currently no dynamic GI solution and I'm yet to research what is LPV and hot does it work.

          I don't mind doing some reading (aaah, the headache!!), but getting some info from you guys is always appreciated! thx againg. best regards!!

          Comment


            #6
            I've tried LPV and dynamic GI. it gives me weird results, light leakage and odd shadows. but never mind. lightmaping is coming along nicely, as you can see. don't mind the artifacts on the walls, lightmaps are 64x64 for previewing. speaking about that, is there a way to calculate lightmaps only for specified objects? lets say I'm working on a room, and changing stuff all the time. is it possible to exclude other rooms and concentrate only on current one, so that lighmaps building doesn't get longer with each populated room?

            I've found layers, but that affects only viewport visibility...

            And one more: why does the wall behind radiator glow? the effect is somewhat reduced on preview quality level (last image) but really glows on production quality. it looks like the outside light (spot light directed to reflector plane) affects the radiator which reflects light toward the wall. that's odd, since there's no leaking whatsoever on the rest of the objects...
            Attached Files

            Comment


              #7
              Using dynamic lighting within reason shouldn't be an issue I don't think. For Arch Viz I think it could work well if being setup properly, which can require a bit of tweaking to get things right. You can however, use Stationary lighting to get the best of both worlds and for each object that you want to not cast dynamic shadows you can use the lightmaps it has by doing the following:

              - Select the mesh you want to cast static shadows and not be lit dynamically
              - In the details panel uncheck cast dynamic shadows for the objects you want to have lightmaps baked
              - in the details panel uncheck static shadows for the objects you want to be dynamically lit

              With this setup you'll now be able to bake lightmaps for objects you want and have dynamic lighting for your others. For a small scene, depending on the hardware you'll be using, I wouldn't imagine there would be a tremendous drop. For Eric and I when we were working on our Ghostbusters side project (Link in my signature if you're curious) we set everything to dynamic lighting and ran at about ~20 fps for the more heavy parts of that demo. That was mostly during the running parts. The main hallway ran around 30fps with everything casting shadows. If we had planned to do it dynamic we could have turned off shadows on things that didn't necessarily need them, for instance, every book did not need to be dynamically lit. They would still receive shadows but they certainly didn't need to cast them. This would have improved out FPS greatly instead of having a couple of thousand books rendering shadows.

              I've not personally used LPV's. It is still an experimental feature, thus why you would need to adjust it in the ini file to enable it. There are some known bugs with it with translucent materials and causing crashes though. The users who have used it have used it for outdoor scenes which seems to work well enough.

              For your scene is LPV enabled in this? If so, that glow could possibly be attributed to that. I've honestly not messed with them that much since they are not included as a standard feature yet. I've only looked into crashes that have occurred to make sure those are reported. The LM resolution for the walls should be good. A high resolution probably wouldn't be necessary.

              If this is happening with LPV I could use the Realistic Rendering demo Epic has in the Learn Tab of the launcher. I may be able to see similar results, but that may be attributed to LPVs though if that's what you're using.

              As for building lighting I did a test a while back to not have to build the entire GB scene with all the books and there is a setup possible. I would consider it a hacky type solution but it works.

              Go to the menu bar > Windows > select Levels

              A new window will pop up and will have a level listed as Persistent. This is your current level. Create a new level and label it whatever you like. (ie. Room 1, Room 2).

              Any object you place in this level can be hidden or shown by clicking the eye next to the level name. If you dont have the level visible with the meshes it has it won't bake any lighting that is visible in the viewport. There will be a warning telling you this but you can click on past it and bake lighting for only the visible objects. When to see more quickly the results. I recommend when you're done with the project to bake all lighting with all levels visible though.


              I hope this helps, at least a little!

              Let me know on the LPV thing if you want me to take a look. If you are using it. It may be a limitation of the process at the moment.

              Tim
              Tim Hobson | Learning Resources | Epic Games
              UE4 Documentation

              Comment


                #8
                thank you, tim. no, I'm not using LPV in images above. I did try it though, but then the lighting got all weird. I've read about it still being in development so I dismissed it right away. maybe some other time. that combo with stationary lights + static meshes + movable meshes might work, but I wont know that until I start populating the scene with more objects. I'll post an update when I get there. thank you for your help! I'm sure I'll have tons of questions later... ;-))

                Comment


                  #9
                  No problem. If you post questions and you dont see me pop on at some point during the day feel free to shoot me a message and I'll hop on the post to help out.

                  Tim
                  Tim Hobson | Learning Resources | Epic Games
                  UE4 Documentation

                  Comment


                    #10
                    hi, me again...;-)

                    I've got some more questions. didn't want to open another thread, so I'll post them here. it again concerns lighting. a while ago I've made a batmobile model in blender (screenshot 01). now I'm trying to make similar scene in UE4. this time I'm using substance painter and designer to create material for the car. but I've run into some problems. as you can see in screenshot 02 when I apply subsar material the car is too dark. if I export bitmaps and create material in UE4 the result is better (screenshot 03) but I still cant get it to catch more light. I've noticed how raising metallic value to 1 makes material look darker, and lowering it to 0 looks better, but if the car is made out of metal that isn't a way to go, right?

                    if I load a car into one of the starter scenes (screenshot 04) it looks like I want it to, but I do want the scene to be dark (dark knight and all that...). again, applying subsar material (screenshot 05) makes it look too dark.

                    I've read about how we're supposed to turn off SRGB for metallic and roughnes textures, but how do I do it with subsar material? and the other thing, that big room gives me weird lighting. if it's smaller everything glows with just one spot light, and every wall is uniformly lit. if I make the room bigger, well, you can see how upper edges glow, but the ceiling is black. and what's funnier, in one of earlier experiments it all worked OK (although only with bigger room). I should also mention that I've deleted environment and sun light. also, static and dynamic lights make no difference, the car can't catch enough light unless I make the base color gray...

                    again, any input is much appreciated. thx!!

                    screenshots 06 and 07 are from substance painter and designer. it's just in UE4 that it looks dark...

                    Blender
                    Click image for larger version

Name:	Screenshot01.jpg
Views:	1
Size:	868.1 KB
ID:	1061129

                    UE4 with substance material
                    Click image for larger version

Name:	Screenshot03.jpg
Views:	1
Size:	414.2 KB
ID:	1061131

                    UE4 with UE4 material
                    Click image for larger version

Name:	Screenshot02.jpg
Views:	1
Size:	536.7 KB
ID:	1061130

                    UE4 daylight with UE4 material
                    Click image for larger version

Name:	Screenshot04.jpg
Views:	1
Size:	470.8 KB
ID:	1061140

                    UE4 daylight, Substance
                    Click image for larger version

Name:	Screenshot05.jpg
Views:	1
Size:	878.0 KB
ID:	1061136

                    Substance painter
                    Click image for larger version

Name:	Screenshot06.jpg
Views:	1
Size:	739.8 KB
ID:	1061137

                    Substance designer (with more roughness - the same result in UE4)
                    Click image for larger version

Name:	Screenshot07.jpg
Views:	1
Size:	561.3 KB
ID:	1061138
                    Attached Files
                    Last edited by heraSK; 11-17-2014, 04:29 PM.

                    Comment


                      #11
                      I'll be honest here, I've only used the trial version of Substance and that won't let me export any subsar materials for testing. I don't really have access to it unless I purchase it personally and I've not found a reason to work it into my workflow at the moment, although I've seriously considered it.

                      There are a couple of things to possibly try here without looking at the material.

                      The difference in the startup map with all the spheres and materials and a default level would be in the world settings for Environment Color and Environment Intensity. Adjusting the environment color up just a little into the dark gray range and adjusting the boost up can lighten your shadows. In the startup map the environment color is set to a light blue instead of black if I remember correctly.

                      For the reflections on the metallic material I would place a post process and under SSR adjust the quality to a higher value up to 100.

                      Since I don't have access to subsar materials I can't really offer any insight there as much without testing some scene setups. If you want to provide a basic subsar material with the separate bitmap versions I could set something up and do a comparison on my end. These could be basic materials nothing special. If you want to do that you can post a link here to download or shoot me a private message.

                      Give those first options a try and if that doesn't work consider post some test materials and I'll have a look to see if I can offer any tips/help.

                      Tim
                      Tim Hobson | Learning Resources | Epic Games
                      UE4 Documentation

                      Comment


                        #12
                        sorry for late reply, I've been distracted with other projects. I did try your suggestions and they did improve the scene, but just a bit. what eventually worked for me was that I gave the car paint dark black color with value 0.001. it made the car more visible yet not gray, where 0.002 was already gray. go figure, LOL. thanks for your help. cheers!

                        Comment


                          #13
                          I didn't want to open another thread for similar problem, so here I go bumping this stuff again.

                          the problem I'm having is indeed weird one. sometimes I get light reflecting of an object that's near the wall, although that object is not in direct line of sight to light source. first image shows what I mean. the weird part is that it sometimes happens and sometimes not, and I haven't been able to figure out what is causing this (and when). it's more pronounced at production quality light build. does anyone know exact reason why's this happening so I (we) could avoid this happening (and stop asking same questions all the time :-)))?

                          another thing (as seen in second image, I've adjusted contrast and brightness to exaggerate it a bit) is that shadows can have this, I don't know, wavy pattern (falloff). is this caused by lightmap density? ceiling is already at 1024 and in lighmap density view looks pretty dense and red. any info on that too is much appreciated. the light settings for these images are as follows:

                          static lighting level scale - 1
                          indirect lighting bouce - 100
                          indirect lighting quality - 6
                          indirect lighting smoothness - 1

                          production quality light build

                          Click image for larger version

Name:	LightLeak.jpg
Views:	1
Size:	652.2 KB
ID:	1071275
                          Click image for larger version

Name:	Shadows.jpg
Views:	1
Size:	624.6 KB
ID:	1071276

                          Comment


                            #14
                            Hi heraSK,

                            This seems to be the same issue reported here: https://answers.unrealengine.com/que...led-in-47.html

                            This isn't a lightmap issue, but a vertex normal issue. If you tried that same asset in 4.6 it should reflect correctly vs 4.7 where it's causing a tiling issue.

                            This was reported with ticket UE-11205. Keep an eye on the post linked above for further updates.

                            Thanks!

                            Tim
                            Tim Hobson | Learning Resources | Epic Games
                            UE4 Documentation

                            Comment


                              #15
                              thx tim, but what I meant is wavy shadow pattern on the ceiling, not the reflections on the pipes. I wasn't even aware reflections were an issue, LOL. it actually looked as if those pipes have slightly curved surface, which I found nice TBH.. :-))

                              Comment

                              Working...
                              X