Forum

#1 2016-11-04 12:49:02

subdproxy
Member

Light Cones and Technical Discussion

Is there a way to transform the falloff and cone size using numerical values instead of grabbing the spotlight directly in the viewport?

Could we get a Technical Discussion category in the forum or should these questions stay in Developments? Thanks

Glen

Offline

 

#2 2016-11-04 14:44:53

Ben
Guerilla dev, the guy to hug

Re: Light Cones and Technical Discussion

Hi Glen,

Sure you can do that!
Check the Cone node inside the SpotLight, this node contains the Angle and Delta Angle inputs. So, for instance, you can do the following in Python:

Code:

import guerilla

with guerilla.Modifier () as mod:
    # lookup the Cone node inside the SpotLight
    cone = guerilla.pynode ("SpotLight|Cone")
    # and set the Angle and Delta Angle values
    # note that the cone Angle and Delta Angle are in radians
    mod.setplug (cone.getinput ("Angle").Value, 25*3.1415926/180)
    mod.setplug (cone.getinput ("Delta Angle").Value, 5*3.1415926/180)

For tech discussions, you can use the Support threads, like UI or Scripting in this case!

Cheers,
Ben


Benjamin 'Ben' Legros
Guerilla developer
http://www.guerillarender.com

Offline

 

#3 2016-11-04 15:05:54

subdproxy
Member

Re: Light Cones and Technical Discussion

Very simple and I didn't even think about going into the Node. I kept looking for it on the Root level. Thanks for the Code.

Thanks,
Glen

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB