Model.setlightsource#
- Model.setlightsource(x, y, z)#
Set direction of the global light source.
- Parameters:
x (double) – X axis location, horizontal direction of screen.
y (double) – Y axis location, vertical direction of screen.
z (double) – Z axis location, in/out of screen.
Note
This function may be used in either the “hm.cfg” file or from a function file.
The default setting is
x=0.0,y=0.0andz=1.0(represents model lighting as you view it).Example#
Set the global light source with the default settings#import hm import hm.entities as ent model = hm.Model() model.setlightsource(x=0.0,y=0.0,z=1.0)