CameraGlow
Makes bright areas glow.
CameraGlow camera,enable[,intensity#][,threshold#]
Parameters
- camera
- camera handle
- enable
- True to switch glow on, False to switch it off
- intensity# (optional)
- strength of the glow. Defaults to 1.
- threshold# (optional)
- how bright a part of the picture must be before it glows. Defaults to 1; lower values make more of the picture glow.
Description
Glow (also called bloom) makes the brightest parts of the picture bleed light into their surroundings, like a bright light seen through a camera lens. , off unless a program switches it on.
With the default threshold only things brighter than white glow: entities given their own light with EntityGlow, and strongly lit surfaces. Lower the threshold to make more of the scene glow.
Glow is set for each camera.
Example
; Ambient occlusion and glow example (ArcBasic extensions); A toggles ambient occlusion, G toggles glow, Escape quitsGraphics3D 640,480SetBuffer BackBuffer()camera=CreateCamera()PositionEntity camera,0,4,-9TurnEntity camera,20,0,0CameraClsColor camera,10,10,25AmbientLight 120,120,130light=CreateLight()RotateEntity light,60,40,0LightColor light,140,140,140ground=CreatePlane()EntityColor ground,180,180,180For i=0 To 2 box=CreateCube() PositionEntity box,-3+i*3,1,2+(i Mod 2) EntityColor box,200,200,200Next; this ball gives off its own light, so it glowslava=CreateSphere(16)PositionEntity lava,-1.5,1,-1EntityColor lava,255,80,40EntityGlow lava,2ball=CreateSphere(16)PositionEntity ball,1.5,1,-1EntityColor ball,60,160,255ao=True : glow=TrueCameraAmbientOcclusion camera,aoCameraGlow camera,glowWhile Not KeyDown(1) If KeyHit(30) Then ao=Not ao : CameraAmbientOcclusion camera,ao If KeyHit(34) Then glow=Not glow : CameraGlow camera,glow RenderWorld Text 0,0,"A: ambient occlusion G: glow" FlipWendEnd
