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 / Alphablending transparency, thee perfect solution WANTED

Author
Message
Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 21st Dec 2011 10:39
Hello guys,

Working on a massive special effects sandbox, and i'm having some hard time making it in a way that none of the particles actually erase each other, neither cause any types of artifacts at some point.

Which is the perfect combination of both file format (i have to guess this also is a big deal since all transparency modes practically do the same for me) and transparency mode for the task?

Also are there any other commands affecting the alpha behaviour?

Spare me the disable z-'anything'- command family, i want depth in my game, which doesn't let particles from far behind look like they are in your face.

-In.Dev.X: A unique heavy story based shoot'em ~35%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Dec 2011 14:23
Fog shaddowing?

think theres already been a handful of posts on this already... but if I remember correctly the solution was a shader fx

by already... I mean recent posts in the past week

Hows you Quel and hope this helps if not go make some hot coco

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Dec 2011 17:31 Edited at: 21st Dec 2011 17:33
Quote: "Spare me the disable z-'anything'- command family, i want depth in my game, which doesn't let particles from far behind look like they are in your face."


Just shows you don't understand the commands, they don't stop depth working. There's no such thing as a perfect transparency solution, there will always be cases where it fails because the depth buffer can only store a single depth per pixel.

For transparency to work, transparent objects must be drawn after solid objects in depth order, so that near transparent objects are drawn last. With particles, having to sort them all based on depth would be quite slow, and there would be strange popping effects for overlapping particles when the order changes, so instead you disable particles' ability to write into the depth buffer, so they are obscured by other objects but cannot obscure each other. This doesn't matter because the particles are transparent objects and so are drawn last, so as long as they read from the depth buffer it doesn't matter if they don't write to it. Depth will still work.

To acheive this in DBPro, use transparency mode 2 or 3 with "disable object zwrite" on the particles.

[b]

Login to post a reply

Server time is: 2026-07-11 12:00:34
Your offset time is: 2026-07-11 12:00:34