Announcement

Collapse
No announcement yet.

colour by light direction/intensity

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

  • colour by light direction/intensity

    hello,

    i am wondering if it is possible to have a colour ramp driven by light direction / intensity on a vray material? A bit like the old maya ramp shader where you can choose light angle to drive a ramp.

    Thanks in advance

    Matt


  • #2
    We actually support maya's ramp shader. Won't it work for your case?
    Alex Yolov
    Product Manager
    V-Ray for Maya, Chaos Player
    www.chaos.com

    Comment


    • #3
      Hi,

      I'm trying to create a pearlescent car paint material using Vray Stochastic flakes. I have a photo of the paint as reference. I just cant get it to match very well, The actual paint seems to change colour dependent on light direction and intensity. I dont think maya ramp shader is going to help

      thanks

      Matt

      Comment


      • #4
        I think the flakes themselves should do the trick, isn't that what happens with real carpaint? The color change is actually because of the flakes being hit by light at a different angle (at least I think so, hope I'm not wrong). In this case, try going with a high number of colored flakes - there's options to randomize the flake color. Just a thought.
        Alex Yolov
        Product Manager
        V-Ray for Maya, Chaos Player
        www.chaos.com

        Comment


        • #5
          Thanks ill try that and report back.

          Comment


          • #6
            No luck, i dont think it is possible with vray, reading up on pearlescent paint. Maybe a dev can chime in and confirm?

            Comment


            • #7
              What are you looking to get out of V-Ray? Any references?
              Alex Yolov
              Product Manager
              V-Ray for Maya, Chaos Player
              www.chaos.com

              Comment


              • #8
                I'm fairly certain that the color of pearlescent paint depends on the viewing angle, not the angle of the light to the material. You can use a VRayFalloff node or the facing ratio output from a samplerInfo node as the input to your color ramp.
                __
                https://surfaceimperfections.com/

                Comment


                • #9
                  It will be hard to make it work with light angles, yes, but with viewing angles it's easier. There's the sampler info, there's the vrayFalloff that has some built-in modes that can be used separately from the samplerInfo, and there might be more available solutions. But as I said, it would all depend on what the end goal is So a reference is good to have in this case.
                  Alex Yolov
                  Product Manager
                  V-Ray for Maya, Chaos Player
                  www.chaos.com

                  Comment


                  • #10
                    Originally posted by yolov View Post
                    What are you looking to get out of V-Ray? Any references?
                    yes here you go,

                    note the shift in hue on the paint work relative to light direction

                    Attached Files

                    Comment


                    • #11
                      Ah, that sheds some more light onto the subject (pun intended)

                      See if this setup will be useful to you: see the attached file.

                      I've done a pretty quick and for the most part inaccurate setup, but it all boils down to using vrayFalloff texture in "distance blend" mode, where the direction is set to "explicit direction", where I've connected a light's worldPosition. Basically moving the light should blend the two colors respectively. The concept of the setup can be expanded a lot. Hope it helps.
                      Of course, you can use any dummy object as the "explicit direction origin" and not rely on the light's position itself (I would personally set it up like that).
                      Attached Files
                      Alex Yolov
                      Product Manager
                      V-Ray for Maya, Chaos Player
                      www.chaos.com

                      Comment


                      • #12
                        Originally posted by yolov View Post
                        It will be hard to make it work with light angles, yes, but with viewing angles it's easier. There's the sampler info, there's the vrayFalloff that has some built-in modes that can be used separately from the samplerInfo, and there might be more available solutions. But as I said, it would all depend on what the end goal is So a reference is good to have in this case.
                        yes im aware of v sampler info and facing ratios etc but this is not the look i am after. i would like to get as close to clients reference shots of the car as possible out of the render after all this is what they will be comparing me with.

                        FYI My light setup is just a hdri, originally i was using a couple of stochastic flake materials and a lacquer in a blend material, but doing it this way there was no way to control the shift in hue relative to light direction and intensity. I have managed to get closer to their material by using a maya ramp shader as the base material and driving the diffuse with the light angle, this works pretty well . but my blend material is a dirty hack with lots of 'un physically correct' layers on top of each other as Additive.

                        Comment


                        • #13
                          i love a pun!

                          Comment


                          • #14
                            oh and thanks for the attachment, ill try it now and report back

                            Comment


                            • #15
                              Hi Yolov,

                              when i render your scene from the perspective view i just get an orange ball, what values did you set your near and far to on distance blend mode?

                              Also what was your reasons for using distance blend?

                              Click image for larger version

Name:	distance blend.jpg
Views:	582
Size:	140.3 KB
ID:	976150

                              If i switch to towards away i get something that looks quite usefull

                              Click image for larger version

Name:	towards away.jpg
Views:	453
Size:	142.2 KB
ID:	976151

                              thanks

                              Matt



                              Comment

                              Working...
                              X