[not a bug] No Z-axis sound-distance calculaton
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- Hirogen2
- Posts: 2033
- Joined: Sat Jul 19, 2003 6:15 am
- Operating System Version (Optional): Tumbleweed x64
- Graphics Processor: Intel with Vulkan/Metal Support
- Location: Central Germany
- Contact:
No Z-axis sound-distance calculaton
When I had "noise" CVAR turned on to get the sound debug info I noticed that -- in my case it was an ambient sound -- it the "dist" in the table (and thus the heard volume too) does not fade when I go up in the air, so I conclude that the "dist"ance is calculated by sqrt(deltaX²+deltaY²) only, but should be sqrt(dx²+dy²+dz²).
-
- Posts: 182
- Joined: Wed Jul 16, 2003 4:35 pm
- Location: Outside of a bubble... Looking at all the humans inside.
Yeah it actually is, I noticed this a long time ago. But you're methods wouldn't work as they have no origin and unless you have something with the origin of 0,0,0 it wouldn't be correct. I'm currently using (Px^2-Ox^2)+(Py^2-Oy^2)+(Pz^2-Oz^2) / 2 and then squaring it. It's not just wrong for sound, it's wrong in ApproxDist(), which is used to determine the rate of fading.
- Hirogen2
- Posts: 2033
- Joined: Sat Jul 19, 2003 6:15 am
- Operating System Version (Optional): Tumbleweed x64
- Graphics Processor: Intel with Vulkan/Metal Support
- Location: Central Germany
- Contact:
The origin of a sound is the average of its places, i.e. if you got a sector which acts as platform, say, at (-512,0) and exactly the same sector (sector id not tag id) at (512,0), then the sound will play at 0,0.
However, I noticed it with an ambient sound, exactly /one/ ambient sound. Fly over it and volume does not change.
However, I noticed it with an ambient sound, exactly /one/ ambient sound. Fly over it and volume does not change.
-
- Posts: 182
- Joined: Wed Jul 16, 2003 4:35 pm
- Location: Outside of a bubble... Looking at all the humans inside.
I know, it's because of the distance finding function and not directly concerning the sound. I wasn't aware the origin was immediatly played at 0,0 when dealing with ambient sounds. I'll look into it, but am pretty sure the sound emitter should actually be the player while in the sector, then the sector it self upon leaving. It's doubtful time was taken to correct the bug even if there was one, most people probably wouldn't even notice.
Edit: I didn't realize you said it was performed in the average (center) of the sector. There really isn't much wrong with that then, but it'd be pretty simple to attach the sound to the player whenever he is in the sector.
Edit: I didn't realize you said it was performed in the average (center) of the sector. There really isn't much wrong with that then, but it'd be pretty simple to attach the sound to the player whenever he is in the sector.
- Hirogen2
- Posts: 2033
- Joined: Sat Jul 19, 2003 6:15 am
- Operating System Version (Optional): Tumbleweed x64
- Graphics Processor: Intel with Vulkan/Metal Support
- Location: Central Germany
- Contact:
Not only ambient sounds and not always on 0,0.GameArena wrote:I wasn't aware the origin was immediatly
played at 0,0 when dealing with ambient sounds.
It was just by chance an ambient sound in my example. And by what ZDoom
produces, 0,0 is the middle of -512x0 and +512x0.
Eh, what? Oh well... maybe I was unclear, as I experimented with both usualto attach the sound to the player whenever he is in the sector.
soudns and ambient sounds at once.
It is the usual sound (i.e. floor rising) which has the 'average' effect.
Then on top of that, all sounds have no Z-distance checking.
- Hirogen2
- Posts: 2033
- Joined: Sat Jul 19, 2003 6:15 am
- Operating System Version (Optional): Tumbleweed x64
- Graphics Processor: Intel with Vulkan/Metal Support
- Location: Central Germany
- Contact:
What if an ApproxDist3() function would be added to take the Z axis into account? It will only be used for sound, as otherwise it could affect monster movement and/or similar.randy wrote:I've known about this for years but have not changed it because Doom does it sound attenuation in 2D. Although it's not technically correct, it's not a bug either, because it was obviously designed to be that way.
- Lexus Alyus
- Posts: 4220
- Joined: Tue Jul 15, 2003 5:07 pm
- Location: Nottingham, UK
- Contact:
I'm working on making ROTGS into a full-new-modern-flashy-game-type-thing! I'm gonna try and do some work on the concept art once I get my drawing up to scratch and I'm developing the story right as I type this (or as you read this... by that time I would have already typed this... so your reading the past... or a post of the past...).
You all seem to be knowledgable in this programming stuff (somethingh that I have never understood and probably never will...) so, maybe we could team up at a later date. It's nothing soon... but I would like to team up with a programmer and get some stuff going... I'm interested in this stuff, even if it's just a new doom engine at the moment...
I'd like to ask randy... but nothing is certain yet as is the case with everything, and:
1) I get the impression that randy hates me...
2) he seems to be quite busy...
3) I can't think of one... but I kinda get the impression that he/(you) wouldn't be too interested in this...
Maybe I'm being really off the ball... but it's worth a shot... ya see, I've really wanted to do something computer game wise, even if it's just to make the music (man, that would be GREAT... if any one is interested... music is my area of expertise) and I always get these really cool story ideas and immiges (which is why i'm attempting to develop my drawing abilities), plus, I enjoy making levels... so I think I could give some rough ideas and great music for a game... then we'd just need the rest of the team (mainly artists and level designers). It would be cool if anyone is even remotely interested... even if it's just for fun... I'd be in it for the creativity... not in any major aim in money or anything... but it's always nice to think about things like that
.
Maybe a cool team would be Hirogen2, Gameareana and Randy programming, Mouse making all the cool models, Enjay, cyb and TUD (I can't be bothered to type The Ultimate Doomer... so I'm just gonna short hand it instead... nevermind...) making levels and me doing music, sounds and production... maybe even cyb doing some voice talent
... ha, that's just a quick one... but yeah, anyone that's a bit intertested, just for fun, it would be cool
.

You all seem to be knowledgable in this programming stuff (somethingh that I have never understood and probably never will...) so, maybe we could team up at a later date. It's nothing soon... but I would like to team up with a programmer and get some stuff going... I'm interested in this stuff, even if it's just a new doom engine at the moment...
I'd like to ask randy... but nothing is certain yet as is the case with everything, and:
1) I get the impression that randy hates me...
2) he seems to be quite busy...
3) I can't think of one... but I kinda get the impression that he/(you) wouldn't be too interested in this...
Maybe I'm being really off the ball... but it's worth a shot... ya see, I've really wanted to do something computer game wise, even if it's just to make the music (man, that would be GREAT... if any one is interested... music is my area of expertise) and I always get these really cool story ideas and immiges (which is why i'm attempting to develop my drawing abilities), plus, I enjoy making levels... so I think I could give some rough ideas and great music for a game... then we'd just need the rest of the team (mainly artists and level designers). It would be cool if anyone is even remotely interested... even if it's just for fun... I'd be in it for the creativity... not in any major aim in money or anything... but it's always nice to think about things like that

Maybe a cool team would be Hirogen2, Gameareana and Randy programming, Mouse making all the cool models, Enjay, cyb and TUD (I can't be bothered to type The Ultimate Doomer... so I'm just gonna short hand it instead... nevermind...) making levels and me doing music, sounds and production... maybe even cyb doing some voice talent



- Lexus Alyus
- Posts: 4220
- Joined: Tue Jul 15, 2003 5:07 pm
- Location: Nottingham, UK
- Contact:
- Lexus Alyus
- Posts: 4220
- Joined: Tue Jul 15, 2003 5:07 pm
- Location: Nottingham, UK
- Contact:
Left out? I wouldn't say that... afterall, that was just the rantings of some random person... who may or may not be lagging... that my friend is up to you to decide... the path is a hard one... but you will learn... in time...
But sereously, it would be cool to get together with some programmers (and all the rest) and get some ideas rolling... after all, all good things start off somwhere...

But sereously, it would be cool to get together with some programmers (and all the rest) and get some ideas rolling... after all, all good things start off somwhere...
