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 / bad explosion. go to your room.

Author
Message
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 7th Sep 2003 16:06 Edited at: 7th Sep 2003 16:08
Some of you may recognise this question from the IRC channel. While I think I know why it's doing it, I could do with a fix. Sometimes (but not often) my explosion plains interfere with each other...

good explosions : http://www.teh-codes.com/projects/blaster/explodegood.jpg

bad explosions : http://www.teh-codes.com/projects/blaster/explodebad.jpg

The explosions are billboarded plains, always pointing to the camera, using png transparency. The problem doesn't happen very often (and is therefore difficult to catch on a screenshot), but when it happens it looks very ugly...

and before you suggest it - this is what it looks like using ghosted plains:

http://www.teh-codes.com/projects/blaster/explodebad2.jpg

Any bright ideas?

A wise man once said: "I know that I need codes but I dont know the codes"
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 7th Sep 2003 16:31
No idea I'm afraid

The way I'd do an explosion is with lost of very small plains, all starting at the same point and moving away at random angles.

Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops. Train station = where train stops. Workstation = ?
Dave J
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 7th Sep 2003 16:35
No idea either but I have to admit, when it works, it looks bloody awesome.

"Computers are useless they can only give you answers."
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 7th Sep 2003 16:55
Quote: "No idea either but I have to admit, when it works, it looks bloody awesome. "


I'ven oticed that they tend to intersect the matrix though. Maybe you could turn zdepth off on them when you have an uninterrupeted view of the explosion, but return it to normal when the matrix is obscuring your view so they don't show up through it?

Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops. Train station = where train stops. Workstation = ?
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 8th Sep 2003 19:28
.. if the explosions were in front of you though, they'd then appear over the top of your craft. Turning zdepth off is only really useful for things which really don't have a position in the 3D world, or when you're controlling the view very precisely so you know stuff thats supposed to be in the distance won't overlap stuff that's closer.

As for the explosion thing, that's a toughy. It must be something to do with the transparency handling in db. Try turning off the objects sensitivity to all light sources (ambient, light and fog). Just guessing but it might help. Aside from that, I would suggest adding this line of code:


Insiiiiiiiiiiiiiiiiiiiiiiiide!
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 8th Sep 2003 19:53
I'm tempted to beleive that it's caused when two plains are on the same position on one particular axis ...

if you imagine that two plains are on the same z position, but they're 10 units apart on the x axis for example, then at certain camera angles the planes will overlap in a confusing way.

Perhaps?

A wise man once said: "I know that I need codes but I dont know the codes"
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 8th Sep 2003 20:04
ADR - great work!
Fallout - roflmfao

-RUST-
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 8th Sep 2003 20:29
The problem looks very much like the ^2 texture issue manifested on MX cards. are your textures square and sized to the power of 2?

Pneumatic Dryll
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 8th Sep 2003 20:35
D'you know.. I have no idea.

I know they're 1:1 aspect ratio, but I don't know if they're ^2 ...

I'll check when I get home.

A wise man once said: "I know that I need codes but I dont know the codes"
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Sep 2003 21:40
Your earlier guess about overlapping transparencies may be right.

I've just been going over the older unconfirmed posts in the bug forum and spotted this post : http://www.thegamecreators.com/?m=forum_view&t=15869&b=15

It seems to me to be the same sort of problem that you are having.
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 8th Sep 2003 22:01
Yup. Have you tried the workaround I mentioned there?

Still, it does seem like an issue that's bugging ( ) a lot of people...

--Mouse: Famous (Avatarless) Fighting Furball
Read It: http://www.angryflower.com/itsits.gif
Learn It: http://www.angryflower.com/bobsqu.gif
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 9th Sep 2003 15:59
PDryll, for your peace of mind, and so you can finally sleep at night, I can confirm the textures are both square and ^2 (256x256).

IanM > doesn't that make this something which could be posted on the bugboard if it's happened before?

A wise man once said: "I know that I need codes but I dont know the codes"
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Sep 2003 16:01
There are already one or two transparency issues listed there - We just have to decide which to confirm ... or maybe group them all together in one post, because they strike me as being related.
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 9th Sep 2003 18:39
Perhaps the whole system should be overhauled

--Mouse: Famous (Avatarless) Fighting Furball
Read It: http://www.angryflower.com/itsits.gif
Learn It: http://www.angryflower.com/bobsqu.gif

Login to post a reply

Server time is: 2026-07-25 09:40:33
Your offset time is: 2026-07-25 09:40:33