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.

Dark GDK / Transparent Objects

Author
Message
fallingb
17
Years of Service
User Offline
Joined: 10th Sep 2007
Location: UK
Posted: 11th Sep 2007 15:09
Hi all,

I am currently having problems with Object Transparency. I am using DarkGDK and am trying to create a ghosted cone to use as a spotlight beam. As soon as I dbGhostObjectOn, the object total disappears?!

I've searched this forum and found a post regarding ghosting being 'broken' within DarkGDK... is this still true?

I don't really understand the various ghosting commands:
dbSetAlphaMappingOn
dbSetObjectTransparency
dbSetImageColorKey
dbGhostObjectOn

and when they should be used. At present, I'm only using dbGhostObjectOn and am hoping it's my code and not a GDK problem. Any help on making a basic 'light cone' would be helpful.

Cheers...
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 11th Sep 2007 19:19
I get the same in .NET. The Box and Cylinder no problem with GhostOn, but with a Cone.... Dont work.

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine
http://noggs.netopcom.dk/forum/default.asp - Forum for the game
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 12th Sep 2007 11:46
There is no problem here with ghosting & DGDK.
It is true that it was not working, but it was reported and fixed.

Sometimes it is hard to decide which command to use.

dbSetAlphaMappingOn : Makes object transparent with different modes
dbSetObjectTransparency : Sets how much the object is transparent
dbSetImageColorKey : Sets a colour for transparency
dbGhostObjectOn : Makes object transparent in 'ghosted' mode

Beware that dbGhostObjectOn needs a light to show the object, and the power of ghosting is set with dbFadeObject rather than with dbSetObjectTransparency.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Sep 2007 20:36 Edited at: 12th Sep 2007 20:49
@Morcilla - Great advice.

@Niels and FallingB - You guys probably have thought of this - but have you tried modeling the cone in a model program and loading it - and then using ghost on that?

I don't mention this idea to be flip or anything. In Iron infantry - to get my "spinning rotors" blur on the apache heli - my first go around I modeled a "flattened" (almost all the way but not) cone and ghosted it - and used a simple texture 32x32 with one color. (Should have used a 1x1 or 2x2 for one color probably but I digress) It did work and it looked neat (from most angles).

(I eventually went to a flat plane to lower polys..but I was able to ghost that way)

[edit]I was using alpha I recalled later - but the idea may still work - cubes work, sphere works, cone doesn't - try loading a model of a cone[/edit]

Login to post a reply

Server time is: 2024-11-16 20:30:52
Your offset time is: 2024-11-16 20:30:52