Announcement

Collapse
No announcement yet.

Access VRayLightMeter values during MEL script execution

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

  • Access VRayLightMeter values during MEL script execution

    ​Hi, as the title says, i would like to iterate through the values of the "Total" array of the VRayLightMeter utility during a script execution to calculate the average number.
    Currently i have to export the values as an CSV file and calculate there the "average" value of the "Total" array value numbers.
    My question is, is it possible to access those directly through MEL?
    I could not find any examples for calculating the average sum in the documentation.

    I know there was a way in MAX Script for this (see example).
    Code:
    // Get the average value of VRayLightMeter points
    function lightMeterAverage &vrayObject = (
    arrayMean vrayObject.total
    )
    Is there a MEL equivalent?

    Click image for larger version

Name:	numbers.png
Views:	121
Size:	466.9 KB
ID:	1204653 Click image for larger version

Name:	lightmeter plane.png
Views:	100
Size:	591.1 KB
ID:	1204654 Click image for larger version

Name:	lightmeter attribute.png
Views:	101
Size:	98.9 KB
ID:	1204655

  • #2
    In excel can you just sum the column then divide the amount in this case 35.

    Comment


    • #3
      Hi stezza, thanks for the reply.
      Is there a way to do this directly in MEL, without the need to use excel?

      Comment


      • #4
        I wouldnt have a clue as to where those numbers are stored, devs should know if they are accessible to mel.
        sorry dude, cant help on this one.

        Comment


        • #5
          Hi, this function is completed. It returns the average value of the VRayLightMeter with vray getLightmeterAverageValue function. For more information you can check our docs page: https://docs.chaos.com/display/VMAYA/VRayLightMeter The function is implemented in v6.20.02, revision 32566 from Apr 25 2024.

          Code:
          vray getLightmeterAverageValue VRayLightMeter1 "total";
          // VRayLightMeter1 is the name of the Lightmeter.
          ​​
          Last edited by borislav_konstantinov; Yesterday, 02:59 AM.

          Comment


          • #6
            Amazing, thank you!!

            Comment

            Working...
            X