Announcement

Collapse
No announcement yet.

Single VRayMtl with object diffuse based on object's wirecolor

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

  • Single VRayMtl with object diffuse based on object's wirecolor

    Hi Guys

    Here's something simple I put together. It will let you render multiple object's wirecolor as diffuse, running of just a single VRayMtl

    1) Add a single "VRayMtl" to all your objects
    2) In the diffuse slot, stick a "VRayUserColor"
    3) In the Attribute name, add "diffuse_col_from_wire"
    don't add the quotation marks as part of the attribute name, just the name
    4) Select all the objects you want the script to affect
    5) Run this script:

    Code:
    for obj in selection do
    (
        dcfw = (color (obj.wirecolor.r/255)(obj.wirecolor.g/255)(obj.wirecolor.b/255))
        setUserProp obj "\ndiffuse_col_from_wire" ((dcfw.r as string) + "," + (dcfw.g as string) + "," + (dcfw.b as string))
    )
    click Render and have fun
    Kind Regards,
    Morne

  • #2
    This might be useful, thanks for sharing!

    Comment


    • #3
      Here's an example of how to change vraytoon color per object, based on wirecolor, and a single vraytoon element

      https://forums.chaosgroup.com/forum/...18#post1114018
      Kind Regards,
      Morne

      Comment

      Working...
      X