Home Unreal Engine

[UE4 - Lightmaps] Rules and guidelines for creating rooms?

polycounter lvl 9
Offline / Send Message
EliasWick polycounter lvl 9
Greetings,

I have spent weeks on and off trying to find a great way to create lightmaps for an apartment with 8 rooms. I have gathered information here and there but I can't draw any conclusion on to how I should approach my issue. I have read threads after another and tried most if not everything, except for recreating the entire apartment and not using planes.

Here is my problem: (Light bleeding from the ceiling and floor, (blotchy shadows) )


Information:
  • Lightmap resolution is at 1024. (increasing this doesn't make the light bleeding better.)
  • Lightmass settings are shown in the image above
  • I build the light in Production and I am using the highest visual (scalability = Cinematic) settings in the viewport.
  • The entire model is one-sided, and nothing has been changed on the model during import, except for disable auto generate lightmap.
  • The apartment model is using my own lightmap which looks like this:
  • My 3d Model looks like this: (the walls, floor and ceiling is welded together.)
  • Since the model is one-sided I have created the exterior of the building. It looks like this:I have placed a cube above and underneath the apartment to block light coming through.
I really don't know what else I can do. Of course I'll be here if you have any questions and I am willing to test until the problem is solved.
If I should have created the apartment model in another way, then please tell me. I read about ceiling, walls and floor having to be a closed mesh or having thickness. So in other words a plane isn't ideal for rooms.

EDIT: I have added an image of how the apartment looks with "better" lightmass settings. (I know I can increase indirect lighting smoothness to compensate for the artifacts, but I want to try and keep a crisp shadow through the game):


Thank you.

Replies

  • engelmanna
    Options
    Offline / Send Message
    engelmanna polycounter lvl 16
    There are few things that stick out to me.

    • I'd break apart your mesh into several pieces. Maybe try breaking apart per room, or try looking at the unreal example meshes in the architecture section, they break it up into solid wall or floor pieces. Either way has it's pros and cons, but in my opinion either way would be better than doing one giant mesh. Not only will you get more UV resolution per mesh, but it will allow UE4 to cull out out of site meshes.
    • Once you've broken apart your mesh and laid it out in UE4, use the UV resolution view to help establish good UV resolutions per mesh.
    • Look into using Lightmass portals to help with bringing light into the interiors. 

    That should give you a good start on fixing your issues. If you want to dive deeper into setting up lighting, i'd highly recommend watching the Lighting Academy playlists here: https://www.youtube.com/user/51Daedalus/playlists He does a great job covering UE4 lighting. Lastly, i'm sure you've read it, but if you havent, read over the UE4 Lightmass and Lightmapping documentation:

  • EliasWick
    Options
    Offline / Send Message
    EliasWick polycounter lvl 9
    Thank you very, very much. I'll try your idea with breaking things apart and see how it goes.

    I combined all rooms into one mesh in order to have seamless shadow across the floor. But since I will have a door covering up that seam, divided rooms shouldn't be a problem. I have not even looked at light-mass portals.

    Yet again, thank you very much and have a great continuation of your weekend!

    EDIT: It's very late so I can't rework all of the rooms, but I tried the Lightmass Portal and Sh!t, that made a huge difference. All of the blotchy shadows on the wall are now gone. The light is still bleeding through the ceiling though.
  • TheGabmeister
    Options
    Offline / Send Message
    TheGabmeister interpolator
    This thread in the Unreal forums will definitely help you. It's a long read, but is the most important thread about lightmass in my opinion. Took me about 3-4 hours to read and understand it:
    https://forums.unrealengine.com/showthread.php?88952-Lets-make-Lightmass-EPIC-(and-understandable)

    It's basically a compilation of the most common lightmass artifacts and the techniques the Unreal lighting pros have been using to solve these issues. Fun to learn that light portals weren't in Unreal until 4.11, and editing the values in BaseLightmass.ini was as unpredictable as sorcery! Nowadays, lighmass has improved a lot all thanks to the contributions of all the developers in the above mentioned thread.
  • EliasWick
    Options
    Offline / Send Message
    EliasWick polycounter lvl 9
    This thread in the Unreal forums will definitely help you. It's a long read, but is the most important thread about lightmass in my opinion. Took me about 3-4 hours to read and understand it:
    https://forums.unrealengine.com/showthread.php?88952-Lets-make-Lightmass-EPIC-(and-understandable)

     I ran into the thread last year but couldn't find it again. Thanks for sharing. I'll read through it and see what I can come up with. My biggest fear was that my model was made incorrectly. So no matter how much I change with the lightmass the bleeding and blotching wouldn't go away.

    But do you know anything about one sided models and how that would affect lightmaps?
  • Eric Chadwick
    Options
    Offline / Send Message
    To the OP, I moved your thread from Technical Talk to the Unreal section, should get more UE heads.

    Also added a ? to your title so it's more obvious you're seeking answers, rather than providing a tutorial or guide you've already created.
  • EliasWick
    Options
    Offline / Send Message
    EliasWick polycounter lvl 9
    Back with some results from my testing.
    Note: I have not read too much from the link that you have provided about Lightmass, I will be doing that today.

    • I have split the entire apartment mesh into room by room and this solved my issue for the most part.
    • The lightmap resolution for each room is 256 and I have NOT snapped the verts and edges to the grid when UVW Unwrapping.
    • The image below is built with production light quality and kept at default lightmass settings.
      Here is an image of how that looks:

    Splitting up all the rooms came with the problem of the floor having different shadow tones. This will not be a problem since I will have a door frame here.
    Here are two images of that:



    I bumped up some settings and got this result. You can see my lightmass settings to the right of the image:
    This took under 1 minute to build.


    Lastly I wanted to see how the apartment would look if I bumped up my settings to the extreme:
    The only change here was the lightmass settings, I set a completely white texture for the walls and ceiling. I also bumped up the lightmap resolution for all rooms from 256 to 512.
    This took around 3-4 hours to render:



    The problem that occurred here was that I was missing some shadow information above the door. I believe that I can find a solution to this problem in the link that was provided.


    If you have any suggestions or other tips I would love to hear them!
    Thank you for all the help, have a great continuation on your weekend and happy modelling!
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Nice findings and results. Have you tried making the floors/ceilings as one piece?
  • EliasWick
    Options
    Offline / Send Message
    EliasWick polycounter lvl 9
    Obscura said:
    Nice findings and results. Have you tried making the floors/ceilings as one piece?
    Hey, thanks! :)
    Do you mean, combine the floor, and ceiling mesh of all 8 rooms into one? or just separate them? So in total: 8 rooms with walls, 8 floors and 8 Ceilings? If you understand what I mean with that.

    I've considered doing it (separating everything), and it will probably give me a better result. But since I am trying to create a game and not Architectural Visualisation, I want to keep everything to a minimum. You know, textures, models, and so on :)

    I actually have a question that you might be able to answer. When it comes to adding a baseboard to the bottom of the wall, would you keep that a separate mesh or combine it with the wall?

    Combining all of the floors, of all rooms and stitching them together would solve this issue:
  • Menchen
    Options
    Offline / Send Message
    Menchen polycounter lvl 3
    Can you show your lightmaps UVs? And a pic of the scene using "lightmap density optimization" view?
  • EliasWick
    Options
    Offline / Send Message
    EliasWick polycounter lvl 9
    Menchen said:
    Can you show your lightmaps UVs? And a pic of the scene using "lightmap density optimization" view?
    Absolutely! I just realized that I could do some clean-up on the triangulation and space some parts further away from each other.
    I have provided the lightmass settings if you are interested in them for this particular result.



    Edit: I cleaned up the UVs on the room and it has no impact on the light result whatsoever, at least not enough for all of the extra work aligning faces to the grid.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    If nothing gives better result, I would try to separate the floor, and handle it on its own. I would try using a solid box that covers the whole ground / ceiling.
  • EliasWick
    Options
    Offline / Send Message
    EliasWick polycounter lvl 9
    Obscura said:
    If nothing gives better result, I would try to separate the floor, and handle it on its own. I would try using a solid box that covers the whole ground / ceiling.
    Alright, I did some more testing and these are the results:

    Changing the floor to one big mesh resolved the inconsistent shadow on the ground:

    Another issue appeared when I used one big block as a celling. I am using a lightmap resolution of 1024 for ceiling and floor.

    Other than this, everything looks great:

    I'll report back one last time when I find the good solution and result to my problem.
  • EliasWick
    Options
    Offline / Send Message
    EliasWick polycounter lvl 9
    I won't be able to do more testing on the lighting, because of an import, reimport issue that ran into working with the latest update of 4.16.2. I thought of leaving a link here if someone else is experiencing the same issue: http://polycount.com/discussion/188828/ue4-ver-4-16-2-cant-close-ue4-editor-after-importing-model-or-reimporting-model#latest
Sign In or Register to comment.