Announcement

Collapse
No announcement yet.

Light shines through my door.

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

  • replied
    Hi Narater,

    I have made the door 2x thicker and that is as far as I want to go. In what way did you tweak the UVs for the lightmap?
    Click image for larger version.

    Name: DoorLightMap.jpg
    Views: 8
    Size: 79.5 KB
    ID: 5815
    What did you find was wrong with it?
    In the images from my post above I detail what I changed. I took the original UV you had and applied that to the second UV channel. I then looked to see what UV faces were overlapping. The only parts overlapping were the pieces I removed and stuck in the top right and left corners. This was a simple way for me to check and see if the lightmap was the main culprit to the lightbleed. Since the mesh wasn't being broken up as it is in the image you've posted it didn't allow lightbleed to be baked into the texture.

    What about what Obihb said that movable objects lightmap are of no real use?
    Lightmap are used to bake lighting into a texture for anything that is static (non-movable). This gives no overhead for the object at run-time with shadows.

    If your object is set to Movable it will not need a lightmap because the shadows are not being baked into a texture since the shadows are dynamically created based on the object.


    Tim

    Leave a comment:


  • replied
    Hi Tim.

    I have made the door 2x thicker and that is as far as I want to go. In what way did you tweak the UVs for the lightmap?
    Click image for larger version

Name:	DoorLightMap.jpg
Views:	1
Size:	79.5 KB
ID:	1052191
    What did you find was wrong with it?

    What about what Obihb said that movable objects lightmap are of no real use?

    It only slighty helps if I set Self Shadowing Accuracy to a higher number.

    Leave a comment:


  • replied
    Hi Narater,

    I messed with your Mesh for a little bit this morning trying to solve the issue. Attached you'll find two images.

    The first is a slightly tweaked UV for the lightmap vs the original lightmap.

    In this image on the left is the tweaked lightmap (can be seen in the second image) and the right is the original lightmap. You can clearly see that light bleed is happening on the original.

    Click image for larger version

Name:	DoorNoLightvsLightLeak.PNG
Views:	1
Size:	174.3 KB
ID:	1052182

    Here in the second image is the original UV for the texture. I did a check to see if there were any overlapping UVs and there were. They are the ones in the top right and left corners. Moving those up I then reimported this into UE4 and set the lightmap resolution at 128. Both meshes in the image above are using a 128 lightmap resolution.

    Click image for larger version

Name:	ORiginalUValtered.PNG
Views:	1
Size:	177.9 KB
ID:	1052183

    It wouldn't hurt to make your mesh a little thicker as you've indicated you're doing, but having a properly setup lightmap can do worlds of good as well when it comes to getting the look you want!

    If you run into issues or have any questions feel free to ask!

    Thank you!

    Tim

    Leave a comment:


  • replied
    Possibly the shadowing offsets for a thin object.

    Leave a comment:


  • replied
    I just a thought, regarding the dynamic lighting - if you check your light source, there should be a 'self shadowing accuracy' option on it. Try cranking it up, and try out the thin mesh again. Seems odd to have to change the form of your objects just to get the lighting to work.

    Leave a comment:


  • replied
    I did it 3x thicker in UE4 and that removed the problem.

    Click image for larger version

Name:	DoorsThicker.jpg
Views:	1
Size:	202.6 KB
ID:	1052179

    Thanks Obihb and everyone that came with suggestions.

    Leave a comment:


  • replied
    I wold guess your doors there are added as movable objects?.

    With movers your light map UV's are of no real use since a mover is lit and shadowed dynamically by default. The "lit from the back problem" I think is caused because I think your mesh is too thin. There are accuracy issues when it comes to self shadowing and that door model is really thin. I suggest you make it like 2x to 4x thicker. But I guess do it incrementally until it works. The idea is to get those cut in details further apart.

    Leave a comment:


  • replied
    I have tried with 128, 256, 512, 1024 and 2048 resolution and I still get the same result.

    Leave a comment:


  • replied
    128 is maybe a little low resolution for your lightmap, try something higher.

    Leave a comment:


  • replied
    In the test scene I have posted I only have one light and use WorldGridMaterial, I have tried other materials but I get the same effect.

    Leave a comment:


  • replied
    Do you have any reflections or other lights reflecting? What material are you using? I had a similar problem at one point but I think I fixed it, that was at the point I was just trying stuff out.

    Leave a comment:


  • replied
    I have hade sure that the UVs are not overlapping and that the spacing between them are 3 pixels, but I still get the effect.

    Click image for larger version

Name:	Spacedoor01.jpg
Views:	1
Size:	224.7 KB
ID:	1052151

    What is my brain missing?

    Leave a comment:


  • replied
    As far as I can see your lightmaps are overlapping -> create a 2nd uv channel with proper lightmaps

    Click image for larger version

Name:	lightmap.jpg
Views:	1
Size:	265.6 KB
ID:	1052079

    green -> your mesh with overlapping lightmap
    red -> your mesh with correct lightmap


    2nd uv + lightmap = https://www.youtube.com/watch?v=z5yc-bKbHyc

    Leave a comment:


  • replied
    Here is the FBX file for the mesh.
    https://www.dropbox.com/sh/ahzmjc33i...n2dretH2LOHkla

    Originally posted by fighter5347 View Post
    Probably a low lightmap resolution is causing it -> choose a higher value (e.g 128)
    I have played with the resolution, gone so far as high as 512.

    Leave a comment:


  • replied
    Probably a low lightmap resolution is causing it -> choose a higher value (e.g 128)

    But as Crow87 said, it would help us when you could upload your mesh so that we can take a look at it

    Leave a comment:

Working...
X