Demon
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 > Doom Editing > Picture to map?
 
Author
All times are GMT. The time now is 20:51. Post New Thread    Post A Reply
Memfis
Forum Spammer


Posts: 5600
Registered: 04-07


How difficult it is to make a program that would take a picture made of lines and maybe small circles and transform it into a Doom map with linedefs, vertexes and sectors? Small circles = vertexes, so the program knows where each line begins and ends and doesn't transfrom one kinda curved line into 100. Then I could draw maps while riding the subway = awesome. :D)

Old Post 12-04-13 12:04 #
Memfis is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Avoozl
Forum Staple


Posts: 2567
Registered: 06-09


Well it certainly sounds like a great idea, I don't know how possible it would be though.

Old Post 12-04-13 12:08 #
Avoozl is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Memfis
Forum Spammer


Posts: 5600
Registered: 04-07


Well, I know that the folks at the Elma Online community made a similar converter for the game and its level format is quite close to Doom's: a bunch of polygons consisting of vertexes and lines that connect them. (levels look like this: http://elmaonline.net/images/map/115303/975) So I guess it isn't too unrealistic.

Old Post 12-04-13 12:35 #
Memfis is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Kappes Buur
Forum Regular


Posts: 864
Registered: 11-02


I've never used it, so I cannot confirm it's usefulness:
http://www.doomworld.com/idgames/index.php?id=1309

Old Post 12-04-13 19:30 #
Kappes Buur is offline Profile || Blog || Search || Add Buddy IP || Edit/Delete || Quote
Ribbiks
Senior Member


Posts: 1302
Registered: 02-11


I imagine going from pixelated image data containing arbitrary configurations of lines to (x,y) vertices would be a pain in the ass, unless your input image was in some sort of vector-graphics format or something. Does sound like a fun idea though.

Old Post 12-04-13 19:49 #
Ribbiks is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
40oz
Forum Spammer


Posts: 6783
Registered: 08-07


Ive heard talk about a plugin or something that you could run with doombuilder 2 that would let you import an image as a backdrop for your canvas, so you could scan a drawing you made on paper, lay it out on your grid in doombuilder and trace the lines yourself.

i know thats not what you meant but that seemed to be the most practical use for doom map drawings to me.

i would imagine such a program wouldnt be as exact as youd like it to be, like using extra vertices in places where youd rather it not, or vice versa. Or some hallways would be too narrow to fit through or something. Also unless your map is all outdoors or caves or something, aligning teleport flats or ceiling lights would be a bitch

drawing the sectors is usually the fastest part of making a map for me. Its applying and aligning textures, and changing light and height variation, and testing traps and stuff that are the most strenuous parts.

Old Post 12-04-13 20:43 #
40oz is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
gggmork
If you can make any sense of this post, congratulations


Posts: 2772
Registered: 06-07


Post an example drawn image. My schedule is booked solid for masturbating about 16 hours a day, but maybe I can work in an hour here or there on this project if you are willing to pay ONE MILLION bitcoins to me. After payment is made, I do not promise to start or finish anything but I will keep the bitcoins.

The little circles as vertex rule would help distinguish curvy and non curvy lines. One problem if it mattered is it probably would have a lot of lines that weren't perfectly horizontal/verticle. Then again it wouldn't be hard to search all lines and if a line is ALMOST horizontal, just auto snap it to completely horizontal. But you probably wouldn't draw perfectly like on graph paper, so one side would warp out of scale or start going slightly crooked or something.
Plus I'm shit at coding so probably couldn't even do it. Actually maybe but I like to have low expectations of my self.
Also drawing in marker vs pen vs pencil vs faint vs dark vs lined paper vs graph paper etc would be a huge pain.

Last edited by gggmork on 12-05-13 at 05:20

Old Post 12-05-13 04:52 #
gggmork is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
StupidBunny
Forum Regular


Posts: 928
Registered: 09-07


Obviously it would probably not be able to do much beyond just drawing in linedefs for you. Height variations, textures, flats, things, etc. would all have to be done later. And as 40oz points out, those (well, some of those) are the time-consuming parts. In any event I imagine it would be hard to implement without a mess of unclosed sectors and weird angles and single-sided linedefs that shouldn't be single-sided and so forth. On the other hand, it could be amusing to scan any old line drawing into and see what happens.

Old Post 12-05-13 05:10 #
StupidBunny is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fraggle
Filled with the code of Doom


Posts: 7610
Registered: 07-00


If you mean converting a vector format like SVG into a level then it's probably not too hard. If it's a bitmap you're talking about then that would be harder although still possible. Would need to do edge finding and then convert the lines into shapes adding vertices automatically as appropriate.

I'm not sure the tiny circles idea is necessary or would work too well - at best it could be used as a hint for straight lines. But you could potentially detect them fairly easily using a Hough transform.

A bigger problem is figuring out which way round lines should be. You'd want to be able to use the "tiny line sticking out of front side" notation used in most editors as a hint, ideally. But that should be optional and it should figure out a sensible answer itself if there is no hint.

There are ambiguities that I'm not sure how to resolve. For example how can the program distinguish a sector-in-a-sector from a pillar? Maybe there should be some notation (like an 'X') to mean "empty space here" and the default should be to always generate a sector. When fixing up in a traditional editor it's easier to delete a sector than add one.

