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

    #16
    Originally posted by Rawalanche View Post
    The rudimentary script which would be created to create tint material geometry for static meshes would hardly work for simulated fluid caches. Anyone with any DCC familiarity would know that. So it would require some elaborate monstrosity which would cover also a case of animated mesh with dynamic topology. Those are usually heavy so it's also hardly something you want to be playing back and keeping in memory twice.
    No. I've done it on multiple occasions and it works fine. Let me know if my posting a video would change your mind.

    Originally posted by Rawalanche View Post
    I think the main disagreement we have is that you underestimate the importance of having a complete basic PBR shading model. Sure there are many more issues that need to be tackled, but it's really hard to even build on a broken base. In production environments, it's just very difficult to employ any kind of shading model which does not cover even as common use case as a tinted translucency/refraction.

    I've been working as offline 3D generalist for about 11 years now, so I'd say I have a good basis for comparison, and quiet a few of my colleagues have tinkered with realtime workflows too, but the consensus is pretty much the same - the main issue being simple stuff requiring ridiculous, time expensive workarounds to achieve. I've eventually managed to bite the bullet, and transitioned career into something you could call UE4 technical artist, but most of my colleagues just were not wanting to put up with that. Even I, myself am still spending way more time in UE to ultimately achieve inferior quality, but hey, it pays better
    See, this is what I mean about not communicating. You still seem to be responding to a claim that I have noted from the beginning that I am not actually making. You will find no disagreement from me that there are many caveats associated with using Unreal as a substitute for an offline renderer. Yes, doing this absolutely requires weird workarounds, hacky solutions, and approximations. If I thought otherwise, I promise I would have said so earlier.

    In fact, I have been and am saying something very near to the opposite of that: that there are so many obstacles to using Unreal as a complete replacement for an unbiased path tracer, many of which cannot be surmounted even with workarounds, that the fact that there is a usable solution at all to the particular problem of tinted glass means it's probably not at the top of the list of things that need to be addressed.

    Even more specifically, I was merely pointing out that several of the particular claims you made regarding the approach linked to by MostHost LA were factually inaccurate.

    Comment


      #17
      Originally posted by amoser View Post

      No. I've done it on multiple occasions and it works fine. Let me know if my posting a video would change your mind.


      See, this is what I mean about not communicating. You still seem to be responding to a claim that I have noted from the beginning that I am not actually making. You will find no disagreement from me that there are many caveats associated with using Unreal as a substitute for an offline renderer. Yes, doing this absolutely requires weird workarounds, hacky solutions, and approximations. If I thought otherwise, I promise I would have said so earlier.

      In fact, I have been and am saying something very near to the opposite of that: that there are so many obstacles to using Unreal as a complete replacement for an unbiased path tracer, many of which cannot be surmounted even with workarounds, that the fact that there is a usable solution at all to the particular problem of tinted glass means it's probably not at the top of the list of things that need to be addressed.

      Even more specifically, I was merely pointing out that several of the particular claims you made regarding the approach linked to by MostHost LA were factually inaccurate.
      I understand the claims you are making, but you still don't understand a crucial difference between complicated solutions which are justified, and those which are not. I never claimed I am going into UE4 with the expectation to replace a path tracer with it. I do understand difference between realtime rasterizers and offline path tracers. But there's GIANT difference between technical limitations of the technology and usability deficiencies.

      Many of the "weird workarounds, hacky solutions, and approximations" as you put it are necessary since many of the effects just can't be otherwise achieved with realtime rasterizers, but things like tinted glass is not one of them. A simple additional shading mode, or ability to use two existing shading modes together is completely realistic and there are quite a few other rasterizers out there that show it's easily possible.

      I am talking specifically about a class of usability issues which are not a consequence of underlying technical limitations and yet come at a significant cost in terms of artists' time.

      To put it bluntly, way too many times I've heard the something along the lines "It's complicated because this is a realtime renderer excuse". My point is that it does not always apply. There are many cases which are as simple as usability design flaws, rather than products of technical limitations. Or in other cases, perhaps products of technical limitations which have been resolved for sometimes up to a decade now.
      https://www.artstation.com/artist/rawalanche

      Comment


        #18
        Originally posted by Rawalanche View Post

        I understand the claims you are making, but you still don't understand a crucial difference between complicated solutions which are justified, and those which are not. I never claimed I am going into UE4 with the expectation to replace a path tracer with it. I do understand difference between realtime rasterizers and offline path tracers. But there's GIANT difference between technical limitations of the technology and usability deficiencies.

        Many of the "weird workarounds, hacky solutions, and approximations" as you put it are necessary since many of the effects just can't be otherwise achieved with realtime rasterizers, but things like tinted glass is not one of them. A simple additional shading mode, or ability to use two existing shading modes together is completely realistic and there are quite a few other rasterizers out there that show it's easily possible.

        I am talking specifically about a class of usability issues which are not a consequence of underlying technical limitations and yet come at a significant cost in terms of artists' time.

        To put it bluntly, way too many times I've heard the something along the lines "It's complicated because this is a realtime renderer excuse". My point is that it does not always apply. There are many cases which are as simple as usability design flaws, rather than products of technical limitations. Or in other cases, perhaps products of technical limitations which have been resolved for sometimes up to a decade now.
        There's certainly an interesting discussion to be had regarding the limitations of translucency in Unreal specifically, the limitations of translucency in deferred rendering overall, and the limitations of translucency in real time generally.

        And I have no doubt that you do hear from a lot of people who don't understand that the distinction between those things exists and matters. That said, I certainly don't think anything I've said here really pertains to that topic, to say nothing of it demonstrating a fundamental misunderstanding on my part.

        Again, I thought I pretty explicitly and consistently laid out the scope of what I was talking about. If anything I said in particular suggests otherwise, feel free to highlight it so that I can be more clear in the future.

        Otherwise, I do think it's clear to both of us that a) there are lots of interesting discussions to be had broadly regarding translucent effects, both from the angle of workflow and from a theoretical standpoint, and b) we are not having any of those discussions.

        Comment


          #19
          Originally posted by Rawalanche View Post

          The rudimentary script which would be created to create tint material geometry for static meshes would hardly work for simulated fluid caches. Anyone with any DCC familiarity would know that. So it would require some elaborate monstrosity which would cover also a case of animated mesh with dynamic topology. Those are usually heavy so it's also hardly something you want to be playing back and keeping in memory twice.
          You can set up transparency to render in different passes, and that's precisely how you handle water with things like waves.
          It's fairly complicated, It looks like **** most of the time, but it does work.
          The 2 render passes allow you to single out what is visible and what is invisible on your own priority.
          This is generally useful when you make waves. The reason being that 1 pass needs to show you what you actually see (normals pointed at camera) and hide what you dont see (the backside of the wave) or sort between the 2.
          Without the filtering you end up with holes in the water - those arent holes but back faces displaying in front of the front faces. All of which you would discover when working with an ocean/water body from scratch. It's also not an "this engine only" thing. It's how most rendering works. In the end The UE4 workaround is actually a GameGem implementation....
          All that to say, you dont necessarily need double the geometry to sort transparencies.

          But, in the case of tinted glass you really do.
          Its actually how the tinted glass works IRL if you think about it. It's one layer of coating over the glass.
          In the engine you just have to invert it to get it to display properly.
          Mostly because the reflection in front of it needs to shine and the layer in between is the shade of tint which you can manipulate/change on the fly.

          Particularly for cars - if they are built well - all the windows are already separated/individual meshes so that you can get them to break as needed.
          It takes a whole 10 seconds to select a window and edit it out to have 3 layers of the same window mesh at a distance of .1mm (Because my inside needs reflections too, yours might not).
          It also adds overall thickness to the mesh, and it can eventually end up allowing you to create the additional rounded edge seam so you can lower a window like IRL.

          Sure, those are all things you may never need IF you don't plan on having the user/player enter a car, but if you set stuff up as detailed by the epic documentation you get a leg up should you ever change the way it works.
          That's mostly why I don't believe this to be any sort of "hack" but a logical approach to how you can set different shades of tint with minimal work, on the fly.

          Additionally, keep in mind what I was saying about the reflectors also extends to front lights and such.
          The real life items in this case really do have several "coatings" or layers as well. The refractors/brake lights for instance have up to 3 layers of plastic with different coatings on them. The front/fog lights have at least 2 (front transparent plastic and interior chrome plating).

          Is it a lot of work? No doubt. Is it a workaround? Not so much. To get something to look good you would probably have to set things up very similarly in almost anything...
          Last edited by MostHost LA; 10-15-2019, 08:10 PM.

          Comment


            #20
            Originally posted by MostHost LA View Post

            Is it a lot of work? No doubt. Is it a workaround? Not so much. To get something to look good you would probably have to set things up very similarly in almost anything...
            This is where you are very wrong. Unreal's renderer is one of a very few rasterizers where rendering a tinted refraction/translucency has to be a workaround. This is another one of the common, fallacious arguments - that the tinted refraction is commonly a complicated thing to do.

            Originally posted by MostHost LA View Post
            Its actually how the tinted glass works IRL if you think about it. It's one layer of coating over the glass.
            In the engine you just have to invert it to get it to display properly.
            Mostly because the reflection in front of it needs to shine and the layer in between is the shade of tint which you can manipulate/change on the fly.
            Here you are also very wrong. Regular generic tinted glass, such as red glass is a SINGLE dielectric solid medium without any coat. What gives it a reflection is just polish of the surface, which makes the surface structure very fine.
            Click image for larger version

