Doom Marine
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Detecting bridges
 
Author
All times are GMT. The time now is 11:25. Post New Thread    Post A Reply
rpeter
Mini-Member


Posts: 53
Registered: 02-04


Anybody has an idea how a bridge like the one in boomedit.wad from the TeamTNT website works? How can I detect such abominations? All I see is a bunchs of sidedefs facing the wrong sectors and an offthemap sector with the same sector number as the bridge itself.

Thanks
rpeter

Old Post 03-19-08 13:23 #
rpeter is offline Profile || Blog || PM || Email || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
Graf Zahl
Forum Legend


Posts: 4194
Registered: 01-03


What do you need this for? Being able to know this inside the game may require different information than in an editor.

Old Post 03-19-08 13:36 #
Graf Zahl is online now Profile || Blog || PM || Email || Homepage || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
rpeter
Mini-Member


Posts: 53
Registered: 02-04


I'd like to render them the way the traditional renderer does. If I just push those subsectors through a 3d pipeline they are rendered using the texture assigned to the sector they belong to. But the sw renderer does not use the sector's texture at all in the above bridge example, instead it renders the subs using another sector's texture (both ceiling and floor).

Old Post 03-19-08 13:46 #
rpeter is offline Profile || Blog || PM || Email || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
Graf Zahl
Forum Legend


Posts: 4194
Registered: 01-03


Have a look at the file src/gl/gl_data.cpp in the GZDoom source. The function PrepareSectorData is doing exactly that.

The idea is rather simple. Most of these sector tricks use self referencing sectors which means that both sides of the linedef belong to the same sector. I simply do not use this information to decide how a subsector has to be rendered. Instead I look at neighboring subsectors until I find one that contains an outside line of a sector and use that for rendering the self referencing parts.

Of course this alone will not solve all problems. Even for a rather generalized approach there's a lot of cases to consider and so far no source port has managed to find a solution for everything. Just have a look at GZDoom's src/gl/gl_missingtexture.cpp to see what is needed to handle the more common cases of rendering hackery. ;)

Old Post 03-19-08 15:52 #
Graf Zahl is online now Profile || Blog || PM || Email || Homepage || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
rpeter
Mini-Member


Posts: 53
Registered: 02-04


The aforementioned bridge does contain sidedefs referencing the same sector on both sides. For such cases I use modified code from Legacy and it has worked so far, but it does not recognize this bridge. I guess I'll try to setup a GZDoom project under MS Express 2008.

(Yes, GZDoom renders this case perfectly)

Old Post 03-19-08 17:06 #
rpeter is offline Profile || Blog || PM || Email || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
All times are GMT. The time now is 11:25. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Detecting bridges

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory