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 / fade object doesnt seem to work

Author
Message
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 29th Jan 2006 03:13
fading some ghosted objects i have, to different values, doesnt seem to do anything to their appearance

is there something i might be unaware of that i should be when i try to make my ghosted objects fade away slowly (starting at 200, each loop fade it again with a value one less than before)?

If you want anything DB related hosted, log in (with ws ftp or something) www.lysergium.net with username [email protected] and password public. you'll be directed to lysergium.net/public
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 31st Jan 2006 03:35
i got it to work. in case anyone was reading the thread, you have to have the object set to be affected by ambient light and world lights, otherwise fade wont do anything

but i have another question. i ghost the objects (spheres used as smoke particles) so it looks like smoke, semi transparent, but they are way too transparent. is there any way i can get it more opaque? to ghost it only e.g. 25%?

If you want anything DB related hosted, log in (with ws ftp or something) www.lysergium.net with username [email protected] and password public. you'll be directed to lysergium.net/public
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 31st Jan 2006 10:51
Personally I like to use alpha transparency textures for things like grey smoke - they look so much better, you just use a .png with an alpha layer, like from Photoshop, and it's like having a more blended look. With a lot of particles you can get a nice volumetric effect.

The main thing is that the colours remain intact, so they're great for dirty smoke.


Van-B

Put away, those fiery biscuits!
MaRo
19
Years of Service
User Offline
Joined: 1st Jan 2006
Location: Central Europe
Posted: 31st Jan 2006 14:56
I totaly agree with Van B, I'm using transparency textures for smoke too. Qwe can you post code with this fading or just post what commands have to be seted and the values, pls. This will be very helpfull
Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 31st Jan 2006 15:25
yeah, i'll third VanB, and also suggest if you do use PNGs and transparency make sure you use the second flag when doing this


"We make the worst games in the universe..."
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 31st Jan 2006 15:26
To enable an object to be affected by alpha, you should use...

SET OBJECT TRANSPARENCY Obj,2

Or ,3

Or ,4 which I think uses 1-bit alpha, or those curvy round leaves that defy their resolution like in MOH.

There's 2 techniques too, like you can FADE OBJECT, but also SET OBJECT ALPHA - or something like that, they work differently and should be experimented with to decide which technique is best for Z buffering and looks.


Van-B

Put away, those fiery biscuits!
MaRo
19
Years of Service
User Offline
Joined: 1st Jan 2006
Location: Central Europe
Posted: 31st Jan 2006 16:30
Now I'm trying to make a grass that when is away from a camera disapear. And I'm using ghost and fade command but....

when I make it like this:
ghost object on grass#,0
set object ambient grass#,1
set object light grass#,1
fade object grass#,100

set ambient light value `the value is changing between 0 and 100

everything works great, but:
-every grass fade is changing at the same time
-other objects with set object ambient seted to 1 fade changes

when I make it like this:
ghost object on grass#,0
set object ambient grass#,1
set object light grass#,1
fade object grass#,`the value is changing between 0 and 200

set ambient light value `the value is changing between 0 and 100

Only the one side of grass is fading, and it's becouse of light, but when I set object light to 0 the fade don't work . All I want to do is to slowly dissapear single grass objects. Help me, pls
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 31st Jan 2006 16:44
Ahh, well then transparency mode 2, and set object alpha should be a better option. Alpha is very different from fade - it's more like those console games that fade out the detail inbetween your character and the camera.

Is use alpha to fade alpha transparency objects and fade to fade the ghosted objects.


Van-B

Put away, those fiery biscuits!
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 31st Jan 2006 16:55 Edited at: 31st Jan 2006 17:00
^van-b set alpha mapping on works perfectly

im using now it instead of the ghost object on / fade object combination

i realize i could also use a .png transparency but using set alpha mapping lets me fade the smoke clouds away when theyre near the end of their lives (for each loop, for each smoke cloud, if smoke.time < 75 then set alpha mapping on smoke.object, smoke.time)

If you want anything DB related hosted, log in (with ws ftp or something) www.lysergium.net with username [email protected] and password public. you'll be directed to lysergium.net/public

Login to post a reply

Server time is: 2025-06-17 05:23:13
Your offset time is: 2025-06-17 05:23:13