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. It isn't working

Author
Message
coolgames
18
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 21st May 2006 06:25
Here's my code:



That should make it so it doesn't render camera 0, right? From what I've asked, it should work. Except that I get a completely black screen instead of a half black screen. Is this a bug or am I doing somthing wrong? If I'm doing somthing wrong, the help files need to be updated so people know what they are doing with it.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st May 2006 18:01
I agree - I couldn't find a setting which just renders camera 1. I tried the following:

mymask as dword=0 (then 1,2,3,4,5,6,7, etc)

and got the following results:

0 neither camera (OK)
1 just camera 0 (OK)
2 neither camera (I expected to get just camera 1)
3 both cameras (OK)

this then repeats in the same way as you step through 4, 5, 6, etc.

Looks like a bug to me.
EVOLVED
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: unknown
Posted: 21st May 2006 23:46 Edited at: 21st May 2006 23:47
There dose seem to be a problem with the black screen when camera 0 doesn't get rendered.

@Green Gandalf
Use hex to mask cameras,
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd May 2006 14:05
@Evolved
You've made incredibly heavy weather of a simple matter. The number "3" has the first two bits set to 1 - which should render cameras 0 and 1 according to the help file. Similarly, the decimal number 26 has bits 5,4 and 2 set (i.e. 26=16+8+2) and should render cameras 1, 3 and 4, but doesn't.

The hex notation is just another way of representing numbers (to base 16, so F represents the number 15 - or 1111 in binary, i.e. all four bits set to 1, so F(hex)=15(decimal)=1111(binary)). DBP does the necessary conversions of all of these to the final binary form for you, so you can use whichever you prefer.

I'm used to using decimals for representing numbers. If you want to use hex for numbers, fine.
EVOLVED
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: unknown
Posted: 22nd May 2006 21:44
Your right ,

It will be a lot easyer to Use this

dim cam(3)
cam(0)=1
cam(1)=1
cam(2)=1
cam(3)=1
Mask=cam(0)+(cam(1)*2)+(cam(2)*4)+(cam(3)*8)
sync mask Mask
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 22nd May 2006 23:28
Well IMO hex is easier for syncing multiple cameras at the same time, but as GG stated ... if you just want to sync 1 camera and no others you can use the dword/ value method.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd May 2006 00:08 Edited at: 23rd May 2006 00:12
Quote: "Well IMO hex is easier for syncing multiple cameras at the same time"


I don't see it. How would you code it in a transparent way? Suppose you wanted to sync cameras 0,3 and 5, and mask cameras 1, 2 and 4. Evolved's way is easy to understand, and can be put into a simple loop like:



DBP doesn't care whether mask is an integer or a dword - and that loop is the same whether you use base 10 or base 16!

