Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / Sync Mask is not quite dealing with camera IDs

Author
Message
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 14th Nov 2012 19:24 Edited at: 14th Nov 2012 19:29
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.



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.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 15th Nov 2012 23:28
I agree. I mentioned this to Lee some time back but I think he misunderstood what I said and I was too busy at the time to pursue it and then forgot about it. As you say there is a simple workaround.
Chris Tate
DBPro Master
15
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 29th Nov 2012 13:03
Oh OK. This caught me by suprise, I was wondering why I couldn't see anything on the screen.

Login to post a reply

Server time is: 2024-03-28 19:21:47
Your offset time is: 2024-03-28 19:21:47