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 / Tricky ghosting for light effect

Author
Message
AGL
18
Years of Service
User Offline
Joined: 13th Jan 2008
Location:
Posted: 7th Dec 2010 14:58 Edited at: 7th Dec 2010 15:20
Hey everyone,

I'm having some problems with ghosting / transparency for purposes of lighting or shining. Here's what I have:
-play area: a textured plain
-an inverse ghosted plain for cloud shadows (from cloud shadow map texture) that scrolls above play area.
-plain between the play area and the cloud layer with glow texture. This one is also ghosted.

I merge this 3 layers together with 'disable object zwrite' so ghosted layers appear correctly, BUT...!

The problem is, that the darker the overlapping parts of the cloud map above the glow plain, the darker and duller the glow will be. Its obvious that its because dark pixels are added to the light pixels of the glow, but since the glow must be light, I'd like the glows to be uneffected by the cloud shadows. Is there a way to do it? Im experimenting around with this for a while with no success

Pls take a look at the attachment to see my problem.

"The business in the business is the business"
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 7th Dec 2010 15:12
Hmm, not 100% sure from those screenies what the exact problem is,they are a little small to see a lot. I can't see shadows just a texture. Maybe a video would be better or a demo?

http://s6.bitefight.org/c.php?uid=103081
AGL
18
Years of Service
User Offline
Joined: 13th Jan 2008
Location:
Posted: 7th Dec 2010 15:21
Ok, I changed the attachment, so its now more clearly visible and also wrote a description of the problem and what i need. Hope this is better now.

"The business in the business is the business"
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 7th Dec 2010 16:18
Perhaps alpha transparent textures would do a better job. If you have an alpha trans version of that mouse pointer for instance - you would disable lighting on it, so it will be fully bright. Then because it's an alpha trans texture, it would over-ride what is there, rather than trying to add to it. I find alpha trans is really good for thicker particle effects, grey smoke for instance - it has a much more direct control over things.

Health, Ammo, and bacon and eggs!
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 7th Dec 2010 16:30
Ah yes I see from the larger pic now. Alpha is probably your best bet as VanB said. Just set your initial image opacity to less than 100% in your paint package.

http://s6.bitefight.org/c.php?uid=103081
AGL
18
Years of Service
User Offline
Joined: 13th Jan 2008
Location:
Posted: 7th Dec 2010 16:51
Well yeah, I load everything with object light set to 0 (fog also) so this have nothing to do with it. Regarding alpha, the glows are using transparent png-s tho I'm not sure if i use it correctly as i'm not using object alpha parameter at all now. I'll give a try to it now, thanks for the feedback

"The business in the business is the business"
AGL
18
Years of Service
User Offline
Joined: 13th Jan 2008
Location:
Posted: 7th Dec 2010 20:44
Well, I think this won't work either, or I don't know the right method.. could you please tell me how to do this? I mean, do I need transparent png-s with set alpha mapping and set object transparency command?

"The business in the business is the business"
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 7th Dec 2010 20:59 Edited at: 7th Dec 2010 22:01
I always have troubles with alpha myself lol. Are you setting your main layer opacity to less than 100% so you can see through all of the object? Or have you just a alpha edge around it, like just using black for the blank part in a bmp for instance? If you only have an alpha edge you won't get any transparency in DB. Perhaps posting your glow image would be best, then we can look at it and fix it or point you in the best direction.
Ok had a quick play and using planes I get similar issues, but the quick images I have knocked up look worse than yours. So hard to tell lol. Would you not be better going full 3d? DB always seems to have niggles when it comes to multiple transparent plains overlaid or even objects behind planes sometimes.

http://s6.bitefight.org/c.php?uid=103081
AGL
18
Years of Service
User Offline
Joined: 13th Jan 2008
Location:
Posted: 8th Dec 2010 16:52
Ok, I think I have solved the problem basicly for now, using transparency map on png-s and using this in game. Tho I will need to fine-tune it, but works better now.

Thanks for the quick responses

"The business in the business is the business"

Login to post a reply

Server time is: 2026-07-21 19:18:48
Your offset time is: 2026-07-21 19:18:48