Old Post 12-05-13 06:16 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
plums
Senior Member


Posts: 1945
Registered: 08-13


I would love a program that could convert a vector drawing into linedefs even.

I've thought about an idea for a "high-level" doom editor, that uses mainly vectors and then renders down into a wad. You could even have stuff like multiple layers for floor height, ceiling height, and brightness, with the editor generating sectors as needed. I don't have anywhere near the coding skill to be able to pull this off, though.

Old Post 12-05-13 07:58 #
plums is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
fraggle
Filled with the code of Doom


Posts: 7610
Registered: 07-00


I'd like to see an editor that could do bezier curves, converting them into individual line segments as appropriate.

Old Post 12-05-13 18:12 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
MaxED
Green Marine


Posts: 35
Registered: 09-11



fraggle said:
I'd like to see an editor that could do bezier curves, converting them into individual line segments as appropriate.

GZDoom Builder has "Draw Curve" tool.

Old Post 12-06-13 10:59 #
MaxED is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
MaxED
Green Marine


Posts: 35
Registered: 09-11



40oz said:
Ive heard talk about a plugin or something that you could run with doombuilder 2 that would let you import an image as a backdrop for your canvas, so you could scan a drawing you made on paper, lay it out on your grid in doombuilder and trace the lines yourself.

You don't need a plugin for that. Just go to Edit -> Grid and backdrop setup

Old Post 12-06-13 11:02 #
MaxED is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 12503
Registered: 07-06


It's relatively trivial to go from an already vectorized 2D representation to another, and Doom's level format is just that.

However a working Doom map also needs splitting into sectors and a void/hollow distinction for closed shapes, and those would be super-hard to generate automatically to any satisfactory degree, so a lot of manual editing would be required anyway.

In my opinion, such a program would only aid you in importing either very rough outlines based on real data (e.g. streets and blocks in a city map, or contour lines for a mountainous/hilly outdoors), simple appartment plans (perhaps with prefabs for certain symbols) or shapes of such complexity that can only be generated programmatically e.g. fractals, but not draw stuff down to room detail.

It would certainly aid in making more life-like maps, but the degree of manual editing required would still dominate the building time, to the point that you wouldn't save much time at all.

There are even mobile apps that take photos of real places and then attempt to build a rough DXF floor plan....but you need a LOT of carefully-placed photos to cover even something like a simple appartment. You'd still be better off drawing the plan manually, IMO.

Last edited by Maes on 12-06-13 at 13:15

Old Post 12-06-13 13:09 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
plums
Senior Member


Posts: 1945
Registered: 08-13



Maes said:
In my opinion, such a program would only aid you in importing either very rough outlines based on real data (e.g. streets and blocks in a city map, or contour lines for a mountainous/hilly outdoors), simple appartment plans (perhaps with prefabs for certain symbols) or shapes of such complexity that can only be generated programmatically e.g. fractals, but not draw stuff down to room detail.


This is what I was working on for a bit today:
http://i.imgur.com/JYyDzgu.png

It's not at all close to done, but it's already becoming more difficult to manage than I'd like. To keep the right proportions, I need a lot of guiding linedefs and vertices, and whenever they intersect it adds complexity. It'd be much easier to do something like this in inkscape and then just export it to a program that spits out some linedefs, and then bring that into GZDB or whatever.

I've been playing with WadC a bit which looks sort of good for things like this, but it's not really geared towards circular measurements, and the syntax kind of hurts my brain. I think if I wanted to use it properly I'd need to make some better documentation, and write a bunch of functions maybe.

Last edited by plums on 12-06-13 at 14:08

Old Post 12-06-13 14:01 #
plums is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 12503
Registered: 07-06



plums said:
It'd be much easier to do something like this in inkscape and then just export it to a program that spits out some linedefs, and then bring that into GZDB or whatever.


What would be easier to do? The outlines? Probably yes, without all that pesky automatic linedef stitching getting in the way, but you'd still need to manually insert sectors later, which AFAIK is not exactly ideal in DB/DB2 (actually, it's discouraged, and practically impossible at the scale you are planning). You could turn off auto-stitching and forced gridding though, or use simpler editors which let you edit more freely/with less "benevolent guiding".

Which brings me to my initial point, once again: you don't need a tool which can just translate AutoCAD or whatever lines and arcs to Doom linedefs, you need something that can also handle sectors and other quirks of the Doom engine for you, and that's already a way, way more complex problem. Otherwise, such tools only do half the job.


plums said:
I've been playing with WadC a bit which looks sort of good for things like this, but it's not really geared towards circular measurements... I'd need to make some better documentation, and write a bunch of functions maybe.


I foresee a lot of cartesian-polar (and viceversa) conversions in your future ;-)

Old Post 12-06-13 18:16 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
fraggle
Filled with the code of Doom


Posts: 7610
Registered: 07-00



MaxED said:

GZDoom Builder has "Draw Curve" tool.

I'm sure there are plenty of editors that let you generate curves. I mean editing in terms of curves, like how you can put bezier curves in SVG files and go back and edit them later. For Doom you'd need to translate from some other format of course.

Old Post 12-06-13 18:51 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 20:51. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Picture to map?

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.