Announcement

Collapse
No announcement yet.

User Attributes

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

  • User Attributes

    Are user attributes animatable? Or can I connect an user attribute via script to an attribute on the object?

    Thanks
    http://www.andreas-reimer.de
    http://www.renderpal.com
    my HDRI and texture collection

  • #2
    Most V-Ray attributes can be animated.
    Please advise what exactly you are trying to achieve?
    Best regards,
    Zdravko Keremidchiev
    Technical Support Representative

    Comment


    • #3
      I have a couple objects (spheres) traveling along a path. All objects have the same shader. At the end of the path I would like to transparent fade out the objects.
      It would be great to be able to do this without giving each object a different shader, because there are a lot of them.

      For this I would like to add an additional attribute to each object that can control its opacity.

      But it seems that V-Ray user attributes, which are required to use in shaders, on objects can't be animated, so I'd like to connect them to a Maya attribute.
      http://www.andreas-reimer.de
      http://www.renderpal.com
      my HDRI and texture collection

      Comment


      • #4
        Originally posted by brainspoon View Post
        But it seems that V-Ray user attributes, which are required to use in shaders, on objects can't be animated, so I'd like to connect them to a Maya attribute.
        This conclusion is not correct starting with the current nightly build (rev>=20095).
        Now the user attributes can be animated.
        V-Ray developer

        Comment


        • #5
          Like Theodor mentioned, since revision 20095 and later of the nightly builds you can actually add your own V-Ray user attributes which can be animated. For example, you could add a color attribute to your mesh like this:
          Code:
          addAttr -at float3 -usedAsColor -longName vrayUserColor_opacityColor;
          addAttr -at "float"  -parent vrayUserColor_opacityColor -longName vrayUserColor_opacityColorR;
          addAttr -at "float"  -parent vrayUserColor_opacityColor -longName vrayUserColor_opacityColorG;
          addAttr -at "float"  -parent vrayUserColor_opacityColor -longName vrayUserColor_opacityColorB;
          You can animate these attributes as you wish. Then you can attach a VRayUserColor node to the opacity of the VRayMtl material, and specify opacityColor as the name of the V-Ray user attribute.

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

          Comment


          • #6
            Cool stuff.

            Are those color attributes only accessible via script? I was trying it via the Attributes drop down on the object. That is why I did not find it.
            http://www.andreas-reimer.de
            http://www.renderpal.com
            my HDRI and texture collection

            Comment


            • #7
              Custom boolean attribute work with user scalar ?
              Or we must to use float attribute ?
              Last edited by bigbossfr; 20-03-2012, 06:30 AM.
              www.deex.info

              Comment


              • #8
                Originally posted by brainspoon View Post
                Are those color attributes only accessible via script? I was trying it via the Attributes drop down on the object. That is why I did not find it.
                Technically you could also do it with Attribute > Add... but it doesn't seem to work for colors or at least I could not make it work for color values.

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

                Comment


                • #9
                  Originally posted by bigbossfr View Post
                  Custom boolean attribute work with user scalar?
                  I'm not sure about that one, I have to check.

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

                  Comment


                  • #10
                    Strange. Today it does not seem to work anymore, or I am doing something wrong. Here is the scene (Maya 2012)

                    V-Ray: V-Ray for Maya version 2.25.01, revision 20116 from Mar 21 2012, 08:44:37
                    Attached Files
                    http://www.andreas-reimer.de
                    http://www.renderpal.com
                    my HDRI and texture collection

                    Comment


                    • #11
                      Does it have to be on the shape? Was sure that I did it on the transform yesterday. On the shape node it seems to work
                      http://www.andreas-reimer.de
                      http://www.renderpal.com
                      my HDRI and texture collection

                      Comment


                      • #12
                        Yes, for the moment this works for shapes only (unlike the normal V-Ray user attributes). There was fear that it would take too much time to look up the attributes through the whole hierarchy.

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

                        Comment


                        • #13
                          Would it be possible to have a Vray User String node? With the intention of it connecting to a file node (not quite sure how that would work)

                          I've got the VrayUserColour working nicely but it would be nice to be able to have one shader using different textures per object.

                          Comment


                          • #14
                            You can do this using condition node and VrayUserScalar. No need Vray User String.
                            Connect the VrayUserScalar to the condition node and connect your textures on the color is True, color is False.



                            After, just choose an number for the texture.
                            www.deex.info

                            Comment


                            • #15
                              Originally posted by MartinB View Post
                              Would it be possible to have a Vray User String node? With the intention of it connecting to a file node (not quite sure how that would work)
                              There is no need for that, it is built into the File node as implemented by V-Ray; just enclose the attribute with <> brackets in the texture file name, f.e. "textures/<diffuse>.png". You might also want to use the latest stable build for that, as the official release has some issues with this.

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

                              Comment

                              Working...
                              X