Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Walls: Suggestion/Request

1488850502
Lucian
Pro
API Scripter
Hey Aaron, I've finally given up on trying to make maps out of tiles on Roll20 - it's just too limiting by comparison to a real drawing program and I inevitably end up with huge, slow maps. So I've gone back to my trusty drawing programmes and thought I would check out your Walls script at the same time. Now, I've never really got my head round bitmap editing/painting programmes for anything other than photo editing. I've watched people use Gimp/Photoshop for doing all sorts of drawing-type things, but working with pixels and brushes makes no sense to me; I think in terms of vectors, shapes and transformations, and I like having primitives that I can edit and rescale. In short, I use Inkscape, not GIMP. I thought that this would make using Walls even easier, since my drawings would already be in SVG to start with, but when I uploaded one, I discovered that your parser only supports a very limited subset of SVG. In particular, it doesn't support the <g> element, which inkscape uses in pretty much every document, even when you output optimized SVG. I've tried hand-pruning the SVG, but your parser doesn't like a bunch of stuff about even the path description that Inkscape puts out. Do you have any interest in trying to extend the parser to support more? Failing that I can try and work out some sort of workflow via GIMP, but at the moment it looks like GIMPs SVG parsing is pretty limited/broken as well, and it's mangling my paths when I load them in :-( Lucian
1488851503
The Aaron
Pro
API Scripter
I'm definitely interested in working on extending it. It's currently an extremely custom PHP parser (using TinyXML or some such?). I've been meaning to rewrite it to support Photoshop, and surely Inkscape would be as easy or easier. It's on my long list of things to do...
1488852501

Edited 1488852516
Lucian
Pro
API Scripter
The problem I think you're going to face is that inkscape tends to layer transformations at different levels. When you move a path, it doesn't change the co-ordinates of the points within it, it will put a transformation on the path itself; and this applies equally to higher level groupings which may also be transformed. Resolving all of that into a single set of co-ordinates will be a lot of fiddly parsing and a lot of vector math :-(
1488853045
The Aaron
Pro
API Scripter
There's probably a library out there that will do it for me. :). Worst case, I can normalize it, big deal. 
1488853939
Lucian
Pro
API Scripter
The Aaron said: There's probably a library out there that will do it for me. :). Worst case, I can normalize it, big deal.  Ah yes, of course, you're running all the conversion offsite so you can use what you like. I can copy and paste a pth from Inkscape to GIMP, but  for some reason some parts of the path get translated downwards randomly. No doubt GIMP isn't reading some more complicated part of the SVG properly. I suspect that with a little bit of work I can probably import a finished map into GIMP and then get a path in that is more or less correct and tweak in GIMP before exporting. Not quite as quick as I'd hoped, but it'll do until you find the time to play around with this more... or I learn how to draw in GIMP (not sure which is likely to take longer :-P) Cheers,
1488854146
The Aaron
Pro
API Scripter
You could patch GIMP to support SVG paths from Inkscape. =D
1488854278
Lucian
Pro
API Scripter
The Aaron said: You could patch GIMP to support SVG paths from Inkscape. =D I could also gouge my own eyes out with rusty teaspoons, but that doesn't mean I'm gonna :-P
1488966949
Lucian
Pro
API Scripter
So it turns out that exporting to PNG and then using the magic wand tool  in GIMP is actually *easier* and more effective than trying to get a neat SVG output from Inkscape - and I think this would still be true even if your script understood every component of the SVG standard. Furthermore, I don't know if it's just that I'm running it on a Linux laptop now, and I'm running into problems with the graphics drivers/libraries, but Inkscape 0.92.1 is unbelievably buggy; when it's not crashing randomly, loads of stuff just flat out doesn't work :-( For a project with a release cycle that makes Debian LTS releases look hasty, it's astonishing that they've managed to produced something so spectacularly unstable. I fear I may have to just suck it up and learn how to draw in GIMP... or maybe I should draw all my shapes in Inkscape and then export them to GIMP to add all the shadows/textures/effects. All of that is a long way of saying: I wouldn't bother :-)
1488975158
The Aaron
Pro
API Scripter
Ha!  Yeah, I've always felt like Inkscape was a broken promise. =/  Scribus is similarly frustrating. Luckily, GIMP is pretty darned good.  And there are a million tutorials out there for Photoshop that almost directly translate.  
1488976366
Lucian
Pro
API Scripter
The Aaron said: Ha!  Yeah, I've always felt like Inkscape was a broken promise. =/  Scribus is similarly frustrating. Luckily, GIMP is pretty darned good.  And there are a million tutorials out there for Photoshop that almost directly translate.   It's not so much the challenge of learning GIMP that bothers me; it's the fundamental wrongness of drawing things in a raster programme. I'm a programmer, dammit, I want logic and maths and objects, not brushes and fuzzy things and... <shiver> Art. :-)
1488976536
The Aaron
Pro
API Scripter
BWHAHAHAHAAHA!!!
I'm jealous of anyone that can make their own maps, tbh. I don't have nearly the patience or the skill. I usually wind up ripping off someone else's maps and editing them for my own purposes.
1489023126
The Aaron
Pro
API Scripter
That's totally fine fair use provided you're not then passing them on (unless the licensing allows it!). 
1489028151
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The Aaron said: That's totally fine fair use provided you're not then passing them on (unless the licensing allows it!).  Exactly! One of several reasons I don't publish our Youtube recordings publicly. I make maps for a living (or at least a nice chunk of it), but I just don't have the time to create all the assets I need from scratch.
1489043251
Lucian
Pro
API Scripter
Jyro X said: I'm jealous of anyone that can make their own maps, tbh. I don't have nearly the patience or the skill. I usually wind up ripping off someone else's maps and editing them for my own purposes. I have neither the patience nor the skill; but if there's one thing that I'm worse at than making maps, it's reusing other people's material without it becoming utterly formulaic. I have two creative modes: paralysing obsession with every detail and paralysing inability to think of anything at all :-)