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.

DarkBASIC Professional Discussion / Flickering Plain Objects with Alpha texture

Author
Message
Gunslinger
19
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 17th Jan 2012 18:54 Edited at: 17th Jan 2012 18:54
Hello,
i got a problem with my plain objects.
If they're on the same height, they're "flickering" if 2 Objects are on the same spot.

Got a video for example: (The Blood, flickering very good to see)
http://youtu.be/JG8GPNKYSWA

I made it with
set object transparency obj, 1

How can i fix this? Thanks.
Blobby 101
20
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 17th Jan 2012 19:06
Yeah, that's Zfighting, both objects share the exact same space on the Z axis from the camera and so the buffer can't decide which object to render in front. Move 1 object slightly higher than the other or play around with the Z-buffer settings for each object (zread, zwright etc).

Gunslinger
19
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 17th Jan 2012 19:32
Okay, its working great in combination with
set object transparency bla, 4

Thanks

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Jan 2012 19:57
Disabling zwrite isn't the most elegant solution (if that's what you're using), because it will draw over other stuff you don't want it to. There's this really cool command:

enable object zbias <obj> , <bias>

I'd set the bias value to 0.00001 and work yourself up from there if it still causes problems.

TheComet

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 18th Jan 2012 02:35
Nice little game... reminds me of the good old psone days

Gunslinger
19
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 18th Jan 2012 12:53
@TheComet
No i added every object 0.1 to it's height. So its not on the same position. (Reset after ~30 objects to 0)
But i'll try that zbias, thanks!

@MrValentine
Thank you

Login to post a reply

Server time is: 2026-07-10 10:21:02
Your offset time is: 2026-07-10 10:21:02