Announcement

Collapse
No announcement yet.

Vray plug-in LightRectangle not working?

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

  • Vray plug-in LightRectangle not working?

    Hi,

    I am trying to mimic the sun light via using Vray LightRectangle plug-in and setting its "is disc" on. However, I can't wrap my head around to get this node to work in Maya. Here below are some screen shots. I tried to plug a sun disc cropped from Nuke as texture but no matter how I tweak each parameters (intensity, diffuse contribution etc), I couldn't see its diffuse contribution to the scene?

    Am I using it right or I am missing something?

    Also, there is no viewport manipulator support for this light plug-in yet which I hope isn't a big issue if I can probably use a aim constraint to control the direction of the light.

    Thanks!

    Click image for larger version

Name:	01.jpg
Views:	1
Size:	18.6 KB
ID:	883423
    Click image for larger version

Name:	02.jpg
Views:	1
Size:	62.6 KB
ID:	883424
    Click image for larger version

Name:	03.jpg
Views:	1
Size:	7.4 KB
ID:	883425
    always curious...

  • #2
    It will be probably easier if you use the standard rect light with a script like this:
    Code:
    from vray.utils import *
    
    findByType("LightRectangle")[0].set("is_disc", 1);
    V-Ray/PhoenixFD for Maya developer

    Comment


    • #3
      ivaylo, in a empty new scene, I have tried executing the script you provided with or without a newly created standard rect light being selected. I got the error below

      Code:
      # Error: Exception: file C:\Program Files\Autodesk\Maya2016\vray\scripts\vray\utils.py line 44: The vray.pluginmodifier module wasn't initialized properly. One possible reason for this error is that you are trying to execute the script from the Script Editor. The script must be placed inside the special field that V-Ray provides for Python code (Render Settings / VRay Common / MEL/Python Callbacks / Post Translate Python Script) #
      I am on Windows 7 x64, Maya 2016. V-Ray for Maya 3.1. I executed it as Python script.

      Thanks.
      always curious...

      Comment


      • #4
        Well, the error message says it all.
        V-Ray/PhoenixFD for Maya developer

        Comment


        • #5
          The error message basically says you're not using the script in the right place.

          1. You should open the Render Settings first and select V-Ray
          2. Open up the MEL/Python callbacks section
          3. Paste the script ivaylo.ivanov gave you

          See an example here: http://i.imgur.com/VwcqRJ4.png

          Also, the script ivaylo.ivanov wrote would change just one light rectangle. If you want to affect *all* light rectangles, you can use another variation: http://pastebin.com/vbx3mFp9
          Yordan Miladinov V-Ray for Maya developer

          Comment


          • #6
            Thanks ivaylo...My bad to not scroll to the right enough to check the whole message. It is working as expected now, Unfortunately not working with RT, as soon as I move the light, it changes to rect shape again....

            Will the UI of "is disc" being exposed for upcoming Maya? I remember this is available for Max for a while....
            Last edited by jasonhuang1115; 25-01-2016, 11:12 AM.
            always curious...

            Comment


            • #7
              Originally posted by ydm View Post
              The error message basically says you're not using the script in the right place.

              1. You should open the Render Settings first and select V-Ray
              2. Open up the MEL/Python callbacks section
              3. Paste the script ivaylo.ivanov gave you

              See an example here: http://i.imgur.com/VwcqRJ4.png

              Also, the script ivaylo.ivanov wrote would change just one light rectangle. If you want to affect *all* light rectangles, you can use another variation: http://pastebin.com/vbx3mFp9
              Thanks ydm. Really appreciate it!
              always curious...

              Comment


              • #8
                Ok, will write a note to add a proper UI for the disk shape.
                V-Ray/PhoenixFD for Maya developer

                Comment

                Working...
                X