Announcement

Collapse
No announcement yet.

UE4 still does not have any proper way to do tinted glass

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    *reading* Yeah, they even described it there, first comes a mesh that acts as reflective layer, followed by a second mesh/layer for the tinted glass part, then mirror those two layers for the other side of the windshield. So you have two layers facing forward (reflective and tint layer), and two layers facing in the opposite direction = 4 layers/meshes. Way to much trouble and possibilities to mess up
    The problem is that those material setups don't work with default raytracing translucency. When raytracing translucency is enabled, backfaces appear. Modulated blend modes and tints disappear with raytraced translucency enabled.They work just fine in rasterization workflows, but I'm confused as to how they were able to achieve a modulated tinted glass while still having raytraced reflections.

    Leave a comment:


  • replied
    Originally posted by jamecz View Post

    If you look at page 158 of this paper, they do it perfectly. How they did it though, is a mystery. The methods in the paper don't seem to line up when I try it. Anybody have any pointers on how they got tint with raytraced translucency?
    https://on-demand.gputechconf.com/gt...pdf/CH8807.pdf
    This paper was released before that Thin Translucency Shader was released, they used a different method there. I think they stacked several meshes/layers together, which should not be necessary with a real glass shader.

    *reading* Yeah, they even described it there, first comes a mesh that acts as reflective layer, followed by a second mesh/layer for the tinted glass part, then mirror those two layers for the other side of the windshield. So you have two layers facing forward (reflective and tint layer), and two layers facing in the opposite direction = 4 layers/meshes. Way to much trouble and possibilities to mess up

    Click image for larger version  Name:	Layered tinted glass.jpg Views:	0 Size:	234.0 KB ID:	1789076

    On page 159 you see the chosen materials for the layers/meshes.

    Leave a comment:


  • replied
    (someone prove me wrong, pleaaaaaaase)
    If you look at page 158 of this paper, they do it perfectly. How they did it though, is a mystery. The methods in the paper don't seem to line up when I try it. Anybody have any pointers on how they got tint with raytraced translucency?
    https://on-demand.gputechconf.com/gt...pdf/CH8807.pdf

    Leave a comment:


  • replied
    Originally posted by Rawalanche View Post

    This thread was started way before thin translucency model was introduced. In fact, I like to think it was introduced partially because of this thread
    I hope so would be a fix for a long lasting problem, or to a missing feature. I just also hope, that it also works with raytracing and raytraced reflections, not just with raster :/ But i have a bad feeling in that regard (someone prove me wrong, pleaaaaaaase).

    Leave a comment:


  • replied
    Originally posted by Suthriel View Post
    For non-raytracing, they introduced Thin-Translucency, as described here:
    This thread was started way before thin translucency model was introduced. In fact, I like to think it was introduced partially because of this thread

    Leave a comment:


  • replied
    For non-raytracing, they introduced Thin-Translucency, as described here:

    https://docs.unrealengine.com/en-US/...ncy/index.html

    But that seem to not work with raytraced reflections. Or at least i was unable to get the described setup to work with raytraced reflections, but that could also just be a bug or a wrong setup on my end. Would be interested to see, if others get it to work with raytracing.



    Leave a comment:


  • replied
    Did you ever find a solution to tinted raytraced glass? I've been trying to solve this as well. One solution I've found is to use a mesh decal, but it doesnt get that saturated, tinted look. Its still super cloudy. It seems they got it to work in the nvidia porsche demo, but from the way it's explained in their presentation, it's still impossible with out of the box raytracing. They talk about it on page 158. The problem is that the tinted materials dont work with translucency, but theirs somehow do? https://on-demand.gputechconf.com/gt...pdf/CH8807.pdf

    I've made a thread on this as well if you want to hop in.

    Leave a comment:


  • replied
    Originally posted by amoser View Post

    Really? I don't see it on the "done for 4.24 list" but maybe you're referring to something else I'm missing. Would be really neat if true, especially if SSR takes it into account as well.
    Ha! I knew I was not imagining it. Anisotropy indeed was there originally for 4.24 but then promptly removed. It seems to be back in 4.25!
    https://trello.com/c/Qis6UrfU/534-an...ray-trace-beta

    Leave a comment:


  • replied
    It's just a screenshot, there can be 100 reasons for it. It's a default scene so all that the metal object has could be reflection capture captured before sphere were placed + SSR. I am 90% sure they'd show up in raytraced reflections.

    Leave a comment:


  • replied
    Originally posted by Suthriel View Post
    There is something pink in the left cornerl
    Looks like the highlight seen through one of the sphere. They aren't perfectly aligned.

    I just hope .25 isn't as bad of a mess as .24 has been.

    Leave a comment:


  • replied
    Originally posted by Rawalanche View Post
    Yes, yes yes yes yes yes yes!
    https://trello.com/c/ADd56r3f/525-tr...y-improvements
    Yes! Yes!

    Yes yes yes yes!

    Yes!
    YES!
    Looks good, but i still miss their reflections in the metal object (there is something pink in the left corner, but i am not sure, if it is one of the glass spheres, or one of its shadows on the ground), and in each other. So reflections for translucent/transparent objects seems still not active by default and have to be done by a customized engine, like:

    https://forums.unrealengine.com/deve...in-ray-tracing

    Leave a comment:


  • replied
    Yes, yes yes yes yes yes yes!
    https://trello.com/c/ADd56r3f/525-tr...y-improvements
    Yes! Yes!

    Yes yes yes yes!

    Yes!
    YES!

    Leave a comment:


  • replied
    an update:

    all my test results for creating a Glass Material using the Translucency Type Ray Tracing can be found here:
    https://forums.unrealengine.com/deve...sue-how-to-fix

    Leave a comment:


  • replied
    This is a very interesting topic. I am trying to work this out - step by step and I hope to get all your help. So here we go, please see the video below.



    video: https://youtu.be/azGdQYGiq5g

    Download UE4 Project File:
    https://mega.nz/#!3g9QkAyI!z6VhQH_3x...KHMcQEHEPIaQEo


    Thank you so much for any of your help, hints, tips & suggestions.

    Happy pixeling,
    Bernhard

    Leave a comment:


  • replied
    Originally posted by Manoel.Neto View Post
    From what I understand, you want tinted glass to be rendered in a single pass, without resorting to using sceneTexture. To do tinted glass, you need to modulate the pixels behind the glass by a RGB value and add the reflected light/environment from the glass surface. There is no GPU blending mode that can do color modulation and color addition at the same time, therefore your request is impossible at the hardware level(*): you need to do it in two blend passes (first modulate, then additive).

    (*) There are ways to do it on certain hardware: raytracing (RTX only) and tile-based mobile GPUs actually allow in-shader blending. There's also an optional feature on some shader model 5.1 GPUs that allows in-shader blending, at a cost.
    So? I don't really care/mind about how many blend passes it takes. I mean for example Unreal already does one draw call per every material slot on a mesh. That's like saying it's impossible to have meshes with multiple materials on GPU because you can't do multiple materials in a single draw call. It may not need to be so efficient that it happens on the GPU shader level under the hood, that's not the priority here. Priority is just acceptable workflow from user experience standpoint.

    Leave a comment:

Working...
X