Name:	BlockOpticTumbler56a016955f9b58eba4aedd16.jpg
Views:	32
Size:	24.7 KB
ID:	1674291
            There is absolutely nothing on a material like this which involves multiple layers.

            What's sad is that most of people here have a perspective so deformed by a decades using a hacky way rasterizers do things that they are unable to think outside of the box, and see much simpler solutions. Especially since many of these hacky, overcomplicated ways are products of technical limitations which are long gone these days.

            What I want is something that IS technically possible, to be a one click solution instead of complex set of steps. So that I, as an artist, can spend my time focusing on more important stuff. This just comes down to me being able to trust Unreal's shading model to handle all the possible real world materials. Currently it can handle all of them except tinted glass, which means it's incomplete. All I am requesting is that it's a complete shading model.
            https://www.artstation.com/artist/rawalanche

            Comment


              #21
              Originally posted by Rawalanche View Post
              This is where you are very wrong. Unreal's renderer is one of a very few rasterizers where rendering a tinted refraction/translucency has to be a workaround. This is another one of the common, fallacious arguments - that the tinted refraction is commonly a complicated thing to do.

              Originally posted by Rawalanche View Post
              What's sad is that most of people here have a perspective so deformed by a decades using a hacky way rasterizers do things that they are unable to think outside of the box, and see much simpler solutions. Especially since many of these hacky, overcomplicated ways are products of technical limitations which are long gone these days.

              If you know, that it is simple, how about you offer a solution or propose an approach instead?

              Comment


                #22
                Originally posted by Deathrey View Post

                If you know, that it is simple, how about you offer a solution or propose an approach instead?
                I already did, few posts above. All I'd want would be modulate blend mode which is compatible with Surface TranslucencyVolume model.
                Click image for larger version

