7 questions: Lightmaps, Skylight portal, Leapmotion

After reading tons of answerhub questions and answers and after diving completely into UE for the last 4 weeks I’m launching my first post :smiley:

  1. About UV bordersnapping and padding for lightmaps. Didn’t do it yet for this house, but I will. Can i rescale my UV islands a bit (non uniform) to snap all edges to the grid? Will this deform my lightmap shadows?

  2. The outer walls of this house are one object with a 2048x lightmap. I believe you guys telling the walls should be cut up, I read this everywhere. Could you tell me what the main advantage is? If each wall has a 256x lightmap, will UE consume the same or more memory as a single 2048x lightmap? Or does UE process this differently?

  1. Is a Static light the main reason for “JPEG like artifacts” on my walls? Should I always use Stationary? I read on Answerhub that these walls are the worst case scenario for a game engine, is this correct or can I still get rid of these? Higher lightmaps should make these smaller, but is there another solution without using noisy normal maps?

  1. Lightmaps like closed meshes. If I delete the bottom poly from a wall, how can light leak from underneath from the front to the back because there is no “bridge” to let the bleeding travel to the other side?
    Do all walls have to be completely closed? The RealisticRendering scene has a L shaped wall with 2 polygons, isn’t that like an open mesh also? Also lots of walls in “BlueprintOffice” from Epic have open meshes.

  1. My ceilings are 2 meshes. Is this a good practice or should they be made seperatly for each room? I have seen both on Answerhub.

  1. I use extra lights to fire more fotons into my rooms, but these also lit the outer walls. In Vray I use Vraylights with a “Skylight portal” function. Is there an alternative in UE?

  1. I like the Reimport function a LOT as it updates without changing the location of the original import. But when I Reimport it often adds a third UV channel to my mesh. I make all my UV lightmaps myself. Is there a way to say to UE “Don’t add another UV channel during reimport”

  1. Is it possible at the moment to open doors and flip swithes with 3D hands using Leap Motion?

Many thanks! Love you guys.

Hi Hernavced,

Typically it’s best to ask multiple questions as separate AnswerHub posts. This makes it easier to track if there ends up being a bug or other issue. It also makes it easier for users to search for specific topics when they run into similar issues themselves.

I’ll do my best to answer your questions, but some of these would be better as stand alone questions even though they are around the same theme. :slight_smile:

About UV bordersnapping and padding for lightmaps. Didn’t do it yet for this house, but I will. Can i rescale
my UV islands a bit (non uniform) to snap all edges to the grid? Will this deform my lightmap shadows?

There is no need to worry about any stretching. The lightmap shadows will not appear stretched. Making sure that the edges are snapped to the grid is fine.

When snapping to the grid make sure you decide on your lightmap resolution before hand and setup the grid properly that you want to snap to. For instance to get the grid size/space you would want do the following:

For a 64x64 lightmap resolution
1 / 64 = 0.015625

Change out 64 with your target power-of-two lightmap resolution.

For padding make sure there are two grid spaces between the outer edge and any other UV islands.

The outer walls of this house are one object with a 2048x lightmap. I believe you guys telling the walls
should be cut up, I read this everywhere. Could you tell me what the main advantage is? If each wall has a
256x lightmap, will UE consume the same or more memory as a single 2048x lightmap? Or does UE process this
differently?

UE4, along with many other games engines, are designed to work best with modular components. This means that breaking the wall into smaller chunks and placing them where you need would be the best solution. The advantage to using multiple pieces is that those that are not in view will not be rendered. If you have one large object and one large texture this means that it will be loaded in memory longer than needed. It’s much more better to use multiple low resolution lightmap meshes than one single large asset that sticks around in memory because it’s always there even though there are parts that should be culled.

While it may be easier to do a single mesh, it’s better to use modular pieces whenever you can.

Is a Static light the main reason for “JPEG like artifacts” on my walls?
Should I always use Stationary? I read on Answerhub that these walls are the worst case scenario for a game
engine, is this correct or can I still get rid of these? Higher lightmaps should make these smaller, but is there another
solution without using noisy normal maps?

