Support Mirrored (Negative Scaled) Level Instances

This question was created in reference to

[Content removed]

[Content removed]

https://issues.unrealengine.com/issue/UE\-190534

​

We want to support mirrored level via negative scaled level instance, and found the same issue like those posts.

We fixed the issue in LevelUtils.cpp like the image below, by using operator* of FTransform to get the proper mirrored transform, and it works.

[Image Removed]

​

But we want to know the potential issues of such changes and the reason of the default implementation.

​

We also noticed the ApplyLevelTransformToCompRelative in UE5.8, is it targeted for the mirror issue? But it seems nowhere calls it and the mirror issue persists.

[Attachment Removed]

Hello,

We addressed multiple problems related to the composition of transforms in the context of Level Instances for version 5.8. You should consider the following fixes:

Regards,

Martin

[Attachment Removed]

Hi,

There is no ETA for this bug. I investigated the source of the problem and it would be related to the composition of the transforms in the context of a Blueprint and Instances components. The problem is not present when using regular LevelInstances, ie not blueprints.

The goal of the PLAs was to optimize the rendering through instancing (batching) of the meshes. The runtime cell transformers are offering the same type of optimization but that at cell level. This make PLAs less interesting since they can end up being transformed. Using regular LevelInstances should be more robust to negative or non-uniform scaling while the runtime cell transformers will provide the batching benefits.

The RCTs were still “young” in version 5.6 and got much better in the subsequent releases. If you plan on staying on 5.6, I recommend that you only use UWorldPartitionRuntimeCellTransformerISM but have a look at the current state in 5.8 and integrate most changes done since 5.6. There is also FastGeo that can provide extra benefits but the 5.6 version has a few blocking problems and integrating the latest version in 5.6 is going to be challending. Things got much better in version 5.8. My recommendation would be to upgrade to version 5.8 so you can benefits from all the improvements done on the World partition system and RCTs since 5.6.

Regards,

Martin

[Attachment Removed]

Thanks for sharing this repro. I logged the following bug report: https://issues.unrealengine.com/issue/UE\-395823

It might take 1-2 days for the link to be live.

[Attachment Removed]

Hi Martin, thanks for the reply!

But it seems none of these commits fixed the issue of Incorrect Rotation on Mirrored (Negative Scale) Level Instances, as the UE-190534 has target fix on UE6.

However we can’t wait for it and tried to support the negative scaled level instance like the attached image which used the operator* of FTransform to get the proper mirrored transform, and we want to know the potential issues of such changes or how Epic teams plan to fix it?

[Attachment Removed]

We actually tried to use the regular level instance for negative scaling, it seems to be fine after negative scaling, but once you ctrl+E inplace edit the mirrored one, you will notice the incorrect rotation just like the PLA.

The L_DefaultEditorOverview level instance of Lyra (UE5.8) negative scaled on Z axis:

[Image Removed]Ctrl+E edit it, or re-enter the map, or in the packged game, you will notice the slope with incorrect rotation

[Image Removed]

[Attachment Removed]