[Edit:
Quote: "but as GG stated ... if you just want to sync 1 camera and no others you can use the dword/ value method."


I didn't say that. You can use simple decimal integers (or DBP integers/dwords) to mask as many cameras as you wish - you just need to get the powers of 2 right. How is hex easier in this respect?]
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 23rd May 2006 00:43
Probably because I think in hex better for multiple bits. You can add the flags just like working with FVF formats and use a #constant method as well. What if you wanted to render all camreas but 0 using just numbers. Much easier to use hex or a #constant method to me.

In any case and back on track ... why doesn't his code work.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd May 2006 12:03
Quote: "What if you wanted to render all camreas but 0 using just numbers. Much easier to use hex or a #constant method to me.
"


Unless you have a ridiculous number of cameras, what could be simpler than something like:
mask=2^20-2
?

Actually, I think the binary representation is more obvious than either decimal or hex when you want to set particular bits - but I prefer decimals because I'm used to them. A matter of personal taste really.

[quote]In any case and back on track ... why doesn't his code work.

Indeed.
Space Fractal
19
Years of Service
User Offline
Joined: 5th Apr 2004
Location: Denmark
Posted: 13th Jun 2006 00:34
Sorry to bump this thread.

I'm trying to make a split screen feature for my game, and need to sync only the first player camera, and then the next player camera. Im need this so the skybox and the background dosen't position wrong.

But when I trying to use Sync Mask 0x00000004 for Camera 2 (wich is player 1 screen), it won't work at all, and just got a "blank" screen.

So I can confirm this command just seen not working at all, or do Im somebody wrong here?

At last, should Sync Mask Mask Value not been renamed to Sync Mask Camera,Boolean to give more mean and not hasle the inhuman hex values?

http://www.PlayITgame.org
NeX the Fairly Fast Ferret
18
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 14th Jun 2006 19:40
Sync [camera as byte]
Can't that be done with just Sync for all cameras?

<OMG></OMG>
NeX, you cant be serious - CattleRustler.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 20th Jan 2012 04:00
I found anther forum that has been open for way longer than I thought it would be

the current count is #7 that I have found and 3 that I posted messages to

to move side ways - is to move forward
Since a Strait line gets thin fast
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Jan 2012 18:57
I'm surprised this was marked as Confirmed.

Looking back on it now I'm fairly sure that you must have camera 0 synced in order to see anything on screen so a better version of coolgames original snippet would be



That code works perfectly for me (U77).

So in my opinion this bug should be marked as Fixed or Rejected but certainly not confirmed.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Jan 2012 19:09
@Green Gandalf

your example works in DBP 7.61
Green on the left
Yellow on the right

a box in the center on each

now the sync mask command makes a little more sense
well despite its binary thinking

to move side ways - is to move forward
Since a Strait line gets thin fast
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Jan 2012 19:21
Quote: "now the sync mask command makes a little more sense
well despite its binary thinking"


Good.

It's fairly standard practice to construct masks or options that way - but usually the binary stuff is hidden behind the scenes so when you choose a set of ON/OFF options by pressing buttons the application does the binary calculation for you and you never see it. It means you can pack 32 options or "flags" into a single DWORD.

I agree that a more user friendly way might be possible for the cameras. Not sure what though. The "sync camera camID" is a simple way, but mildly cumbersome when there are multiple cameras. At least the current method works.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Jan 2012 19:29
I know people want to go split screen for games and other things like 3d creation programs which is possible

not to say easy to do

but for pc's it's not rile that important at least for me

I've spent many hours collecting every thing DBP and a few other examples
I believe with time I can recreate

it's just getting every thing lined up is ware we all get trashed

to move side ways - is to move forward
Since a Strait line gets thin fast
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Jan 2012 19:44
@EVOLVED

posted example dated 22nd May 2006 07:44

dim cam(3)
cam(0)=1
cam(1)=1
cam(2)=1
cam(3)=1
Mask=cam(0)+(cam(1)*2)+(cam(2)*4)+(cam(3)*8)
sync mask Mask

this seams the best way to enact the intended affect


anther way to do is is

cmA=1:cmB=1:cmC=1:cmD=1
Mask=caA+(caB*2)+(caC*4)+(caD*8)
sync mask Mask

saves on memory and cuts down code
and less likely those words will be used

to move side ways - is to move forward
Since a Strait line gets thin fast
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Jan 2012 19:59
ok now it's a function . I hope

MaskS(1,1,1,1)

function MaskS(Ca as dword,Cb as dword,Cc as dword,Cd as dword)
Mask=Ca+(Cb*2)+(Cc*4)+(Cd*8)
endfunction

this should take up less memory and quick to run

please tell me if I got it right

to move side ways - is to move forward
Since a Strait line gets thin fast
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Jan 2012 20:06
woops

tiny correction

function MaskS(Ca as dword,Cb as dword,Cc as dword,Cd as dword)
Mask=Ca+(Cb*2)+(Cc*4)+(Cd*8)
endfunction

to move side ways - is to move forward
Since a Strait line gets thin fast
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Jan 2012 20:10 Edited at: 22nd Jan 2012 04:57
ok correction again

function MaskS(Ca as dword,Cb as dword,Cc as dword,Cd as dword)
Mask=Ca+(Cb*2)+(Cc*4)+(Cd*8)
sync mask Mask
endfunction

that should be it

and if more cameras are needed it would be

Camera 4 = Ce*16
Camera 5 = Cf*32

it least it seams likely

to move side ways - is to move forward
Since a Strait line gets thin fast

Login to post a reply

Server time is: 2024-03-28 09:19:51
Your offset time is: 2024-03-28 09:19:51