Level->SVG exporter?

Has anyone made any Doom level -> scalable vector graphics exporter? Not PNG mind you.

Share this post


Link to post

I wrote one in Python as part of a project before. This is the kind of output it produces. If using Python is no objection, I can try and make it useable as a command line thing.

Share this post


Link to post

That looks quite good, and I don't mind Python. A command-line utility would be cool, though I'm ultimately looking for a source code so I can modify it for my needs :)

Share this post


Link to post

http://www.dvdflick.net/storage/wad2svg.zip

I forgot that it uses Cairo for SVG rendering, so in addition to a Python 2.7 install, it also requires PyGTK to be installed, from http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.24/ (this version will probably work).

After that, run it by doing in a command line.

wad2svg.py doom2.wad MAP12 doom2_map12.svg 2048 2048
The SVG rendering stuff happens in maprender.py, line 113.

Share this post


Link to post

Upload must have gone wrong. Try again please.

Share this post


Link to post

Colin Phipps did a wad2svg script in Perl, he has it on his doombsp project page on Sourceforge;

Homepage: http://doombsp.sourceforge.net/wad2svg/
Tarball: http://sourceforge.net/projects/doombsp/files/wad2svg/0.1/wad2svg-0.1.tar.gz

The only bad part about the script is that it's dirt old, I don't think it's been updated since about 2002 or so. I did a few tests with it, if you want to see what it outputs.

Here's the example SVG that's listed on his page (125Kb);

http://doom.spicyjack.com/pix/example.svg

Not sure why Chrome won't render this as an SVG in the browser for me.

Here's a try at rendering Mek Velapax... WARNING: this SVG file is about 5.7M, you might want to download it first, then open it up in a dedicated SVG program like Inkscape or Adobe Illustrator... it takes Chrome forever to render it.

http://doom.spicyjack.com/pix/mek-velapax-beta1.svg

The SVG Perl module should be available on any modern Linux system as a package that you can install, for example, on Debian/Ubuntu, the package is named libsvg-perl. It may also installable on Strawberry Perl for Windows via cpanm.

Share this post


Link to post

There also is the option of using a WAD -> DXF/DWG exporter and then going DXF/DWG -> SVG, if going through two steps doesn't bother you.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now