環境効果の操作

次のスクリプトでは、ボリューム フォグおよびボリューム ライトの環境効果の例を示します。

スクリプト:

    -- Atmospheric Effects Test Bed
    -- create a geosphere, sphere gizmo, onnilight, and targetted camera
    geos=geosphere radius:24
    sgizmo=spheregizmo radius:40
    omni=omnilight farAttenStart:20 farAttenEnd:100 useFarAtten:true v=255
    cam=targetcamera pos:[150,-50,100] target:(targetobject())
    --
    -- put a material on the geosphere
    geos.material=standard ()
    geos.material.selfIllumColor = color 238 241 2
    --
    -- create a Volume Fog atmospheric. Set name so it has one in Environment dialog.
    vf=volume_fog name:"VolFog" soften_gizmo_edges:0.7 exponential:1 density:75
    vf.fog_color=color 255 157 0
    vf.noise_type=2
    vf.size=4
    appendGizmo vf sgizmo
    addAtmospheric vf
    --
    -- create a Volume Light atmospheric. Set name so it has one in Environment dialog.
    vl=volume_light name: "VolLight" exponential:1 density:20
    vl.fog_color=color 255 30 0
    vl.attenuation_color= color 255 162 0
    vl.Use_Attenuation_Color=1
    vl.noise_on=1
    vl.Noise_Amount=1
    vl.size=5
    vl.noise_type=2
    appendGizmo vl omni
    addAtmospheric vl
    --
    -- and render away...
    renderWidth=320
    renderHeight=200
    render camera:cam