x

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"

Lighting glitch on Instanced Static Meshes

When using instanced static meshes that use meshes imported from Blender and materials set in the Unreal Editor, there is a bad lighting glitch on one side of the instanced mesh. When the "Use MikkTSpace Tangent Space" box is unchecked in the static mesh editor, everything is back to normal. This glitch did not happen with individual static mesh actors.

The first image is with "Use MikkTSpace Tangent Space" checked. The second image is with "Use MikkTSpace Tangent Space" unchecked.

alt text alt text

Product Version: UE 4.8
Tags:
capture1.png (499.2 kB)
capture2.png (428.2 kB)
more ▼

asked Aug 30 '15 at 10:15 PM in Bug Reports

avatar image

Bill Mess
3 5 5 7

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

1 answer: sort voted first

Hi Bill,

More than likely this depends on how the mesh has been UV'd because the MikkTSpace option will alert you to these shading errors that can occur. Turning off MikkTSpace uses the older method that can produce shading issues due to improper tangents.

Also, there were some improvements with instanced static mesh lighting that went into 4.9 which you can try since this released today.

I did try to reproduce this on my end, but I suspect that I'm not setting something up as you have. If you're still having the issue would you mind linking a simple project here that reproduces and I'll have a look.

Thank you!

Tim

more ▼

answered Aug 31 '15 at 04:14 PM

avatar image

Tim Hobson ♦♦ STAFF
48.9k 887 101 877

avatar image Bill Mess Sep 01 '15 at 04:18 PM

I upgraded to 4.9, but the error is still there. It still works when I uncheck "use MikkTSpace" however.

I created a simple project that produces the result: https://drive.google.com/file/d/0B_cJLQy8HuSXblBOUXVHRVZJMEU/view?usp=sharing

Also, here is some more information about the workflow I used that might be helpful:

  • When I'm exporting from Blender I export as an fbx file, check "selected objects," uncheck "add leaf bones" and "baked animation," and select face smoothing.

  • When I'm importing into UE4 I uncheck "Auto Generate Collision" since my game doesn't use any collision, and I uncheck "import materials" and "import textures" because I apply materials I create in UE4.

  • In the project settings, static lighting is disabled since the game I'm creating is completely procedurally generated so there isn't anything that can have baked lighting.

  • The instanced static meshes in this example project are spawned in a c++ class called "TestInstancedStaticMeshActor."

I also noticed that in 4.9 there is a new option in the import settings that lets you select if you want to use the MikkTSpace or the old space.

And by the way, is there an advantage to use the MikkTSpace? Does it perform better than the old method? I wonder if I should be concerned about this if using the old space is just as good. I plan on possibly making the game run on mobile devices, so I want the best performance I can get.

avatar image Tim Hobson ♦♦ STAFF Sep 01 '15 at 08:25 PM

Looking at simply the mesh, the shading problem is coming from that. The UV is not setup so that each face is flattened out properly.

This is what will throw the flag for MikkTSpace and Degenerate Tangents. If you look at this post there is a couple of images to demonstrate why this is.

UE4 moved over to using MikkTSpace normals by default. This is to provide more accurate lighting and normal information. In the image in the link where the UVs are stretched you can see that the Normals are all skewed which can create lighting issues to crop up.

The option is there so that you have a choice, so long as you're aware of the choice, otherwise it's the default to MikkTSpace.

If you're seeing results that work for you without MikkTSpace then it's OK to use this. If you see shading or lighting issues you would want to UV these so that all the faces are setup properly.

I've corrected the UV on your mesh in 3Ds Max and reimporting and the degenerate tangents issue is resolved.

I hope this helps, and if I've been a little unclear let me know.

Tim

avatar image Bill Mess Sep 02 '15 at 10:09 PM

Oh okay, I get it now. I'm new to 3D modeling, and I didn't realize that I needed to create a UV map even when there aren't any textures being used. I got it working with the MikkTSpace now. Thanks for your help!

(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