TTLG|Jukebox|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 12 of 12

Thread: Room brush info needed

  1. #1
    Brethren
    Registered: Apr 2000
    Location: Not France

    Room brush info needed

    After searching around TTLG and some other sites with Dromed tutorials, I'm not finding a lot of solid info on room brushes. I understand the basic concept, that they are needed for sound, that they should overlap each other, and that you shouldn't use one large one for a big area. But aside from that, I'm not sure on what guidelines I should use.

    In my specfic case, I have a city mission, where I created one large air brush, and then created several buildings within it. I'm not sure how to place room brushes in the areas surrounding the buildings, since I'm not exactly dealing with actual rooms here:

    -What volume or size should they be, on average?
    -Does it matter if they're thin and tall, or wide and fat?
    -Does it matter if the room brushes don't exactly follow the shape of the buildings, and can they intersect the buildings? (I've read that you shouldn't have them intersect the center point of any solid brush, so I'm guessing that won't work).
    -Is there a way through Dromed to ensure that your series of room brushes are all connected/overlapping, and thus the sound is working properly?
    -Is there any reason at all for a room brush to be located in an area that the player will never reach?

    Funny, my misison architecture is basically complete, and I thought early on that adding room brushes would just be a simple finishing touch. Live and learn, I guess that's why this is an entry for the novice builder contest...

    So, if anyone can point me in the direction of some room brush guidelines, I would be most appreciative.

  2. #2
    Since the sound propagation goes through the center of each room brush, you might get odd results if they are too large (e.g. footsteps of a nearby guard might suddenly sound very far away when he traverses into the next room brush). I don't know about exact guideline dimensions. It's best to test the sound propagation yourself and adjust any areas that behave oddly.

    No room brush should overlap the center of another one. Otherwise you can place room brushes as you want, even through solid walls (e.g. to simulate a water pipe behind a wall).

    To see if the connections between room brushes work correctly, select a room brush and click on Show All or Show Sel in the bottom menu. Show All displays all room connections as blue lines. If you select Show Sel, only the connections of the currently selected room are displayed. Click on Show Sel/Show All again to make the lines disappear.

  3. #3
    Member
    Registered: Aug 1999
    Location: terrible canyons of static
    I think I'll just go on a question-by-question basis here:

    What volume or size should they be, on average?
    I recall 40x40x40 is the recommended maximum, but you can go higher if you must. I would never use anything larger than 100 however, but I did use sizes up to 80x60x40 and such when I roombrushes my own city section with little AI activity.

    Does it matter if they're thin and tall, or wide and fat?
    No, as long as you keep within the limits.

    Does it matter if the room brushes don't exactly follow the shape of the buildings, and can they intersect the buildings? (I've read that you shouldn't have them intersect the center point of any solid brush, so I'm guessing that won't work).
    Yeah, the definitely can intersect buildings. I salute anyone who in fact has constructed complicated city architecture without roombrushes extending inside the solids. Also, that thing about roombrushes intersecting center points of solids is not true at all - they can even gulp entire operation brushes without worries. However, they cannot extend to the centers of other roombrushes - that causes trouble.

    Is there a way through Dromed to ensure that your series of room brushes are all connected/overlapping, and thus the sound is working properly?
    Yes. When you select a roombrush, there should be several buttons where the texture panel usually is. The buttons you want are Show All (shows all room brush intersections) and Show Sel (shows only the selected roombrush). This draws purple lines between intersecting roombrushes.

    You can also use the show_bad_rooms command in game mode - it fills unroombrushed areas in purple... stuff. This will knock down the framerate, however, but it's a very useful command. You can also use the command show_player_room which, surprisingly enough, shows the room the player is in in game mode. Not very useful, though.

    Is there any reason at all for a room brush to be located in an area that the player will never reach?
    Yes - if you want to have any AI in there. They cannot move in areas which aren't roombrushes (actually they can, the game will just crash though). Basically, this just means you have to remember to roombrush your bluerooms if you have AI in them.

    Not sure if this applies if you want to teleport them in or some other interesting implementation, I haven't really messed with that stuff.

    Indeed, proper roombrushing is not quite as easy as it seems - especially if you have terrain with "interesting" shapes. Eight-sided cylindrical tower structure surrounded by eight-sided cylindrical spiral staircase, never again

    Also, you do use two room brushes for doors, right?

    Eshaktaar beat me to some of this stuff, but oh well...

  4. #4
    But your explanations were more thorough.

    Beware of room brushes placed at odd angles (22.5° and similar). It's a bit of a gamble to get such brushes to work properly, sometimes it's necessary to move them around a bit before their connections are accepted.

  5. #5
    Brethren
    Registered: Apr 2000
    Location: Not France
    Whew, thanks for the great info above guys, this helps a lot.

    Quote Originally Posted by Spitter
    Also, you do use two room brushes for doors, right?
    Well, no. Right now I have one big room brush, which I know I have to change. But if I had, say, 2 rooms seperated by a door, my first guess would be to create three rooms brushes - one for each room and one for the doorway. So, why do I need 2 for doors?

  6. #6
    Member
    Registered: Aug 1999
    Location: terrible canyons of static
    Actually, I'm not sure why. Some ex-LGS dev posted some room brush tidbits ages ago, and it included the note that you should always use two room brushes for doorways. I haven't extensively researched how using one room brush affects sound propagation, but apparently at least the lean-and-listen-through-doors trick won't work if you use just one room brush.

  7. #7
    Have you ever lockpicked a door whose sounds were very distant, as if they came from the other room? That was probably due to the door not being properly room brushed:

    When a door is closed, it blocks sound (to a certain percentage). If there's just one room brush for the doorway, the engine doesn't know if it should block this brush's sound or not, which often results in the closing "slam" being muted from one side.
    However, if two adjacent roombrushes in the doorway intersect the door's center, this problem doesn't occur. Additionally, with this setup you can properly eavesdrop on doors.

    If you're short of room brushes, you can cheat a bit by enlarging one of the rooms' room brushes so it extends halfway into the doorway. Then you only need one additional room brush that connects to the next room. Hope you can understand my awkward explanation...

  8. #8
    Member
    Registered: Feb 2005
    Location: In The DK Dungeons.
    Quote Originally Posted by Eshaktaar
    If you're short of room brushes, you can cheat a bit by enlarging one of the rooms' room brushes so it extends halfway into the doorway. Then you only need one additional room brush that connects to the next room. Hope you can understand my awkward explanation...
    I think what Eshaktaar means, whit this outstanding explanation, is this;

    Please correct my if I´m wrong Eshaktaar
    Keep taffing, greetings from Nielsen74

  9. #9

    Yep, that's what I meant. Thanks for the illustration, Nielsen74.

  10. #10
    Member
    Registered: Apr 2011
    Quote Originally Posted by Spitter View Post
    I recall 40x40x40 is the recommended maximum, but you can go higher if you must.
    i heard this repeated again today and wanted to better understand why this was the case, because the explanation did not match my understanding of the dark engine's sound propgation; and i had just encountered a noticeable sound propagation error in an fm where a clearly audible sound suddenly stopped when moving from one room brush to another... so i had both an itch to scratch and a solid test case to examine.

    Quote Originally Posted by Eshaktaar View Post
    Since the sound propagation goes through the center of each room brush...
    this was the bit in the common explanation that irked me. i knew this was incorrect; but i did not fully understand how sound propagation paths were determined such that the error i had just encountered in the fm could happen. the draw_sound_path command in dromed is great, but it only shows the final path for a sound if it is audible; it does not reveal how that path was determined.

    long story short, i did some research and some testing and have written up the results in the dromesday book. and since i am a firm believer in information redundancy, i will repost it here in full also:

    Sound propagation

    When determining the path for a sound, the game first traces an approximate path from the origin point through the centers of room portals (the planes at the intersections of room brushes) until it reaches the room containing the hearer. If such a path is found and is not too long, then the path is refined to be as short as it can be through the room portals, like pulling tight a string. This length of this refined path is what is used to determine the location and volume that the apparent sound plays at. This refined path is what draw_sound_path displays.


    Sound propagation through two rooms and a hallway. Their room brushes (purple) and the room portals (green) where they adjoin are shown. The approximate path (blue) travels through room portal centers as a route to the hearer is discovered. The refined path (red) is how the sound will actually propagate when played.

    However, if the length of the approximate path (up to the final room portal, but not including the remaining distance to the hearer) exceeds the sound's radius, then the sound is considered to be out of range, and the refinement step will not be done and the sound will not be played. This can happen particularly easily when two large room brushes adjoin each other, forming a very large room portal between them: the approximate path will go through the center of that large room portal, which could be a significant diversion from the straight line that a sound intuitively follows, and that the refined path would have been. The approximate path length in this case is too big an overestimate.

    If you move from one room brush to another and notice a sound suddenly stop playing as you do so, this "overestimated approximate path length" is very likely the cause. This is also the reason why many authors recommend room brushes for outdoor areas should not exceed 40 or 48 feet in size: because that keeps the room portals between an adjacent pair of such room brushes to a reasonable size, keeping the approximate path length from diverging too much from the refined path length.


    Sound propagation via a large room portal. Two large room brushes (purple) adjoin with a large room portal (green). The approximate path (blue) travels through room the portal center as a route to the hearer is discovered, which in this instance greatly overestimates the path length. The refined path (red) will actually be a direct line from the sound source to the hearer.


    Sound failure due to a large room portal. The radius (grey) of the sound source is sufficient to reach the hearer in a direct line. But the total length of the approximate path (blue) up to the final room portal center is longer than the sound radius. So this sound is considered out of range, and it will not be played.
    Last edited by vfig; 12th Oct 2024 at 23:19.

  11. #11
    Member
    Registered: Jan 2001
    Location: 24463 Cells
    Thanks for posting this vfig. This will make it easier to ensure that sounds can be heard properly.

  12. #12
    Member
    Registered: Mar 2013
    Location: Finland
    Interesting and useful stuff, thanks for researching this!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •