Announcement

Collapse
No announcement yet.

Lighting - Light linking / Include Exclude list of objects

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

  • Lighting - Light linking / Include Exclude list of objects

    Hi there,

    I am creating a shot with several assets imported as reference. In some of those assets, there are Vray lights already setuped.
    I want the lights of a referenced asset to only have impact on the meshs of it's own reference.

    ♦ The default behavior for the light is to illuminate everything.
    I'd like to prepare the lights directly in their assets so that they have a fixed list of meshs to light, so that when I import the asset in the shot scene the lights are already linked to the meshs of the asset it belongs to.

    I could not find a way to set a meshs "include list" on the lights, is it possible in vray?

    ♦ Second solution, which I don't really like: using light linking once in the shot scene.
    I tried light link through a script, but it completly break the scene because there are way too much objects: apparently maya creates a connection for every shape when breaking a light link. As I have thousands of objects in the scene, simply trying to break the conneciton from one light takes more than 10 minutes, then the maya scene is way too slow to work with... And I have more than ten lights to setup.

    Apparently it is possible to create an object set to light link a light to a set and not to thousands of different objects (as stated in cmds.lightlink help page), but it does not seem to work with vray (it does not change anything to the render).
    I know that in renderman, we have to add a prman attribute to the object set so that it is understood by the render engine: is it necessary in Vray too? If so, Ho can I achieve that?

    Is there any solution for this?

    Thanks,

    Ben
    Last edited by BenWall; 06-08-2020, 03:35 AM.

  • #2
    Light linking is a Maya feature so nothing to do with Vray. That said, I don't believe there is a simple way to achieve what you want, and referencing and light linking in general don't play nice together. Your best bet might be to create a render layer in your referenced (source) scenes containing just geo and lights which will import into your master (referencing) scene. That's assuming you don't need explicit light linking even within each asset. You'd then of course need to render your scene out in those layers and comp them together. However, since you mentioned the scene is large that's probably not much of a solution.

    Comment


    • #3
      Hey SonyBoy, thanks for your answer.

      Rendering the different render layers would be very complicated for the rendering / compositing process considering the number of references I need, and I need reflections of the referenced assets on other stuff.

      With other render engines, I could use light blockers or lighting include lists, a volume blocker to force the lights in a specified volume... There is absolutly nothing in Vray to do that kind of tricks?

      Ben
      Last edited by BenWall; 07-08-2020, 04:45 AM.

      Comment


      • #4
        I guess it may be too late to join the discussion, but here I go anyway.

        The Light Linking editor in Maya can be used to filter lights and objects based on their name and the filter can be inverted.
        This way you can filter all lights in a specific namespace (referenced scenes are basically namespaced). Then filter the inverse of the same namespace for objects and break the light links.
        This will essentially make the lights from one reference scene only affect the objects from the same reference.

        Click image for larger version

Name:	image_59860.png
Views:	3998
Size:	65.5 KB
ID:	1086388


        The downside will be that even with the help of filters, this may require too many clicks.
        Alternatively, V-Ray's post-translate python script can be used to gather and filter the lights and objects and directly set that into V-Ray's SettingsLightLinker (essentially the list that V-Ray receives under the hood based on Maya's Light Links).
        I've done a sample script that works as a proof of concept, but it doesn't (yet) account for more than one namespace, so if needed - I can extend this and it should be easier.

        Hope that helps in some way.
        Alex Yolov
        Product Manager
        V-Ray for Maya, Chaos Player
        www.chaos.com

        Comment


        • #5
          Thanks Alex, good tip!

          Comment


          • #6
            Hey there,
            Thanks for your input Alex.

            Another question about light linking:

            How can I link a light to an object set? It seems neither maya object set or vray object properties set is working, I have to link each light to each member of the set, which makes maya really slow.
            Is there a vray attribute to add somewhere?

            Edit: it looks like this is working using the Relationship Editor - Object Centric mode, but not in Light centric mode.
            Last edited by BenWall; 09-02-2021, 06:07 AM.

            Comment

            Working...
            X