Announcement

Collapse
No announcement yet.

Technical question about VRayRenderID pass

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

  • Technical question about VRayRenderID pass

    Hi. Is there any chance you could shed some light on how Vray assings colors to objects in render elements such as VRayObjectID, VRayMtlID and VRayRenderID? In MAX's default renderer you could find assigned color using maxOps.colorById method, but obviously Vray uses different palette.

    Here are 10 boxes with assigned object ids from 0 to 9, displaying Object ID render element. Notice that it looks different in Scanline and in Vray.





    To my understanding it just shifts each of the tree color components by some coefficient, but it would be nice if you could provide with exact formula.
    Basically what I'm trying to do is ability to select a node by clicking on its rendered image in VFB. I find it useful when you need to locate some particular object that is not easy to locate in viewport. For example when scene is heavily populated with vrayproxies that display hardly recognizable version of object. Most of this tool is ready but now it uses XML parsing from VRayRenderID and I would like to avoid that. Thanks in advance.
    Last edited by Morbid Angel; 11-03-2014, 12:48 PM.
    Dmitry Vinnik
    Silhouette Images Inc.
    ShowReel:
    https://www.youtube.com/watch?v=qxSJlvSwAhA
    https://www.linkedin.com/in/dmitry-v...-identity-name

  • #2
    See vraysdk/include/color.h, the makeIntColor() method; it should be fairly easy to invert the formula.

    Also, all of these channels are really integer channels and you should be able to read the ID value directly in Nuke, for example.

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

    Comment


    • #3
      Wow that was fast! Thanks Vlado!
      Dmitry Vinnik
      Silhouette Images Inc.
      ShowReel:
      https://www.youtube.com/watch?v=qxSJlvSwAhA
      https://www.linkedin.com/in/dmitry-v...-identity-name

      Comment


      • #4
        By the way I think it would be nice to have such function in VFB - to click on object's rendering to select it in scene.
        Dmitry Vinnik
        Silhouette Images Inc.
        ShowReel:
        https://www.youtube.com/watch?v=qxSJlvSwAhA
        https://www.linkedin.com/in/dmitry-v...-identity-name

        Comment


        • #5
          It could be a handy feature to re-render based on the selected object too! Have vray auto generate a mask from the integer channel so you could tweak a single object?

          Comment


          • #6
            It is not impossible, certainly... but you can also just select that object in the scene directly.

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

            Comment

            Working...
            X