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 / Object transparency problem and Ghost Matrix

Author
Message
wargamer
22
Years of Service
User Offline
Joined: 7th Jan 2003
Location: United Kingdom
Posted: 29th Jan 2004 11:39
I'm generating a large world with lots of 2D ttrees that align to the camera. The trees have the transparency flag set so the black background is invisible. So far so good.

I've noticed that a thin line appears around the visible part of each tree image, that 'sees through' other objects straight to the terrain matrix. This isn't normally too bad, but I've just had to set MATRIX PRIORITY to 1 because I'm now using a ghost matrix and in update 5 that's what you have to do.

What happens now is that the 'super transparent line' sees straight thru the terrain matrices to the skybox, which near ground level is foggy white, and this looks really naff - the trees seem to glow white from a distance. What I'd like to know is:

1. Is it possible to lose the 'super transparent line' around objects with the transparency tag set?
2. In update 6 will the need to set matrix priority to 1 for ghosted matrices go away?
3. Why does the 'super transparent line' see through to the skybox but no other objects? Is is because it's the furthest object away, or could be something to do with the fact that I've switched off fog effects for it?

AMD Athlon 1600+, 512MB, GeForce 3
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 29th Jan 2004 11:44
Try...

SET OBJECT TRANSPARENCY Obj,2
(Note the ,2 at the end instead of ,1)
That might/should/probably fix it .


Van-B


The nature of Monkey was irrepressible!.
wargamer
22
Years of Service
User Offline
Joined: 7th Jan 2003
Location: United Kingdom
Posted: 29th Jan 2004 15:12
Thanks Van, but for "might/should/probably" read "didn't"!

If its seeing the skybox because it's the furthest object away, I could put a dark green cube round the outside of it so the the 'line' around the trees is a sensible colour.

I'll post again if that works, but any other ideas??

PS I'm on 5.1 - does 5.2 have any cvhanges to this area of functionality?

AMD Athlon 1600+, 512MB, GeForce 3
TheCyborg
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 29th Jan 2004 15:19
Only one way to find out

Member of Tjald - Targeted Joint Addicted Liberation Diplomacy

I am (currently) 42% addicted to Counter-Strike. What about you?
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 29th Jan 2004 16:01
Ohh, remember to use the ,1 flag when loading an image - that's if your making your plains with code and texturing them manually.

I'm using patch 5.1a - and the ,2 flag makes a helluva difference on my machine - blends any transparent texture into the surroundings very smoothly, almost like using alpha layered images. If possible, you could try the ,2 flag again - but mess around with your object numbers, I think the object number refers to it's render priority, like deciding which objects are to be blended into the texture.


Van-B


The nature of Monkey was irrepressible!.
wargamer
22
Years of Service
User Offline
Joined: 7th Jan 2003
Location: United Kingdom
Posted: 30th Jan 2004 10:35
Van, you are a star. My code is full of (other) LOAD IMAGE..,1 's but I guess I'd just got sloppy when it came to this one. The combination of that plus the SET OBJECT TRANSPARENCY Obj,2 did the business.

Thanks a lot.

AMD Athlon 1600+, 512MB, GeForce 3
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 30th Jan 2004 18:45
I had a similar problem with my ghosted matrices a few week beck, never got this much attention though

Here's what problems I had:

- SET MATRIX PRIORITY would work fine, but the matrix would render over any objects when SET CAMERA RANGE was used.

- Without SET CAMERA RANGE, everything was fine but the matrix would render over any transparent / alpha-ed objects.

I'l try used the ,2 flag

"They misunderestimated us" - George Bush
"The box said 'Requires Windows 95 or better'. So I installed LINUX. "

Formerly David89.

Login to post a reply

Server time is: 2025-05-29 05:43:59
Your offset time is: 2025-05-29 05:43:59