Watermelon Posted March 7, 2015 I am working on a fun small project which is to read a wad file, and make a top down 2d snapshot of a map and fill in the textures. I've definitely hit a wall (no pun intended), I don't know how to handle sectors that have holes in them. I've been able to polygonize enclosed sectors no problem, but as soon as inner architecture is part of a sector, it falls apart. I wanted to talk to a person who has designed a map editor, since they likely would have had to have dealt with this exact problem. I don't know who is around though. The only map editor I've used is DoomBuilder, and CodeImp hasn't logged into Doomworld for a very long time; his forums are shutdown and I'm unsure there's any way to contact him (or if he'd even bother with someone asking him about something like this). Does anyone know any other map developers who are still around in the Doom community who would be knowledge on this issue, or could point me to a resource that would show me how to handle this problem? Any information would be much appreciated. 0 Share this post Link to post
scifista42 Posted March 7, 2015 Contacting MaxEd (active GZDoomBuilder developer) on the ZDoom forums should be easy. Andrewj develops Eureka Editor. 0 Share this post Link to post
Zed Posted March 7, 2015 I just wanted to add that both of them also have accounts in here, if you want to send them a PM: andrewj MaxED 0 Share this post Link to post
jmickle66666666 Posted March 7, 2015 I hit upon the same problem, and the easiest way I found to handle it is to build GLNODES with a nodebuilder that supports them, and use the glnodes to build the subsectors. they are similar to normal subsectors but organized in a much nicer way for building planes out of 0 Share this post Link to post
hex11 Posted March 7, 2015 André Majorel (author of Yadex) has contact info at bottom of this page: http://www.teaser.fr/~amajorel/ He still posts on Usenet rec.games.computer.doom.editing sometimes (even though almost nobody else does anymore) so maybe he'll be happy to talk with you via email. 0 Share this post Link to post
boris Posted March 7, 2015 Both DB2 and Eureka are open source, so you can look at that. For DB2 it's in Source\Core\Geometry\Triangulation.cs. 0 Share this post Link to post
Gez Posted March 7, 2015 sirjuddington wrote most of SLADE 3, including its polygonizer. Like other programs mentioned here, it's open-source. hex11 said:He still posts on Usenet Usenet still works? 0 Share this post Link to post
hex11 Posted March 7, 2015 Yes, contrary to popular belief, Usenet is still alive. However a lot of ISP's dropped it, in which case you have to use a 3rd party Usenet server (or worst case Google Groups). But it's ironically very popular because of this: http://en.wikipedia.org/wiki/NZB Basically that's a way for people to get their warez or whatever without fear of RIAA/MPAA monitoring. Well, nothing is foolproof but it's much safer than torrents (where **AA can be seeders and directly monitor/log everything). I haven't tried that stuff though. I sometimes log on to Usenet to check out a few game or technical groups. Those are a lot quieter these days, but Usenet still lives on thanks to the binary groups. Btw, there are still quite a few active gopher sites... 0 Share this post Link to post
andrewj Posted March 8, 2015 As mentioned, you can use the GL Nodes produced by glBSP or other node builders. If you want to do it yourself, there are two main ways: (1) apply a BSP-like algorithm to polygonise the sectors. Basic idea is to split sectors into two halves at any non-convex vertex (including where holes are), and keep repeating the process until all your pieces are convex. Gez mentioned SLADE3 has a polgonizer, and OBLIGE has my own called AJ-Polygonator (in C++) which may be useful to just look at and understand this process (2) the way I would probably do it is to approach it like a trapezoidal rasterizer. Ignore purely horizontal lines of the sector, then for _every_ vertex Y coordinate you split any linedef that crosses that Y coord into two "segments". In the end you will end up with several rows (possibly hundreds for a very big, complex sector) with each row containing some line segments. These line segments either face left or right, so in each row it is mainly a matter of sorting them horizontally, and pairing them up to form a trapezoid (for each pair) which is convex and easy to render. 0 Share this post Link to post
Watermelon Posted March 8, 2015 Thanks for the post. The idea for (2) looks very similar to what I found. There was this paper that CodeImp used and I this paper is extremely similar to (2). http://www.geometrictools.com/Documentation/TriangulationByEarClipping.pdf It definitely looks like the method of choice for sure. I'm going to try working with the ideas you guys provided. As a note from my research: - MaxED only maintains the GZDoomVisual aspects, he is not familiar with the inner workings of the triangulator and directed me to the source code - Slade looked like it was sort of close to what DoomBuilder did, but I think it passes all the vertices into an OpenGL tesselator and lets that do its magic. I could be wrong here, I wasn't able to find the stuff in the sector/renderer files in Slade (likely I've missed them). Maybe Sirjuddington could comment on this and debunk any myths here, or confirmed if he uses gl's tesselator. (Just for anyone in the future who stumbles across this thread). As a final note, after studying that PDF and various open source map editors for Doom, studying that PDF and/or using Andrew's (2) option are definite options for solving the sectors issues! 0 Share this post Link to post