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"

Tilemaps render correctly in PIE but are black in Ship/Standalone

When using normal maps, for real time lighting, on a paper2D tilemap, the lighting appears completely accurate when running the game in PIE. However, when the game is ran by launching(ship) or by the "standalone game" dropdown, the tilemap will render completely black. The other items in the scene will still render correctly. I'm not sure what would cause a difference between ship and pie lighting only on tilemaps. I've tried for a few weeks on and off now to solve this issue on my end with no luck.

Image showing correct and incorrect lighting

Product Version: UE 4.10
bug_lighting01.png (702.1 kB)
more ▼

asked Jan 25 '16 at 04:20 AM in Bug Reports

avatar image

1 2 4

avatar image AndrewHurley Jan 25 '16 at 10:10 PM

Hello Squibbons,

Can you reproduce this in a new blank paper 2D project using some simple set up?

I appreciate the screenshots as those helped me visualize the issue, but it might prove to be troublesome to reproduce on my end. Some quick steps will help increase the efficiency of the troubleshooting process.

Thank you,

Andrew Hurley

avatar image Squibbons Jan 25 '16 at 11:16 PM

Sure thing. I just did this and recreated these 10 steps to reproduce the bug from a brand new paper2d project using the starter content assets.

Step 1: Create a new 2D side scroller project. I included the starter content for this project.

Step 2: Open the 2DSideScrollerCharacter blueprint and set the SideViewCameraComponent to Perspective View(needed for real time lighting)

Step 3: While still in the character, set the sprite material to MaskedLitSpriteMaterial( this automatically comes with a flat normal map).

Step 4: Create a new tileset, I used the 2DBackgroundBlockAtlas texture located in the 2DSideScroller content. Left all settings to default.

Step 5: Create a new tilemap, edit it and place some tiles in from our tileset created in the previous step.

Step 6: Place the new tilemap in the scene. I placed it at the same location as the player for quick testing.

Step 7: Set the material on the placed tilemap to MaskedLitSpriteMaterial.

Step 8: Add a light to the sceen. I used a directional light and pointed it towards the scene((Pitch=-45.000000,Yaw=-90.000000,Roll=0.000042)). I also gave it an extreme color so that I can clearly see the sprite and tilemap recieving light.

Step 9: Run the game in PIE and notice the lighting shows up on both the character and the tilemap. I used New Editor Window and Selected Viewport to confirm lighting works and it did for both the character and the tilemap.

Step10: Run the game using the Standalone Game option or the Launch button. I used both and confirmed that lighting works on the character, but not on the tilemap in these modes.

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

1 answer: sort voted first

Hey Squibbons,

Thank you very much for the detailed reproduction steps. I was able to get the issue to occur in three separate versions of the engine. I went ahead and entered a bug report (UE-25994) for the issue. Once the bug has been fixed it will be integrated in an upcoming full engine release or hotfix, and then added to the list of fixed bugs.

Again, thank you for taking the time to report this issue and let me know if you have further questions.


Andrew Hurley

more ▼

answered Jan 26 '16 at 04:34 PM

avatar image TheVikingProf Mar 23 '16 at 02:47 PM

Any Updates to this issue?

I have been working on a project for about 2 months now, and just realised I am having this lighting issue when running the game in standalone


avatar image AndrewHurley Mar 23 '16 at 03:41 PM

This has been marked to be fixed and integrated for a major upcoming release. It probably will not make it into the 4.11 release as it has been marked for the next iterative version following 4.11.

avatar image Slurpystreams May 06 '16 at 05:30 AM

I found a work around. At the end of the loading your level and actor, retrieve your TileMap object and set visibility to unchecked and then set visibility again to checked. Important, make sure you character is spawned, has default controller and possessed. alt text

avatar image Michael Noland STAFF Jul 12 '16 at 05:38 PM

I've checked in a fix for 4.13 (CL# 3046429 in Dev-Framework, will make it to UE4 main in a week or so). The issue is that the tile map components could read the default tangent basis before it was initialized (only ones created before any sprite or tile map has been rendered once), which is why 4dzirt's workaround fixes things, as it will cause the render state to get recreated and regenerate the vertex buffer.

When testing this I also found an issue with lit grouped sprites, and fixed that as well, CL# 3046428.

Cheers, Michael Noland

(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