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!



It will be probably easier if you use the standard rect light with a script like this:

from vray.utils import *

findByType("LightRectangle")[0].set("is_disc", 1);

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

# 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.

Well, the error message says it all.

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: Imgur: The magic of the Internet

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: from vray.utils import findByTypefor light in findByType('LightRectangle'): - Pastebin.com

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…

Thanks ydm. Really appreciate it!

Ok, will write a note to add a proper UI for the disk shape.