Skip to content

Pi3D Light and Effects

tipam edited this page Jul 12, 2012 · 8 revisions

Add lighting and fog to your scene.

pi3d.createLight(no, red,grn,blu, name, x,y,z, ambRed,ambGrn,ambBlu)

Parameters

no - light number (0-7)

red,grn,blu - colour of light (0.0 - 1.0 float)

name - light name (string)

x,y,z - light position

ambRed,ambGrn,ambBlu - ambient colour (0.0 - 1.0 float)

pi3d.fog(density, (red,grn,blu,alpha))

Parameters

density - 0.0-1.0 (default value 0.005)

(red, grn, blu, alpha) - fog colour (0.0 - 1.0 float)