Announcement

Collapse
No announcement yet.

V-Ray ignores refracted back side reflections regardless of VRayMTL setting

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

  • V-Ray ignores refracted back side reflections regardless of VRayMTL setting

    Hi,

    this bug has been worrying me for quite a long time already. I remember first encountering it about 4 years ago, taking me an entire day to figure out what's happening. I assumed it was promptly fixed, but just a few days ago, I've stumbled upon it again.

    Basically, V-Ray completely ignores material reflections on back side of the faces when the surface is refracted. In other words, if you enable "reflect on back side" in VrayMTL, it will apply only to directly visible surface, not surfaces that are being refracted. This is especially noticeable on metallic materials, since they have 0 diffuse and all of their appearance is therefore made out of the reflection component.

    Here is an example image. The scene contains two separate objects, first one is left and right glass cover, second one is left and right metal reflector behind the glass. Both glass and metal materials have "reflect on back side" option enabled:
    Click image for larger version

Name:	image_38598.jpg
Views:	2017
Size:	406.7 KB
ID:	967350

    Now here is a screenshot of the reflector mesh in viewport from front side and back side, with standard material applied:
    Click image for larger version  Name:	 Views:	1 Size:	170.3 KB ID:	967349

    As you can see, since normals were baked in by the exporter, even after the standard material check, you can't tell that normal on the one side is flipped in. The only way you can tell is by applying two normal modifiers on top of the mesh, to make 3ds Max throw away baked-in normals.

    First thing that probably comes to your mind is "Well, it's not such a big of a deal, you can just flip the normals right way and it will work" - That's where the biggest issue occurs:

    The two times I've stumbled upon this bug was when I received meshed NURBS/CAD models from a car manufacturer. The way exporter handles some of the parts is by mirroring them, but at the same time baking the normal information into the mesh. So what you end up with is a model, which shades seeming correctly in the viewport - even with standard material, which shades back faces as black - yet for V-Ray, those mirrored parts are interpreted with the normals flipped inside. And as soon as you even remotely touch the normal orientation inside 3ds Max, it instantly throws away all the normals baked in from nurbs/CAD conversion, and the model is pretty much useless. So then it comes to really lengthy workarounds of remodeling some parts (and hiding the fact from the client) just because V-Ray can't refract reflection on the rear side of the face.

    I unfortunately can not share even this tiny piece of the car model publicly, but I've mailed the scene to support@chaosgroup.com

    Thanks
    Last edited by LudvikKoutny; 12-09-2017, 02:23 AM.

  • #2
    Well,
    I did it exactly as you described in the message you sent to me: "You can create empty scene, with a glass box and two planes behind it. Then, turn one plane around, so it's back faces towards your camera, while other plane still faces its front. After that, create a new metal material (0 diffuse) and enable reflect on back side, which should ensure that it will reflect even on the other side. Apply this material to both planes seen through the glass box, and you will see one of them is completely black."

    I do not get this error. The plane on the left side is facing away from the camera, but it renders as expected. Can you confirm I did follow your procedure correctly?

    EDIT: I don't even need to activate the reflect on back side option of the reflective material on the plane, it renders correctly straight away.

    Click image for larger version  Name:	glassbox_01.JPG Views:	1 Size:	49.2 KB ID:	967357Click image for larger version  Name:	glassbox_02.JPG Views:	1 Size:	54.5 KB ID:	967356Click image for larger version  Name:	glassbox_03.JPG Views:	1 Size:	40.5 KB ID:	967355
    Last edited by kosso_olli; 12-09-2017, 03:00 AM.
    https://www.behance.net/Oliver_Kossatz

    Comment


    • #3
      Yes, you are correct. I just tried it, I can't reproduce it in the simple scene either, but I still can reproduce it in the scene I sent to support, so I hope they can figure out what's going on

      Comment


      • #4
        Let me tell you, your part is messed up. I had that so often, because the manufacturers are sending out corrupted crap...
        Would like to help, as this is likely fixable, but it's hard without the part in front of me.
        https://www.behance.net/Oliver_Kossatz

        Comment


        • #5
          As I already said, if it's fixable is not really relevant in this case. The point is that if Corona and Mental Ray render it correctly by default, there is no reason V-Ray should not. Fixing it takes time, even worrying about it and checking for it takes time. That time can be spent on creative work, rather than troubleshooting. No matter what's going on with normals, there is no rational reason for reflections to ever be absent from surface, if the material on surface is reflective.

          Comment


          • #6
            Originally posted by Recon442 View Post
            The point is that if Corona and Mental Ray render it correctly by default, there is no reason V-Ray should not.
            Sorry, but I highly doubt that Corona or MR render an object correctly that is already broken in Max in the first place...
            https://www.behance.net/Oliver_Kossatz

            Comment


            • #7
              Originally posted by kosso_olli View Post

              Sorry, but I highly doubt that Corona or MR render an object correctly that is already broken in Max in the first place...
              Corona result

              Same scene, no modifications except changed materials from VRay to Corona and removed domelight. Yes, there may be errors, but I still don't believe it is right to handle those errors by completely removing reflections, when they can be, apparently, handled better. I mean if it shades correctly in the viewport, why shouldn't it in the render?

              Comment


              • #8
                I have no idea what Corona or MR does to that object, but I would never ever expect any render engine to "magically" fix my wrong normals I am feeding into the engine. I(!) want to have full control on what gets done with the normals, and not the render engine.
                Garbage in, garbage out. It is that simple with V-Ray. Flipped normals sometimes render black, and with CAD data from unknown sources, this may easily occur. However, in my entire career of automotive work, I never ever had to remodel a part because of broken normals. Max has a number of tools to get that fixed.

                I am curious to know what the Chaos team will reply to this, because I think this is nothing that should be fixed on their end.
                https://www.behance.net/Oliver_Kossatz

                Comment


                • #9
                  Well if different normal orientation was supposed to mean different amount of reflection, then most of your metallic objects should turn black as soon as you apply any normal on them. Yes, you should not expect completely correct results from weird normals, but again, as I said, it makes no rational sense for wrong normal to disable reflection, especially when "reflect on back side" is enabled, because that options pretty much tells renderer "Hey, from whatever angle or side you hit the surface, always reflect back!"

                  Comment


                  • #10
                    if you`re on 3.6 have you tried turning off adaptive rendering, seems to cause a bunch of issues with random stuff from what i read here. also i presume material has double sided ticked on ? maybe lower the reflect/refract cutoff value ? reset the renderer, merge into a new scene maybe. just guesses, i get loads of issues with cad in general, even more so if i try to actually edit any of it.

                    Comment


                    • #11
                      I am looking into it right now but according to my expertise Reflect on Back Side is not the main issue here.
                      Reflections are missing from each of the sides of right headlight, like both sides have flipped normals not just one of them, the strange thing is that if I revert polygons manually it still renders black on both sides.
                      Click image for larger version

Name:	3dsmax_2017-09-12_14-36-17.jpg
Views:	1938
Size:	20.5 KB
ID:	967380

                      The issue only disappears if I select entire Element and Flip it or by using Flip Normals modifier, in that case the surface is properly rendered on both sides.
                      Click image for larger version

Name:	3dsmax_2017-09-12_14-37-39.jpg
Views:	1959
Size:	21.9 KB
ID:	967381

                      The issue also disappears if I use Mirror modifier to duplicate headlight and the strangest thing is that it doesn't matter which side is mirrored.
                      Duplicating bad side also produce correct result on both sides, not just on one, which is extremely unusual.

                      I don't know how the geometry is built initially and how it is transferred into 3dsMax but to me it looks more like a geometry problem rather than V-Ray one.
                      Attached Files
                      Svetlozar Draganov | Senior Manager 3D Support | contact us
                      Chaos & Enscape & Cylindo are now one!

                      Comment


                      • #12
                        Originally posted by svetlozar.draganov View Post
                        I am looking into it right now but according to my expertise Reflect on Back Side is not the main issue here.
                        Reflections are missing from each of the sides of right headlight, like both sides have flipped normals not just one of them, the strange thing is that if I revert polygons manually it still renders black on both sides.
                        Click image for larger version

Name:	3dsmax_2017-09-12_14-36-17.jpg
Views:	1938
Size:	20.5 KB
ID:	967380

                        The issue only disappears if I select entire Element and Flip it or by using Flip Normals modifier, in that case the surface is properly rendered on both sides.
                        Click image for larger version

Name:	3dsmax_2017-09-12_14-37-39.jpg
Views:	1959
Size:	21.9 KB
ID:	967381

                        The issue also disappears if I use Mirror modifier to duplicate headlight and the strangest thing is that it doesn't matter which side is mirrored.
                        Duplicating bad side also produce correct result on both sides, not just on one, which is extremely unusual.

                        I don't know how the geometry is built initially and how it is transferred into 3dsMax but to me it looks more like a geometry problem rather than V-Ray one.
                        Yes, as I described above, doing any of the operations you describe will make 3ds Max throw away baked in normals and recalculate them. That will resolve the issue, but you generally cannot afford to do that, because it will completely break correct shading on larger pieces.

                        Comment


                        • #13
                          Originally posted by Recon442 View Post

                          Yes, as I described above, doing any of the operations you describe will make 3ds Max throw away baked in normals and recalculate them. That will resolve the issue, but you generally cannot afford to do that, because it will completely break correct shading on larger pieces.
                          Sorry Ludvik, I have to disagree here. None of these operation break the shading or normals, if done correctly. There are a number of operations that break normals on CAD geometry, but flipping normals is not one of them. As long as you avoid some things, CAD data can be handled perfectly fine in Max. In fact, much better then in any other software. Dealing with this all day long was a pain, but after some time it became second nature...
                          I left some bits of info here on the forum on handling car CAD data, but I can't find it anymore. It had some info on flipping normals, because there are two different ways to do it, with two different results. And both look correct in the viewport, but internally are still broken. Viewport appearance alone is not enough to judge normal problems.
                          https://www.behance.net/Oliver_Kossatz

                          Comment


                          • #14
                            Originally posted by kosso_olli View Post

                            Sorry Ludvik, I have to disagree here. None of these operation break the shading or normals, if done correctly. There are a number of operations that break normals on CAD geometry, but flipping normals is not one of them. As long as you avoid some things, CAD data can be handled perfectly fine in Max. In fact, much better then in any other software. Dealing with this all day long was a pain, but after some time it became second nature...
                            I left some bits of info here on the forum on handling car CAD data, but I can't find it anymore. It had some info on flipping normals, because there are two different ways to do it, with two different results. And both look correct in the viewport, but internally are still broken. Viewport appearance alone is not enough to judge normal problems.
                            Yes, for you, dealing with it has became the second nature, but that doesn't mean dealing with weird baked in normals should become second nature for every user, and that everyone should go through it, given that Corona shows this can be handled automatically by the renderer. You should want the renderer to help you out in these cases, not to punish you for them.

                            It's very easy to just say garbage in - garbage out, but there are many people working in studios under tight deadlines, and finding out that one of your car lights is black after rendering 500 frame animation sequence, and not immediately knowing what causes it, because your object looks completely fine in the viewport and you have enabled "reflect on back side" on your material, will cost you a lot of time and nerves.

                            If viewport shades these faces fine, and Corona proves that a raytracer can interpret that shading equally as fine, what is a valid reason for not doing so?
                            Last edited by LudvikKoutny; 12-09-2017, 09:13 AM.

                            Comment


                            • #15
                              Well,
                              I was just going to prepare a massive rant that this is all nonsene. But it isn't; Ludvik is right.
                              Please take a look at these images. The part you can see here is the outer cover of a rear light of a car. It uses a red fog color to tint it red, like in reality.

                              Click image for larger version  Name:	normal_01.JPG Views:	1 Size:	109.6 KB ID:	967436

                              Now, I will break the normal of the selected faces on purpose:

                              Click image for larger version  Name:	normal_02.JPG Views:	2 Size:	143.0 KB ID:	967437
                              Please note that the part looks exactly the same as before in the viewport. If you wouldn't know because I told you, you can not detect that the normals are reversed (unless you know very precisely what you have to look for)

                              Click image for larger version  Name:	normal_03.JPG Views:	1 Size:	58.2 KB ID:	967438

                              Lets render again, and the selected faces are now rendering black. I assume, because V-Ray assumes it is now of infinite thickness.


                              Click image for larger version  Name:	normal_04.JPG Views:	1 Size:	142.6 KB ID:	967440

                              Of course I wanted to test the same in Corona. Apparently, their equivalent to fog (absorption) indeed handles this correctly by default. How is a mystery to me, though.
                              The part is exactly the same as before, with normals broken on purpose. It renders correctly. (ignore the sphere next to it)

                              Click image for larger version

Name:	normal_05.JPG
Views:	1918
Size:	185.8 KB
ID:	967441

                              That means that Ludviks arguments are totally valid. If this was possible in V-Ray straight out of the box, it would take the very tedious process of manually checking every transparent part of a dataset for normal errors. Especially on cars, this can be a lot.

                              Also, if there was a way to render single sided objects with correct fog color, I would be a happy operator.

                              So, you were right, Ludvik. Thanks.
                              Last edited by kosso_olli; 12-09-2017, 11:23 AM.
                              https://www.behance.net/Oliver_Kossatz

                              Comment

                              Working...
                              X