Announcement

Collapse
No announcement yet.

SettingsLightLinker and V-Ray Scene Access in Maya?

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

  • SettingsLightLinker and V-Ray Scene Access in Maya?

    I've been writing some light linking tools that edit the vrscene using the Post-Translate Python Callback, but I seem to be unable to set the value of the ignored_lights parameter on the SettingsLightLinker plugin.

    The type of this parameter appears to be a list of lists, with each list containing a light plugin followed by the excluded shape node plugins:

    Code:
    SettingsLightLinker settings_lightlinker {
      ignored_lights=List(
          List(
            light1Shape,
            pSphereShape1@node
          )
      );
      ignored_shadow_lights=List();
    }
    When trying to use the set() function in the vray.utils python module for the ignored_lights parameter, I get no change in the parameter's value. I've tried various permutations of the data structure, like using the plugin names rather than the plugin objects themselves, but nothing seems to yield a result.

    Maybe this functionality of setting a value to a list of lists is not yet implemented? Or maybe there is a custom V-Ray type that I am not seeing? I'd like to use the provided functions and not have to resort to a hacky solution like parsing the .vrscene directly.

    Has anyone successfully edited the ignored_lights parameter of the SettingsLightLinker plugin using Python V-Ray Scene Access in Maya? Does this functionality even exist?

  • #2
    I don't think it is possible for the moment to directly edit the ignored lights list; we will need to create a special parameter type for accessing the data in it (like we have for colors, matrices etc). I will make a note for this. How urgent is it?

    It is always possible to processes the generated .vrscene file afterwards, although this might be more complicated.

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

    Comment


    • #3
      Well, we have built a pretty complex and robust pipeline tool and basically we hit a brick wall with light linking. We have light inclusions working by setting the 'light' parameter on the shape node plugins, but exclusions are not working for the reasons described above.

      I know that I could explicitly set the 'light' parameter of every single shape node, including all lights but the ones I want to exclude, but I just don't think its efficient for scenes with thousands of objects. We would really love to be able to edit the 'ignored_lights' and 'ignored_shadows' of the SettingsLightLinker via the python api without having to parse the vrscene.

      I will look into some of the other solutions, but obviously I would prefer an elegant one.

      Thanks Vlado!

      Comment


      • #4
        Ok then, will see what can be done about it - ideally it should not be too hard to give proper access to that parameter.

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

        Comment


        • #5
          No need to look for other solutions. The problem should be fixed in the next nightly build. You should be able to change the value of the parameter by simply passing a list of lists:
          Code:
          lightLinker.set("ignored_lights", [[light0, node0, node1, ...], [light1, node0, node1, ...],...])
          where light0, node0 and node1 are plugins, not names.

          Best regards,
          Vasil Velikov
          V-Ray for Maya developer

          Comment


          • #6
            We just tested it in the latest nightly build and it appears to be working perfectly. Thank you!

            Comment

            Working...
            X