Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Why am I getting Light Bleed with my static mesh?

Hi everyone,

For testing purposes, I imported a static mesh (with an associated collision mesh with the UCX_ prefix) to use as level geometry. My intention was to have one of the rooms unlit, but unfortunately there appears to be light bleed along the edges of the static mesh. The static mesh is one-piece, so there shouldn't be any gaps. Does anyone have any ideas what I'm doing wrong?

Any help will be greatly appreciated. Thanks!

Unreal Engine 4 Light Bleed

Product Version: Not Selected
more ▼

asked Apr 30 '14 at 01:06 PM in Rendering

avatar image

111 7 8 15

avatar image Tim Hobson ♦♦ STAFF Apr 30 '14 at 01:14 PM

Hi Ben85,

This topic recently came up on the forums for UE4 that may point you in the right direction. Hopefully this will help you find the answer you are looking for. If you need any further help please let me know!

  • Tim

You can find the related post in the link: Click Here

avatar image Ben85 Apr 30 '14 at 02:01 PM

Hi Tim,

Thanks for replying. I had read that thread previously, but unfortunately, I couldn't resolve the issue. Static and stationary lighting turn my static mesh completely black, and movable lighting results in the light bleeding along the edges of the walls. The walls are 10 units thick. I tried adjusting the light map resolution with no change. Admittedly, I did not UV map the static mesh before importing, as I simply wanted to apply a base material from Unreal Editor (which I assumed would be OK).

avatar image fighter5347 Apr 30 '14 at 05:24 PM
  1. For the problem with the black mesh, you just have to create a 2nd uv channel + lightmap: https://www.youtube.com/watch?v=z5yc-bKbHyc

  2. Have you already increased the lightmap resolution of the ground?

avatar image Ben85 Apr 30 '14 at 07:01 PM

Thanks for replying. The static mesh includes all of the geometry (ground, walls, etc.) so when I previously increased the light map resolution, it was inclusive of the ground. Does every imported static mesh need to have UV mapping performed to avoid these types of issues? I just assumed I could skip the UV mapping process if I was only going to be applying a uniform material.

avatar image fighter5347 Apr 30 '14 at 07:06 PM

For a basic colour like red you wont have to create a uv map, but when the mesh is complex, it is recommended that you create a lightmap (so a 2n uv channel with a lightmap -> just when you use static lights). So just generate one and then see if it probably works ;)

Do you probably get any errors/warnings after you have build your light?

Also take a look at this site to get more information about light problems: http://www.worldofleveldesign.com/categories/udk/udk-lightmaps-05-common-problems-solutions.php

avatar image Ben85 Apr 30 '14 at 11:16 PM

Thanks for replying (again) and trying to help me resolve my issues. I created a second UV channel for the mesh within Blender, packed the UV islands, and then spaced them appropriately. I increased the light map resolution to 2048. I changed all of the lighting from movable to static. I don't (and didn't previously) get any errors when building the lighting. It actually looks much worse now, almost like it's unlit. It could pass as a level from a 1990's game. This is quite frustrating, I thought that importing static meshes as level geometry was common practice, but it doesn't seem to work well (at least, not in my case).

avatar image Guigsy1865 May 01 '14 at 04:22 AM

If you are willing you can shoot me a copy of your static mesh or a simple mesh that you can recreate the same issue with an I'd be willing to look at it and see what the issue is. You've had some things suggested to do so far that should have resolved the issue but have not.

Shoot me a message at Live4ever65t@gmail.com. If you send me something make sure it is in FBX or OBJ format. It may be the tomorrow evening before I am able to fully delve into it but I'll do what I can to help you out and give you some pointers if anything really stands out.

If something is amiss I will document the issues with screen shots also to give you a better understanding.

avatar image Ben85 May 01 '14 at 09:50 AM

That'd be great and I'd really appreciate you looking into it. Did you want the static mesh without the UV channels (i.e. the original in the screenshot) or the static mesh with the UV channels?

avatar image JoeYoung May 10 '15 at 05:20 PM

Please can somebody help me with this problem?. I am making a horror game and this is what happening. how do i make it so that it it all dark. thank you

alt text

problem 1.jpg (77.0 kB)
avatar image Guigsy1865 May 01 '14 at 11:31 AM

Send me the one with the UVs in place. That way I can directly see where the issue is happening. Thanks!

