Transparency Is A Huge Issue Currently for building a 2D, 2.5D mix with 3D game.

Transparency Is A Huge Issue Currently for building a 2D, 2.5D mix with 3D game.

I have tried to document what is going on over at answerhub here:

https://answers.unrealengine.com/questions/143785/2d-25d-with-mix-of-3d-rendering-transparency-issue.html

I really want to build something to the quality level of Rayman Legend or Ori and the Blind Forest, but currently the way transparency is handled in UE4 I think that just might be outright impossible.

I know that there are strides being made with paper2D in UE4, but this is currently very limited, especially with the set up that I am trying where you essentially make a 2.5D puppet and animate it to get your final look.

It would be great to hear a firm commitment on Epics part to ensure that we could build these types of games in UE4 along with the beautiful 3D art that is currently possible.

Thanks, :slight_smile:

This issue has been around for a while and several users have reported it,
this was the last answer I saw:

. A few weeks ago there was an update on the Trello board for Paper2d things to come with 4.7. I haven’t seen any major activity, but I’m hoping for the best, as 4.6 brought nothing, and 4.5 was limited. By the way, amazing artwork.

I am reopening discussion of this because of the changes that were made in 4.7.

It appears as if the new transparency sort order only works on an object vs. object level. If you have a mesh (like mine above) that has full transparency (within the object it’s self), this new sort order will not take into account that the various shapes in a mesh that have transparency applied to them that need to be sorted.

Is that correct? (From all of my test so far this appears to be so.)

I have tried all the various sort order methods that are mentioned in the what’s new section. (Project Settings>Rendering>Translucency)

Is anyone else trying to accomplish what I am doing with a 2.5d 3d character that is made out of a sprite card?

Is anyone from Epic able to say when we will have full transparency sorting within an object it’s self and not just an object vs object comparison? Thanks in advance!

Again, I have a more detailed question about this topic on the answerhub,

https://answers.unrealengine.com/questions/143785/2d-25d-with-mix-of-3d-rendering-transparency-issue.html

I hate to double post on this but I would really like to get some sort of answer on time frame on this from the Epic team.

With full transparency sorting I fell like I will not be restricted in any way on how the art looks on the final frame.

Yes, this is correct. UE4 sorts at a component granularity, so if you have pieces that are sometimes behind and sometimes in front, they will need to be a separate component. This is something we can improve in the future by sorting by mesh batch instead of by FPrimitiveSceneInfo, but this is currently backlogged.

However even with that change, you will always have to break things up into multiple draw calls if their sorting order can change (e.g., your dinosaur would have to have three separate mesh sections in order to sort correctly). This isn’t a limitation of UE4 but of GPUs in general; within a single draw call, sorting is static and is based on the order of the triangles in the array. Sadly there is no perfect solution to sorting translucency unless/until someone comes up with a performant order-independent translucency algorithm (OIT is an active research area but every approach either has significant tradeoffs or costs a lot of GPU time/memory).

Cheers,

One thing to consider is to try using a masked material instead of a translucent one. If the edge artifacts from doing so are objectionable, you could create actual geometry just inset from the alpha line as the perimeter. This isn’t as great of a workflow, but masked materials have none of the sorting issues on the GPU that translucent ones have.

Cheers,

Michael,

Thanks for the reply. That is exactly what I am currently doing, using a masked material. This works fine but I think you can understand why as an artist you would want full transparency blending. I’m hoping that someone on the Epic team have looked at Rayman Legend engine or the Ori and the Blind Forest engine. This is the goal of the art that I would like to create.

I think that now with the sorting options I will be able to use full transparency with the art in the 2.5 D world so the last bit is the actual characters.

From my observations, the Rayman Engine allows an artist to being their art in as a texture with full alpha support and then they are able to create the chunks of the character in the engine, set up subdivisions in areas of deformation and also set the sort order for all the chunks. They are also able to create a skeleton, and IK and animate all in engine. If UE4 grew to that feature set that would be amazing. But in the mean time all of this work can be done in Maya and then imported in. The only thing that is needed is a way to tell each chunk in the mesh what order it needs to draw in. (I’m sure this is no trivial tasks.)

So is this just not possible? Even If you had A material separation for each Chunk in the model? Does a new material = a new draw call? And if it does could you make a parent material and just instance the rest?

Thanks again for looking into this! :slight_smile:

A new material would indeed be another draw call, though if memory serves me correctly, Material Instances of that material share the same draw call, so they’re super-cheap as opposed to having new materials for each piece.

Epic’s Martin Mittring (and no doubt a few others), is/are working on a forward-based rendering solution for Translucency. There’s no ETA yet and I suspect he’s also got many other fish to fry, but improved translucency is on Epics radar :slight_smile: IIRC, With a deferred renderer sorting issues become much more complex and fruitful.

RE: Rayman/etc… workflow for skeletal animated sprites. I would love to head in that direction as well. It’s currently backlogged but I’m going to re-evaluate the backlog when we start planning for 4.9 and see what we can manage, as I’d also love to get 2D animation using animation blueprints, providing a lot of extra nice machinery.

RE: Multiple sections: I’m not 100% sure how you do it in Maya, but however you create different sections to have different materials applied on it will come into UE4 as multiple sections. You can then assign the same material to each slot, but the engine will treat them as separate draw calls. However, it will currently submit all of the sections in the same order each frame (the whole object is sorted at once).

One other thing you might try for now is to duplicate any pieces that have to change sort order (e.g., duplicate the geometry for the leg and attach it to both FrontLeftLeg_InFront and FrontLeftLeg_Behind bones), and animate visibility (or just scale to 0) for them. You could probably animate just a parent bone FrontLeftLeg for your animations in general, and give the two child bones a small Y offset nudge but no animation other than visibility.

You’d assign the different bits of geometry to three (or more) sections in Maya, so the front leg geometry would be section 0, body in section 1, etc…

Cheers,

Micheal, sorry it has taken so long to get back to you on this. Unfortunately assigning material slots in Maya didn’t control the drawing order within a contained object that has transparency. I even named the materials like M_Dino_00, M_Dino_01 M_Dino_02 and it still didn’t seem to have any effect on how things would draw for the object. I know the release of 4.8 is right around the corner so I am really curious if this is something that is still on your radar. Thanks again for the help and it was great meeting you at GDC.