Take a look at this. This will explain in more detail what you’re seeing with the static lighting artifacts. Essentially these are caused by indirect lighting. The information in the link will help you get a better grasp of this and how to lower those artifacts.

It’s not just a single answer for everything. Lightmap Resolution, UV Layout, World Settings, and amount of light in the scene all play into this.

Stationary Lighting is good for dynamic objects in a static environment. The stationary light will bake static lighting for any static non-movable object. Anything that is moving (ie. character, or movable object in the scene like a ball rolling) will be lit by the dynamic component of a point/spot light. If you use static lighting, the volume lighting samples will be used to light the character appropriately with out dynamic lighting.

Lightmaps like closed meshes. If I delete the bottom poly from a wall, how can light leak from underneath
from the front to the back because there is no “bridge” to let the bleeding travel to the other side? Do
all walls have to be completely closed? The RealisticRendering scene has a L shaped wall with 2 polygons,
isn’t that like an open mesh also? Also lots of walls in “BlueprintOffice” from Epic have open meshes.

Open meshes are fine. I use a lot of these myself. Lightmap resolution and UV layout are important factors here though. Without a good layout that uses that space efficiently it will be hard to get as good of quality. This goes back to the original point I made that modular will give better results.

Also, make sure that you’re building lighting on Production and not Preview. You can see an example of this in the Wiki Lighting guide linked here: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

My ceilings are 2 meshes. Is this a good practice or should they be made
seperatly for each room? I have seen both on Answerhub.

Either should work, but modular will work best in this situation. Making sure that these are also culled when not in view.

I use extra lights to fire more fotons into my rooms, but these also
lit the outer walls. In Vray I use Vraylights with a “Skylight portal” function. Is there an alternative in UE?

This is common it seems for those doing a lot of the archviz projects. (Some of these can be grabbed for free from the marketplace like Berlin Flats and Koolas Light Room)

You could also try a skylight set to static and see if that helps lighten up your rooms the way you would like.

If you need any God-Rays you would want to use a static mesh with a material to do this. Epic uses this often with it’s environments (Mobile Sun Temple and Blueprint Office are two examples that are available). You can even check out this users tutorial here: [Tutorial] Godrays! - Community & Industry Discussion - Unreal Engine Forums!

I like the Reimport function a LOT as it updates without changing the
location of the original import. But when I Reimport it often adds a third UV channel to my mesh. I make all my
UV lightmaps myself. Is there a way to say to UE "Don’t add another UV channel during reimport"

Uncheck the option on import for “Generate Lightmap UV.” Unfortunately, this would be the only way to ideally deal with this since there is no real difference in how a lightmap is setup than a normal texture UV. Since some meshes can use multiple UVs it would not be feasible to disable this feature all together. Instead using the check box to disable it for meshes you do not need it on for the import options would be the best solution.

Is it possible at the moment to open doors and flip swithes with 3D hands using Leap Motion?

This would probably be better asked as a separate question as I have not used the Leap Motion or have any idea what it’s capabilities are at the moment.

I hope this has helped.

Tim

Thanks a lot Tim, really appreciate the help.

There is just one thing I don’t understand. I’ve been unwrapping meshes since 1998 for VFX work and saying that Lightmap shadows don’t stretch with stretched UV’s is something as weird as saying to me that the galaxy is really infinite :smiley:

I believe it but I can’t get my head around it :smiley:

PS: I’ll post each question in a seperate section in the future, promise.

PS: I’ll post each question in a seperate section in the future, promise.

No worries. These all had a common theme, which they all worked together, aside from the leap motion, which I wasn’t sure about. :wink:

Lightmap Stretch

This one took me a bit to get my head around as well. By stretching the faces and making sure that the 0,1 space in the UV for the lightmap is being filled you get better shadows quality without the need to always adjust the lightmap resolution to be higher.

Here is an example.

Left side is the stretched UV and the Right side is the correctly scaled UV. Both of these UVs are the same height in the 0,1 space. The only difference is that I grabbed the edges and stretched the side to fill the width of the 0,1 when I was setting up the lightmap.

The bottom view is the lightmap density where you can see the Left one is stretched.