avatar image Ben85 May 01 '14 at 11:53 AM

I've sent you an email with the static mesh attached. I also tried modifying the static mesh to have thicker walls (20 units instead of 10 units), but the result was the same. Any insight will be greatly appreciated.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Alrighty Ben, So good news! You shouldn't have to do anything special with your mesh that you've built!

I did two things. I'll post the pics for comparison at the bottom with details.

1) I brought your model into 3ds Max to see if anything stood out. Nothing stood out as abnormal.

2) To make sure nothing was wrong directly related to the UVs I copied your mesh and adjusted the second UV for lightmapping the way I'm used to doing it (as good rule of thumb is, where there is a hard edge, ie. a corner, you're mesh should be broken apart there to keep the lightmap nice and crisp)

Once I had your original and my appended version in UE4 I was able to see a couple of things.

I immediately saw the bleeding your referenced in your original post. In this image here: alt text

I then went to the model where I adjusted the UVs and this is the result: alt text

Both of these models are using the default settings with no adjustments by me at all. This means that the Lightmap resolution was set to the default 64.

To indicate how much this light map resolution setting has in impact I used your original model and checked the box "Overridden Lightmap Res" and set that to 1024. This is the result:

I want to take a moment and stress that while it is easy to adjust settings to get what you want it is possible and can come at a performance hit. The model with the original UVs now has a 1024x1024 texture to "fix" the lightmap issue. However, if you noticed on the one i adjusted I achieved a similar effect with a much lower resolution lightmap that was 64x64. It's something to definitely take into consideration when building your game worlds.

Another consideration would be to build using modularity rather than one contiguous model. Sometimes that may be necessary but you can see a better performance and less of a hit on FPS if you were to build a single standalone wall, a wall with a door, a floor, and a ceiling. There you would have four pieces that you could build infinite # of rooms with and with texturing you could get a much better resolution out of it. Take a look at the Wall pieces that come with the starter content. Just type in "Wall" and take a look at the UVs and what you can do.

I'll send you the FBX with the redone Lightmap to your email.

If you have any questions feel free to let me know. Go forth and design some awesome game worlds!

more ▼

answered May 02 '14 at 01:38 AM

avatar image

643 20 9 31

avatar image Guigsy1865 May 02 '14 at 01:39 AM

This is the Original mesh with the 1024 lightmap. alt text

avatar image Ben85 May 02 '14 at 02:04 AM

I really appreciate you taking the time to test all of this out for me. Although, I'm slightly confused why my results with the original static mesh (with a light map resolution of 1024) are so different from yours. As you'll note from the attached screenshot, the lighting is hideously inaccurate.

Hideous Lighting

avatar image Guigsy1865 May 02 '14 at 02:06 AM

I used the first person template which may have different light settings than yours. Did you use a blank template and bring in a directional or point light?

avatar image Ben85 May 02 '14 at 02:11 AM

Yeah, there are 3 point lights (well, technically 5 point lights, but 2 are used for switch panels and have a very low intensity and attenuation radius). There should be no lighting in that room (apart from the doorways).

alt text

avatar image Guigsy1865 May 02 '14 at 02:25 AM

Okay, so this is the setup I used based off a moment ago. The only light is really coming through the doors. there is a little bit of bounce and ambient light in the room but for the most part it's dark. If you need it darker than this you'll probably have to see about using Post Process volumes to block light or lowering the intensity of the lights coming through the doorway.

Let me know what you think.

alt textalt text

avatar image Guigsy1865 May 02 '14 at 03:05 AM

I've been playing around trying to do this without any sort of Post Process Volume to keep it more simple. What I did here to achieve this level of darkness I created a simple material. (Circled in Red) and applied that to the mesh. Having the dark grey material dampened a lot of the light. Perhaps try that.

Let me know what's working and what's not. Definitely want to help you get started.

alt text

avatar image Ben85 May 02 '14 at 03:03 PM

Hi Tim,

Thanks for the help. I'm going to mark this question as resolved, even though I've been unable to achieve a decent result in UE4. I'll attempt properly UV mapping the static mesh to resolve the light bleeding issues, although, I've also noticed that when UE4 triangulates the mesh, it wrecks the smoothing. It seems I can't win at the moment! Maybe I'll have to use BSP instead.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question