Announcement

Collapse
No announcement yet.

Multiple user scaler values

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

  • Multiple user scaler values

    Is it possible to assign 2 or more user scalar values to an object group to control colors?

    for example; if I have a gift with wrapping and a ribbon. The wrapping is 1 vray mtl and the ribbon is another vray mtl. Both have there own multi sub textures for different colors/patterns. Can I assign 2 user scalar values such as WrappingColor=2, RibbonColor=3 to the object group to mix and match each mtl separately?

  • #2
    Yes, you can add user attributes to groups. The objects within them can have separate user attributes, which I think will work for your scenario.
    Try creating a "major" VRayMultiSubTex with VRay User Scalar as Texture switch, to control the textures set (Wrapping or ribbon). The user attributes for this MultiSubTex should be set in the objects' groups.
    Next, create two other VRayMultiSub textures with their own VRay User Scalar node to control the switch textures. The user attributes for these MultiSub textures should set on the objects themselves.
    Attaching a screencap of the shader setup and screenshot from the result.
    Attached Files
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Thanks, that's a good solution. I will try it out.

      If I assign a User attribute to to an object group that contains 2 objects with 2 different materials. Is it possible to write 2 different attributes in the groups User attribute field such as "SwitchValueWrap=2, SwitchValueRibbon=3" (not sure if that syntax is correct) and have those values effect each material in the objects inside that group. What we're trying to achieve is to setup a gift group with wrapping and ribbons our artists can quickly assign different values for the wrapping and ribbon colors, so they don't have to select individual objects inside the group.

      Comment


      • #4
        You can add multiple user attributes. They need to be divided by a semicolumn like so:
        Code:
        SwitchValueWrap=2; SwitchValueRibbon=3
        If you wish to control the objects' color by the user attributes solely, this scenario should work as long as user attribute names stay unique. You can even add VRay User Color nodes to control the exact color through another user attribute, they should look something like this:
        Code:
        colorattribute=255,0,0
        Here is an example scene. In the scene the two spheres are grouped, but have separate materials; the group contains all the user attributes. The user scalar node controls the texture to be used from the VRay Multi Sub Tex and the user color node controls the texture's color.
        Aleksandar Hadzhiev | chaos.com
        Chaos Support Representative | contact us

        Comment


        • #5
          Fantastic, thanks for the example scene Aleksander.
          This is exactly what I was looking to do.

          Comment

          Working...
          X