Announcement

Collapse
No announcement yet.

Vray Light Directonality and intensity.

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

  • Vray Light Directonality and intensity.

    I have been fiddling around with the light directionality vs intensity.

    I've generated a number of scripts that automate the testing process.

    If I used VRAY light meter to measure intensity at a given distance vs directionality I get a graph of points. I am using a linear method to generate the variation in direction (see script).

    the numbers do jump around a bit and there is a funny s shaped curve at the top. I tried working on a polynomial to establish the relationship, and I thought I saw a sine wave periodicity in the graph.
    But I think its actually a rounding error from something either in the Light meter, or the algorithm that is generating the intensity.
    Something like using an INT when the value should be float.

    If you look at the graph it has these wierd jumps...
    Raj
    here is the MXS code
    Code:
    animate off
    LtTesttarg = targetobject pos:[0,0,0] name:"TestLight.target"
    LtTest = vraylight pos:[0,0,100] targeted:true name:"TestLight"  width:5 height:5 normalizecolor:3 multiplier:1.0 preview_distribution:1 lightDistribution:0.0
    LtTest.target = LtTesttarg
    ltMeter = VRayLightMeter active:true width:10 length:10 orient:true colors:true text:true max:100000.0 min:0.0 pos:[0,0,0]
    MeterReadings = #()
    GraphPoints = #()
    with animate on 
    (
    	at time 0 ltTest.lightDistribution = 0.0 
    		
    	at time 90 ltTest.lightDistribution = 1.0
    		
    		
    )	
    ltTest.lightDistribution.controller.keys[1].outTangentType = #linear
    ltTest.lightDistribution.controller.keys[2].inTangentType = #linear
    for i = 0 to 90 do 
    (
    	slidertime = i
    	ltMeter.calculate()
    	MeterReadings[i+1] = ltMeter.direct[5]
    	format "Angle: % Reading: % \n" i MeterReadings[i+1]
    	DistReading =  ltTest.lightDistribution * 100.0
    	if (MeterReadings[1] != 0 or MeterReadings[1] != undefined) do	GraphPoints[i+1] = point pos:[DistReading,-20,MeterReadings[i+1]/MeterReadings[1]] cross:false centermarker:true box:false
    	j = 	(1.043^i)
    	k = point pos:[i,-30,j ] centermarker:false  cross:false axistripod:false box:true size:1.0
    )
    Last edited by rajdarge; 26-08-2016, 06:40 PM.
Working...
X