Announcement

Collapse
No announcement yet.

VRayInstancer sets Node Render-IDs of source objects to 1

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

  • VRayInstancer sets Node Render-IDs of source objects to 1

    There are some strange things happening when using VRayInstancer related to Render-IDs. I see this in V-Ray 5 Update 1 and earlier.

    Any Source object that is used for VRayInstancer will report a Node-Render-ID of 1 (C++: INode::GetRenderID() or MAXScript: GetRenderID(node)). This only happens if the source object is actually instanced. So as long as a particle system does not yet create any particles then the Render ID of the Source object is still correct. I'm not talking about the IDs of the actual instances (that is another problem) just about the source object(s) in the scene.
    Render IDs should be unique, so there should only be a single object with a Render ID of 1 in the scene. Usually the object added last to the scene happens to receive the ID=1 at render time (which is fine), so don't be confused by that when you create a test scene.
    The correct IDs can be seen in a VRayRenderID channel (V-Ray VFB) and also in the G-Buffer Node Render ID channel (3ds max VFB). The IDs returned by INode::GetRenderID() do match the rendered channels except for the VRayInstancer source objects.

    Example code:
    Code:
    -- first render scene and then execute this
    -- this will print all objects having an Render ID of 1
    for i in geometry where GetRenderID(i) == 1 do print (i.name)
    Based on the SDK samples I found that this also influences various V-Ray built-in features:
    • VRayToon uses INode::GetRenderID to exclude/include objects
    • VRayDirt uses INode::GetRenderID to exclude/include objects
    • VRayMultiMap uses INode::GetRenderID for random by render id mode
    I also see this happening in Forest Pack Beta 7.0.4b that now seems to do instancing in a similar way as the V-Ray SDK shows (not happening in version 6 of it).

    I need a way to get the correct Render-ID from an INode pointer as it appears in the G-Buffer Node Render ID channel to properly extract/associate data from the G-Buffer.

    Daniel





    Daniel Schmidt - Developer of psd-manager

  • #2
    Can someone have a look at this. This data discrepancy is not good. I need a way to get the correct Render-ID from an INode pointer as it appears in the G-Buffer Node Render ID channel to properly extract/associate data from the G-Buffer.
    There also other related issues since V-ray simply assumes ID 1 is free to use for instances, but there will always be one object in the scene with that ID already.

    Daniel
    Daniel Schmidt - Developer of psd-manager

    Comment

    Working...
    X