Announcement

Collapse
No announcement yet.

Spectral rendering for refractions

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

  • Spectral rendering for refractions

    Hey guys,
    some materials are opaque to certain wavelengths of light but transparent to others. If you place a green glass in between a white light source and an outer red glass, the exiting light color becomes yellow/orange. A clever approach to use colored multi-component translucent materials to let e.g. the turn light shine yellow/orange when it´s turned on, while the tail lamp appears fully red from the outside when it’s turned off.​ I wonder if this is possible with V-Ray
    The first test ended in a bad result, but maybe there is something wrong with the setup.

    Here is the setup on a real car:

    Click image for larger version

Name:	Glass_00.jpg
Views:	270
Size:	49.6 KB
ID:	1186185

    The technique applied to some other renderer:

    Click image for larger version

Name:	Glass_01.jpg
Views:	234
Size:	103.7 KB
ID:	1186186 Click image for larger version

Name:	Glass_02.jpg
Views:	226
Size:	170.6 KB
ID:	1186187

    And the test in V-Ray:

    Click image for larger version

Name:	Glass_03.jpg
Views:	236
Size:	102.8 KB
ID:	1186188


    Regards

    Oliver
    https://www.behance.net/Oliver_Kossatz

  • #2
    Of course red and green light makes yellow. So makes perfect sense.

    What technique are you using to make the glass red in VRay? It looks like it has some fresnel effect.

    I am out of the office, but I would try coloring the refraction map. If that fails, color the fog, or try both.

    But something tells me you likely already tried this.

    The IOR looks different between the two samples as well??

    I also wonder if a thin IOR 1.0 “gel” object placed on the inside of the red lens might help, or be necessary. But the other renderer looks great. What renderer is that?
    Last edited by Joelaff; 14-07-2023, 08:42 AM.

    Comment


    • #3
      Originally posted by Joelaff View Post
      Of course red and green light makes yellow. So makes perfect sense.

      What technique are you using to make the glass red in VRay? It looks like it has some fresnel effect.

      I am out of the office, but I would try coloring the refraction map. If that fails, color the fog, or try both.

      But something tells me you likely already tried this.

      The IOR looks different between the two samples as well??

      I also wonder if a thin IOR 1.0 “gel” object placed on the inside of the red lens might help, or be necessary. But the other renderer looks great. What renderer is that?
      I tested both fog color and refraction color, in this case, the result was the same.
      The other renderer is Vred which is very rooted in automotive visualization. They claim to be fully spectral.
      https://www.behance.net/Oliver_Kossatz

      Comment


      • #4
        I would say that there's something wrong happening, on the back side of the red glass I get the yellow tint, on the front I see no light at all when using a green glass in between, Ill post some results later.
        Last edited by sirio76; 14-07-2023, 01:18 PM.
        3D Scenes, Shaders and Courses for V-ray and Corona
        NEW V-Ray 5 Metal Shader Bundle (C4D/Max): https://www.3dtutorialandbeyond.com/...ders-cinema4d/
        www.3dtutorialandbeyond.com
        @3drenderandbeyond on social media @3DRnB Twitter

        Comment


        • #5
          Never mind.. I rebuild the shader from scratch and I get the correct result, very basic setup, white refraction and red/green fog color. I'm colorblind though so its possible I'm missing something..

          Click image for larger version

Name:	Screenshot 2023-07-14 alle 22.08.17.jpg
Views:	164
Size:	903.7 KB
ID:	1186231 Click image for larger version

Name:	Screenshot 2023-07-14 alle 22.09.42.jpg
Views:	178
Size:	508.3 KB
ID:	1186230
          3D Scenes, Shaders and Courses for V-ray and Corona
          NEW V-Ray 5 Metal Shader Bundle (C4D/Max): https://www.3dtutorialandbeyond.com/...ders-cinema4d/
          www.3dtutorialandbeyond.com
          @3drenderandbeyond on social media @3DRnB Twitter

          Comment


          • #6
            Are you using ACES?
            3D Scenes, Shaders and Courses for V-ray and Corona
            NEW V-Ray 5 Metal Shader Bundle (C4D/Max): https://www.3dtutorialandbeyond.com/...ders-cinema4d/
            www.3dtutorialandbeyond.com
            @3drenderandbeyond on social media @3DRnB Twitter

            Comment


            • #7
              Interesting!
              I still can not get this to work, the setup is the same as yours. We are not using ACES, though.
              Last edited by kosso_olli; 17-07-2023, 12:52 AM.
              https://www.behance.net/Oliver_Kossatz

              Comment


              • #8
                Are you both using the same version of vRay? Same version of Max?

                Comment


                • #9
                  I'm on Max 2023.2.2 and V-Ray 6.00.20
                  https://www.behance.net/Oliver_Kossatz

                  Comment


                  • #10
                    Originally posted by Joelaff View Post
                    Are you both using the same version of vRay? Same version of Max?
                    No, I’m on Vray 6.1 on C4D but you should get 100% the same results, the setup it pretty basic.
                    3D Scenes, Shaders and Courses for V-ray and Corona
                    NEW V-Ray 5 Metal Shader Bundle (C4D/Max): https://www.3dtutorialandbeyond.com/...ders-cinema4d/
                    www.3dtutorialandbeyond.com
                    @3drenderandbeyond on social media @3DRnB Twitter

                    Comment


                    • #11
                      Originally posted by kosso_olli View Post
                      We are not using ACES, though.
                      I don’t use ACES neither, just standard linear image displayed in sRGB
                      3D Scenes, Shaders and Courses for V-ray and Corona
                      NEW V-Ray 5 Metal Shader Bundle (C4D/Max): https://www.3dtutorialandbeyond.com/...ders-cinema4d/
                      www.3dtutorialandbeyond.com
                      @3drenderandbeyond on social media @3DRnB Twitter

                      Comment


                      • #12
                        Weird, it just does not work. This is a test in Max 2024 with V-Ray 60.10.08.
                        White refraction, red/green fog color and a white sphere light behind the discs.

                        Click image for larger version

Name:	glass04.jpg
Views:	182
Size:	66.0 KB
ID:	1186354
                        https://www.behance.net/Oliver_Kossatz

                        Comment


                        • #13
                          Ah, I got it working. The trick was not to use pure red and pure green. Lowering the saturation led to this result:

                          Click image for larger version

Name:	glass05.jpg
Views:	178
Size:	179.5 KB
ID:	1186360
                          https://www.behance.net/Oliver_Kossatz

                          Comment


                          • #14
                            Do not use full values for red and green.

                            edit: cross-posted
                            Lele
                            Trouble Stirrer in RnD @ Chaos
                            ----------------------
                            emanuele.lecchi@chaos.com

                            Disclaimer:
                            The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                            Comment


                            • #15
                              Is it as simple as the colours you're using for the fog?
                              I found that it does not work if red and green are both 255. Set them to 254 and it works.
                              https://www.behance.net/bartgelin

                              Comment

                              Working...
                              X