Name:	Translucency.jpg
Views:	21
Size:	208.9 KB
ID:	1674431
                Even if it comes with some limitations, such as inability to stack modulate materials, it would still cover most of the use cases.
                https://www.artstation.com/artist/rawalanche

                Comment


                  #23
                  Originally posted by Rawalanche View Post

                  I already did, few posts above. All I'd want would be modulate blend mode which is compatible with Surface TranslucencyVolume model.
                  Click image for larger version

Name:	Translucency.jpg
Views:	21
Size:	208.9 KB
ID:	1674431
                  Even if it comes with some limitations, such as inability to stack modulate materials, it would still cover most of the use cases.
                  How exactly modulate blend would help you here? Modulate blend multiplies source by destination.

                  Comment


                    #24
                    I believe what was meant by provide a solution is "write shader code to do this". If you can not, you have absolutely 0 right to say anything is "simple", otherwise you should just go do it.

                    Oh and regarding the glass, that's hardly a tinted car window.
                    it works slightly differently with blown glass, but the idea is the same. You pigment silica with different colors/dies. Just because melting it makes it appear as one surface it does not mean you have just one surface.
                    and you may or may not use coatings on blown glass too. It depends on what kind of finish gets put on it, so you should probably refrain from generalizing it in the first place.
                    Last edited by MostHost LA; 10-16-2019, 09:42 PM.

                    Comment


                      #25
                      Originally posted by MostHost LA View Post
                      I believe what was meant by provide a solution is "write shader code to do this". If you can not, you have absolutely 0 right to say anything is "simple", otherwise you should just go do it.

                      Oh and regarding the glass, that's hardly a tinted car window.
                      it works slightly differently with blown glass, but the idea is the same. You pigment silica with different colors/dies. Just because melting it makes it appear as one surface it does not mean you have just one surface.
                      and you may or may not use coatings on blown glass too. It depends on what kind of finish gets put on it, so you should probably refrain from generalizing it in the first place.
                      This doesn't make any sense. Even in high end automotive visualization (which I've done plenty off) in offline renderers, people do not simulate car windows tint by actually having multiple geometry layers. A simple dielectric material with tinted refraction in vast majority of cases looks identical, and even clients of the large automotive brands find it sufficient. If such an advanced simulation is not required even in high end offline rendered visualization, what would justify it a realtime game engine? The process is a workaround of a limitation, don't try to turn it into a feature.

                      Originally posted by MostHost LA View Post
                      I believe what was meant by provide a solution is "write shader code to do this". If you can not, you have absolutely 0 right to say anything is "simple", otherwise you should just go do it.
                      This is the common form of the "You must be an experienced chef to be able to tell if the food tastes good" kind of flawed argument. I can't write a shader code for this, I probably could after a few months if I looked into it. But I can provide number of examples of realtime rasterizers which allow you to create tinted glass materials without workarounds, as ability to tint translucency/refraction is part of their basic shader model. That alone shows it is possible.

                      Imagine you live in a state where 4 mobile carries operate. 3 of them give you 50GB of data for $20/month while 4th one, the one you are with gives you 0.5GB for the same price. You clearly see, based on the other 3 that possibilities are somewhere else by an order of magnitude at least. When you complain about this to your carrier, asking why their price to service value ratio is so poor, the answer you will get is that you have absolutely 0 right to criticize the value they offer before you start and run a company which becomes a major mobile carrier.
                      Last edited by Rawalanche; 10-17-2019, 04:09 AM.
                      https://www.artstation.com/artist/rawalanche

                      Comment


                        #26
                        Originally posted by Deathrey View Post

                        How exactly modulate blend would help you here? Modulate blend multiplies source by destination.
                        In that particular constellation of the parameters, only emissive component would be multiplied, while others, such as specular, would be overlayed on top.
                        https://www.artstation.com/artist/rawalanche

                        Comment


                          #27
                          Originally posted by Deathrey View Post
                          How exactly modulate blend would help you here? Modulate blend multiplies source by destination.
                          As far as I can tell, what he's actually looking for is a shading model that takes in a "tint" color which is multiplied by whatever is behind the translucent surface (the scene color wouldn't be sufficient because he needs to support overlapping objects as well), after which the (potentially untinted) surface would be blended on top, similarly to how the existing "clear coat" shading works.

                          Of course, implementing that in the deferred renderer directly (and in a way that allows for overlapping tinted geometry) would require having two gbuffers instead of just one (one for modulating the scene color, and one for compositing the surface shading on top) and the only way to do that would be to render all of the geometry an additional time.

                          Originally posted by Rawalanche View Post
                          This just comes down to me being able to trust Unreal's shading model to handle all the possible real world materials. Currently it can handle all of them except tinted glass, which means it's incomplete. All I am requesting is that it's a complete shading model.
                          I'm genuinely not sure what this means, because what you seem to be saying isn't even slightly true. There are infinitely many (literally) BSDF functions that appear in the real world that aren't supported. Even incredibly common things like anisotropic highlights and Oren-Nayar diffuse reflectance, and the vast majority of cloth materials can't be achieved at all (Oren-Nayar shading is technically in the engine, but currently requires modifying shaders to make it available. Even then, it only works correctly with direct light).

                          Comment


                            #28
                            Originally posted by amoser View Post
                            I'm genuinely not sure what this means, because what you seem to be saying isn't even slightly true. There are infinitely many (literally) BSDF functions that appear in the real world that aren't supported. Even incredibly common things like anisotropic highlights and Oren-Nayar diffuse reflectance, and the vast majority of cloth materials can't be achieved at all (Oren-Nayar shading is technically in the engine, but currently requires modifying shaders to make it available. Even then, it only works correctly with direct light).
                            Anisotropy is supported since 4.24, check trello board. UE4 has cloth shading model as well as fuzzy shading node. Sure it's not a physically based simulation of cloth backscattering, but it's more than sufficient in context of realtime engine. I mean if you see all the archviz work that's been already done with the engine, cloth shading is definitely not an issue. What is though, is the tinted translucency/refraction workflow. Even if we accept the workarounds mentioned above, we still don't have raytracing compatibility. Complete, in a context of what I said, was supposed to mean just ability to create majority of common materials out of the box. Tinted refractive materials fall into the category of "common" since it's hard to shade even such a basic things like vehicles or interior accessories without them.

                            One more thing:
                            It would not need to allow for overlapping tinted translucent geometry, at least perhaps not the initial implementation. There are many cases where you need tinted refractive material, but the cases where you need two tinted refractive materials overlapping would be rather rare. It would still be sufficient to at least cover 90%+ of the cases than none at all. It's not like Unreal doesn't have other limitations when it comes to shading.
                            Last edited by Rawalanche; 10-17-2019, 04:23 AM.
                            https://www.artstation.com/artist/rawalanche

                            Comment


                              #29
                              Originally posted by Rawalanche View Post

                              In that particular constellation of the parameters, only emissive component would be multiplied, while others, such as specular, would be overlayed on top.
                              This is not a modulate blend. Again, modulate blend takes color, and multiplies it over existing color. There is no specular or emissive. By the time it gets blended, it is just a color. By saying that giving you modulate blend on lit translucency would magically fix tinted glass for you, you are further confusing anyone, who might peek into the thread.

                              There are two practical ways to tackle the problem.

                              1) Use Blend Add(Alpha composite) blending mode, and divide specular lighting by opacity. It works out of the box, needing only 3 lines of shader code to change. Breaks at low opacity values and instead of correct tint, gives you mix of background color and transmission color. Better than nothing, but still pretty terrible.

                              2) Use Dual blend. That is what you are expecting, Specular lighting would be added and transmission(emissive, basecolor, w.e.) would be multiplied but there are performance and platform implications.

                              In both cases, distortion would still leave any objects with transmittance behind first one, undistorted.


                              So the essence of two pages here:

                              UE4 needs dual blend blending mode support added for lit and unlit translucency and separate translucency.

                              Until it is done, transmissive shading in UE4 will remain being triumph of raindance and workarounds.

                              TLDR: Use Scene Color Material Expression.

                              Last edited by Deathrey; 10-17-2019, 08:58 PM.

                              Comment


                                #30
                                Originally posted by Rawalanche View Post

                                Anisotropy is supported since 4.24, check trello board.
                                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.

                                UE4 has cloth shading model as well as fuzzy shading node. Sure it's not a physically based simulation of cloth backscattering, but it's more than sufficient in context of realtime engine.
                                Having a single diffuse cloth model with two extra parameters is by no means more than sufficient in lots of real-world cases. It doesn't have any relevance at all to things like silk, velvet, etc.

                                More to the point, though, what you said (and what I was responding to) is the claim that you need to be "able to trust Unreal's shading model to handle all the possible real world materials" and following that up by saying that somehow tinted glass is, somehow, the only missing piece. That seems wildly different from any of the things you're saying now. I don't know if you're just being needlessly hyperbolic or if you're just not really paying attention to what you're actually writing, but it's difficult to follow the logic and that's been the case throughout most of what you've written in this thread. I think if you take a bit more time to proofread your posts you'll probably be able to get your ideas across much more efficiently.

                                I suspect that you'll also find that people are more receptive to your ideas in general if you show that you've put a little bit more thought into them. A lot of what you've written in this thread comes across as just a bunch of disjointed sweeping generalizations and insults, with a few specific but also frequently incorrect details thrown in. I think most people just want to help out, but that's challenging when one has to jump through a bunch of hoops just to figure out what you're actually asking about.

                                One more thing:
                                It would not need to allow for overlapping tinted translucent geometry, at least perhaps not the initial implementation. There are many cases where you need tinted refractive material, but the cases where you need two tinted refractive materials overlapping would be rather rare. It would still be sufficient to at least cover 90%+ of the cases than none at all. It's not like Unreal doesn't have other limitations when it comes to shading.
                                Support for overlapping geometry is the sole reason you gave in your first post or why using the scene color input node is not a good solution, though. And doing it that way is both more efficient and more flexible than an additional shading model would be.

                                Comment

                                Working...
                                X