I\'ve been working on transition effects and experienced an issue with the number of cameras you can mask.
The Sync Mask accepts an integer, limiting expressions ( 2 ^ Camera id ) to 32 bits.
Any ideas how to use up the other 32 bits? 64 bit mask possible?
Run this code and move your mouse up and down. The green line only shows up on camera 32 (Actually, the green line is the real scene)
The other way to produce special effects using different views is to render scene manually with one camera with however many settings you need; but it would be good to know if 64 bit masks are possible. Sync Mask will not take a double integer.
`%Project Title%
`CameraGradientEffect.dba
`======================
Color Backdrop 0x00FF00
Backdrop On
Make Light 1
Set Point Light 1, 40,40,-30
Color Light 1, Rgb(255,0,255)
Set Ambient Light 0
Cameras = 64
w = Screen Width()
h = Screen Height()/Cameras
Make Object Cube 1, 30 : Color Object 1, Rgb(255,0,255)
` Make a series of cameras
For i = 1 to Cameras
Make Camera i
Set Camera View i, 0,(i-1)*h,w,i*h
Color Backdrop i, Rgb( i*(255/Cameras),i*(100/Cameras),100)
Position Camera i, Camera Position x(0), Camera Position y(0), Camera Position z(0)
Rotate Camera i, Camera Angle x(0), Camera Angle y(0)+((i-(Cameras/2))*15), Camera Angle z(0)
Next i
Sync On
Mask as Double Integer
Do
` Turn off the camera render under the mouse
Mask = 0
For i = 0 to Cameras
If i = 0 Or ( MouseY() < ((i-1)*h) Or MouseY() > (i*h) )
Mask = Mask + ( 2 ^ v )
EndIf
Next i
Turn Object Left 1, Sin( WrapValue(MouseY()))*0.2
Set Cursor 0,0
Print Screen Fps()
Sync Mask Mask
Sync
Loop