Instanced Static Mesh Bug

We are experiencing the same problems here at Yager: negatively scaled meshes will have their normals flipped upon conversion/creation. Is there a workaround for this currently?
We are trying to implement a workflow for mesh instancing which will most likely be based on 's Instanced Static Mesh Editor Feature or something similar. However, we do have a few negatively scaled assets in our levels that won’t convert properly because of reasons mentioned above.

Check the bottom answer in this thread.

I haven’t confirmed it no, but check my setup below, it should recreate the problem if it still exists

Ah, thank you. For some reason, the order of the post showed up wrong for me, so I didn’t pay much attention to this answer. Did you have a chance to test this and confirm it is working with 4.7.3 already?

The issue still persists in 4.7.3. In fact, there seems to be an overall issue with non-uniformly scaled instanced meshes.

I posted the detailed questions and repro steps on [this AnswerHub page][1].

I have also posted my analysis and failed attempts to solve the issue in-material on [this forum thread][2].

Unwanted seams visible in Instanced Static Meshes - Rendering - Epic Developer Community Forums
[2]: Strange seams visible in Instanced Static Meshes - Rendering - Epic Developer Community Forums

Hi ApoorvaJ,

Unfortunately these do not seem to be related. The error that was seen on this thread was that, when entering negative values into a procedurally generated mesh, the meshes would invert their normals and appear inside out as opposed to simply changing direction, which has been fixed as of 4.7.3.

Hi ! We just tested this in 4.7.4 and it does NOT seem to be fixed. Attached a picture of the viewport (left original (with negative scaling on one axis), right instanced with flipped normals issue) and of the BP setup I used to convert a mesh to an instanced mesh.

(The exposed variable meshToInstance is of type StaticMeshActor and is used to pick a mesh actor from within the level.)

37782-chair_instanced.png

I looked at the issue and I think at the moment we don’t support this with InstancedStaticMesh rendering.
I want to explain whats happening:

Instanced mesh rendering can be faster because it requires a single draw call when rendering an n times (normally that requires n draw calls). It saves mostly CPU (if you are not bound by that you don’t see a benefit). It only helps if you have at least a few (depends on GPU/driver, a number of 8 might be reasonable but that might have changed) as there is some overhead. When combing draw calls to one you are limited to make changes per . The transformation matrix can be changed, some UV and other things. The cull mode cannot be changed.
To fix the issue and be somehow efficient we would need to render all non mirrored and all mirrored ones with separate instanced draw calls. I don’t see that in code but that can be added. I created a bug for that: UE-13425.
Not sure when we get to this. Meanwhile I suggest to do content changes to workaround (e.g. avoid mirror, duplicate mirrored mesh, don’t use instancing).

Would love for this to be fixed sometime soon. I’m going to have to workaround this by not inverting scale on any of my instanced meshes. What a lame situation to be in.

Would love for this to be fixed sometime soon. I’m going to have to workaround this by not inverting scale on any of my instanced meshes. What a lame situation to be in.

Hi ,

  • Which engine version are you currently using?
  • Does this occur in a clean, blank project with no additional content or is it limited to one project?
  • Are you following the steps listed above to reproduce this error, if not do you have steps I can follow to reproduce this error on my end?

Hi, I just reproduced the same issue in the current version (4.16.2) and could easily forward a test project if needed.
I created a building with some flipped modular parts for less static mesh. Everything was then put in a blueprint which convert every static mesh component into a instance static mesh. Every flipped parts (with a negative x scale) will then have flipped normals.

This is quite annoying because it breaks all the convenience of instancing; or at least a part because we have to double the amount of assets.