Where does the engine get the z order from for several elements in a single static mesh?
There is problem with translucent materials as you can see in the screenshots. It appears the z order for the elements is random. The yellow bright element appears correct under the red part while the circle appears under everything even though it is clearly placed above it.
I tried setting it up differently in 3Ds Max with various variations but it always appears the same in Unreal Engine, I’m exporting/importing FBX. In 3Ds Max it always looks right with a translucent material.
If you open up your asset’s details pane and go to the rendering section, have you altered the translucency sort order? try adjusting the priority.
There is no translucency sort order. To clarify it is not a PaperSpriteActor, it is just a single static mesh with single translucent material and those screenshots are taken in the asset viewport.
Here is the mesh: https://dl.dropboxusercontent.com/u/2650899/StatPoints-EE. You only need to apply a translucent material to recreate the issue. There is also a texture that you can apply as the base color to see the elements better.
I attempted this on my end, unfortunately everything seems as I would expect it. Do you have multiple textures being applied to the mesh and one of them is translucent? Applying a single translucent material does not seem to reproduce the look you are seeing on my end.
We have not heard from you in several days, I am marking this as answered for tracking purposes. If you are still experiencing this error, please comment with the requested information.
I recreated it now in a blank 4.91 project and I get the same issue, this should show everything you need to know:
In my game I now made it all with separate components for the time being. I still like to optimize it once this can work. Because there can be lots of those actors at once and I like to keep at least their components counts small.
asked me to look into this issue for you. What you are seeing is a result of two different calculations done in the rendering process.
The first has to do with how the engine actually sees a static mesh. If you combine multiple meshes , as your example does above with the ring and 2 planes, the engine does recalculate and triangulate them as if they are one singular mesh. So to the engine, vertices of the three planes exist in the spaces defined by the imported asset, but the mesh is a singular entity and each plane cannot be calculated separately.
The second is how the engine deals with Translucency Sorting for all translucent objects. In UE4 Translucency sorting is handled by a look at the object bounds and calculating that against the other objects bounds. This method is extremely performance friendly but has the limitation of some sorting issues when bounds of objects are extremely close together which is why in the past we have opened up new features like Translucent Sorting and the newer sorting protocols for Paper 2D Sprite assets.
Let me address why 3DMax sees the assets differently. Even if you had combined those assets which I am sure you have into a singular Editable Mesh or Poly, 3DSMax is not concerned with Real Time Rendering and performance in that vein and never combines a mesh or its vertices in the way a game engine will.
So what does all this mean, well if you are looking for an immediate fix this solution, the answer is to not combine your meshes and if you need them to be extremely close together as in your example, use the Translucency Sorting Options available in the editor. However if the problem itself bothers you and an immediate solution is not needed, I am happy to enter a feature request for a new Translucency sorting method for you.
Ok, thanks for the detailed explanation. I hoped there would be a easy solution for this. But I probably have to design it differently anyway since translucency always takes a good chunk of performance in any case.
You might want to look into using a Masked Blend mode and the DitherTemporalAA node, assuming you have not turned TXAA off, it works fairly well at simulating transparency on masked materials with very little screen door effect. I like to use it on objects a lot especially when they are unlit.
Alright, i will try that then.