ArcBasicDocs

help/commands/3d_examples

EntityGlow.abs

48 lines of ArcBasic. Words in colour that are commands link to their help page. To run it, download ArcBasic, open the file and press F5.

Download EntityGlow.absAll files in this folder

EntityGlow.abs
; 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