Announcement

Collapse
No announcement yet.

Texture rayswitch

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

  • Texture rayswitch

    Hi,
    We can create materials override on materials. But for example, i want to use the same material for the GI, but without bump, or with another texture in diffuse.
    To do this, i have to duplicate my material, and i have to do my modification.
    Duplicate the material just to modified one setting is not very good.

    It is possible to have a texture rayswitch node ?
    With this, no need to duplicate my material.

    Like this for mentalRay :


    Thanks.
    www.deex.info

  • #2
    Hi,
    Up for this request...
    I do not know if it is difficult or not to code ? (i don't know a lot C++)
    www.deex.info

    Comment


    • #3
      Independent rayswitch node is a must have for full raytrace renderers (I know mental ray and Arnold have a rayswitch system, I suppose Renderman too).

      If Vray could deal with rayswitch + user attr, a lot of current vray attributes could be obsolete as rayswtich will use the object user attributes directly in the shader graph (with few "condition" nodes).

      You also could remove the material override system in the shading group and use the independent rayswitch node to deal with them.

      I think it's more versatile to have a such system than many specific vray attributes (that can't deal with every case you could encounter).
      Last edited by Narann; 03-09-2013, 03:03 AM.
      Few vray stuffs on my blog.

      Comment


      • #4
        Originally posted by bigbossfr View Post
        I do not know if it is difficult or not to code ? (i don't know a lot C++)
        No, it is not difficult at all. Just have to find the time for it...

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment


        • #5
          Btw does it have to be a separate node? It could be additional V-Ray attributes that you can add to any texture; similar to how we do with materials now. (Try to ignore the "it's a node in other renderers" syndrome - I'm just asking which would be more convenient.)

          Best regards,
          Vlado
          I only act like I know everything, Rogers.

          Comment


          • #6
            Originally posted by Narann View Post
            I think it's more versatile to have a such system than many specific vray attributes (that can't deal with every case you could encounter).
            Can you explain? Which are the cases that the attributes can't deal with and why would it be more versatile to have this as a separate node?

            Best regards,
            Vlado
            I only act like I know everything, Rogers.

            Comment


            • #7
              I think it will be better to have a separate node because sometime, to optimize (or simplify), we can connect this node to a lot of color attributes (more easy than add attributes to every texture/utility/other nodes).

              I think Narann want to be sure than this node will work with user attributes node (scalar, color...), for example, control the optimization by the geometry.
              Example :
              - i have 3 spheres with red one material
              - i add user attr on sphere 2, with this setting : myCo=0.0,1.0,0.0
              - i connect my rayswitch to the diffuse color of my red material, and add the red color to the default value of my rayswitch.
              - i connect an "user color" node to the GI color of my rayswitch texture for example. I set the variable of my "user color" to myCo, and set the default value to 0.0,0.0,1.0 for example.

              My result with be :
              - all sphere will be red for diffuse
              - sphere 2 will be green on GI
              - sphere 1 and 3 will be blue on GI

              This is poweeerrrrfullllll
              www.deex.info

              Comment


              • #8
                Forgot to say that the node rayswitch is not just a "color node" but work with int and float.
                Example : connect the rayswitch node to the glossy (and subdivs ?) reflection of a material to control the glossyness of the material just in the GI (and add less subdivs, optimization).
                www.deex.info

                Comment


                • #9
                  Hi vlado, thanks for answer.

                  Damien get the point.

                  Which are the cases that the attributes can't deal with and why would it be more versatile to have this as a separate node?
                  I will write few examples I have in mind.

                  1) There is a mip map bias for gi rays. But for refraction? For reflection? etc...
                  When you use full raytrace GI, it's often convenient to use a rayswitch on the mipmap bias of a texture. Vray already provide a parameter to deal with that.
                  But if you have a refracting glossy surface. You would need to increase the bias of the refracted texture to have a blured texture and a faster glossy raytrace. Let's suppose you provide a new parameter: "mip map bias in refraction". What about reflection: You have a whole plane textures surface reflected in many objects around. You will add another "mipmap bias in reflection"?
                  And all of this for every parameters of the maps? Rayswitch is a global solution to solve this local problems and avoid to have parameter for all cases "value in GI", "value in refraction", "value in ..." etc...

                  2) same for shaders.
                  Have you direct mirror reflections in your scene? No? Only heavy glossy reflections? Why shouldn't we decrease material complexity of reflection rays making material reflection actually "sharp" (mirror) and, why not, less reflective in secondary rays?
                  You could gain a lot of computation time with it (depending on how the raytracer work, maybe Vray3 will have no need to this, I'm ready to test all of this in the beta. ).

                  3) Change one material parameter for one object in reflection/refraction/GI.
                  Classical problem: You want your material with few different parameter in the refraction/refraction/GI.
                  For now with vray, you need use material override:
                  - Duplicate your whole material (while you only want to change one parameter)
                  - Connect every parameters of the old material to the new one (except the parameter you want to change of course).

                  I humbly think it's an oversized workflow, specially with huge material graph, while you could "locally" define multiple possible values to your material depending on the ray type using "ray type entry".

                  If you ever use Nuke, you can specify a parameter to have different value depending on the "eye" (left right). Doing so, the parameter is duplicate in the node (with "L" and "R" in it name). That's the point (I just think a separate node is more clear than duplicate the parameter in the UI but it's all up to you to choose the way you judge better).

                  All of this are not intent to have more "correct" solution but decrease/increase computing work where "your eye" think it's needed.

                  Another point where I think rayswitch + user attr decrease the number of parameter:

                  You create your material graph with a userAttr node "OnlyDiffuseInGIRays" to 0.0 by default, connected to an "add" node with 1-input (result is 0 if 1 and 1 if 0), this connected to the GI of a rayswitch, this connected to the "trace reflection" and "trace refraction" value.

                  Nodes:

                  (userAttr "OnlyDiffuseInGIRays" 0.0)-->(add 1-*input*)-->(rayswitch GI)-->(material trace_reflection and trace_refraction)

                  So by default reflection and refraction are traced in GI.

                  Then you select all objects you want, add a userAttr "OnlyDiffuseInGIRays" to 1.0 and now, this object will be diffuse only in GI. And you can create many situation with this.

                  With this idea you "could ignore" dozen of VRay macro parameter and us this workflow to deal with every situation.

                  I understand it can be easier for the user to have parameters in the UI for every "common" situations ("mip map bias in GI" for example). I just say user attributes + rayswitch anywhere in the material graph is a powerfull tool than can make you go further.

                  I hope I'm clear, don't hesitate to tell me if I'm not.
                  Few vray stuffs on my blog.

                  Comment

                  Working...
                  X