I have some transparent materials in my UE 4.25.3 and when they are under a certain camera angle from certain distance (you see, when the same angle is applied BUT the distance is shorter I do not have this problem) they bleed into one another, that is UE4 does not know which one to render in front of the other - why is that?
My logic is telling me that such an advanced software as UE4 would get without any problem which one of those two transparent materials is closer to camera and that one should be drawn in front of the other, right? So why it is not like that, what’s wrong with the UE4 rendering logic?
I saw on some other posts here that we can try to use Translucent Priority value for this, but it does not work here for me as my trans materials are part of the same object (LEGO building) and also my camera is moving so they change their position towards camera depending on where the camera actually is and what is its view angle so it would be of no help anyway.
Can anyone tell me if it can be done (fixed) and why in the world in year 2020 we have to deal with such absurdities (like “my software does not know which of two objects is closer to camera so it renders them together across one another”)?
You could try using a masked material instead of a translucent one. Plug your opacity graph into a DitherTemporalAA node and that node into the Opacity Mask input. This will render the material directly into the deferred render pass, instead of the separate pass that’s needed for translucency.
As to why such an advanced software as UE4 has issues handling this: It’s a trade-off between the ability to have many lights and objects in a scene, or having just a few, using the same amount of computational resources.
That said… You could theoretically also try enabling forward rendering. (or “Forward Shading” as the checkbox is called in the settings)
In fact, I do use two-sided Thin Translucent with Forward Shading, yet it still do that ugly thing.
Now, with that being said, could you, please, show me some functional masked material example with opacity graph into a DitherTemporalAA node and that node into the Opacity Mask input? As I have no clue whatsoever how to do that…
This is how my material looks, and underneath I attached ZIP with the actual .uasset for you, so you can post your masked material mod if you will, hm?
when I did what you said it looks extremely bad, with dots all over the surface and overall it does not look as the original thing, see:
I was referring to the forward shading option in the project settings, not the details tab. Do note however, that I have not tested for issues with that setting. The idea here is to render all objects in the same render pass.
Not sure why you have those dots. Here is what I use:
EDIT: I mean, dots are normal, just not that big.
could you actually provide (ZIP file as I did) that .uasset of yours shown above? cos really, if I do what I just see in the graph, my material looks terribly different, so could you, please?
I did tested Forward Shading option in Project settings - it is actually terrible, complaining about too many movable lights in the scene, when there are just 3 + it did not solve the problem, LOL
Unfortunately, if those dots are normal then it is of no use to me, I am using UE4 for pure cinematics purposes (I do short LEGO “films” with it), so I need trans glasses to look normally without artifacts like those dots…so there is no solution to my problem, ah!
The only things I did: Changed material to Masked & Default Lit and added the dither node as shown. I used your .uasset as well, so if you do the same thing and it looks terribly different… then I’m afraid there is a larger issue at play here and won’t be fixed by using a different file.
Do note that when I said dots are normal, I meant the dots from the screenshots I uploaded, which will be less visible the higher the resolution.
well, I did exactly that as you then, yet my output is terrible - a lots of dots, or even better I would say some sort of pattern (I found out it is comming from the dither node) + those dots/pattern got a bit better if I use some value for Random parameter of the dither tho.