Sync Mask
Quote: "The parameter is a DWORD mask, which by default is set to 0xFFFFFFFF. You can adjust this mask to filter out the cameras you do not wish to render. Camera zero is represented in bit 1, camera one in bit 2, and so on. A bit state of zero means the camera will not be rendered, and a bit state of 1 means the camera will be rendered, as is the default behaviour. "
This code demonstrates that the above documentation is not always true.
Make Camera 1 : Set Camera View 1, 200, 100, 300, 200 : Color Backdrop 1, Rgb(255,0,0)
Make Camera 2 : Set Camera View 2, 200, 200, 300, 300 : Color Backdrop 2, Rgb(255,255,0)
Make Camera 3 : Set Camera View 3, 200, 300, 300, 400 : Color Backdrop 3, Rgb(255,0,255)
Make Camera 5 : Set Camera View 5, 200, 400, 300, 500 : Color Backdrop 5, Rgb(0,255,0)
Sync On : Sync Rate 60
Autocam Off
Make Object Cube 1, 1
Move Camera 1, 4
Move Camera 2, 4
Move Camera 3, 4
Move Camera 5, 4
Point Camera 1, Object Position X(1), Object Position Y(1), Object Position Z(1)
Point Camera 2, Object Position X(1), Object Position Y(1), Object Position Z(1)
Point Camera 3, Object Position X(1), Object Position Y(1), Object Position Z(1)
Point Camera 5, Object Position X(1), Object Position Y(1), Object Position Z(1)
Do
Text 0, 0, "FPS: " + Str$(Screen FPS())
Sync Mask 2^0 || 2^1 || 2^2 || 2^3 || 2^4 || 2^5
//Sync Mask 2^0 || 2^1 || 2^2 || 2^3 || 2^5
Sync
Loop
If you make cameras 1, 2, 3, 4, & 5; you can mask them in or out with no problems; but if any camera has not been created, the rule is no longer true.
If you make camera's 1, 2, 3 & 5. Sync Mask 2^5 does not reveal camera 5. It's as if it did not exist. However, Sync Mask 2^4 reveals it; there are four cameras, so even if you make camera 1, 2, 3 and 20. Sync Mask 2^4
will reveal camera 20, and 2^20 will not.
The work around is to create all cameras. Doing so means that Sync Mask 2^N or Bit Flip(SyncMask, CameraId) will work. But this is not made very clear in the docs.
(Set Object Mask 2^5 works the way you'd expect)
The Object
The object should be visible on all cameras; but it is not. Sync Mask 2^4, has drawn camera 5, but masked its objects. I'm assuming that 2^5 will try to reveal the 5th existing camera (excluding camera zero) which does not exist due to skipping the creation of camera 4, whilst revealling the object in camera 5 which is not drawn.