45
« on: 2018-01-11, 11:58:10 »
Thanks for the ideas, guys, but these methods won't be accurate enough for my needs, I'm afraid. I literally need a mask outlined and filled, so random toon lines, even if vector, will require too much manual work to be a viable way to do it on a job like this (it's a volume job - will need to process hundreds of these masks!).
Also, MR has been discontinued and I use MAX 2018 - sure as hell am I not downgrading for one job :D
Apparently Illustrator uses a low-res proxy internally past a certain resolution to trace, which explains why increasing the image res gave me same/worse tracing results. Cropping in on detail gave me a perfect trace, but that means I'd need to split each image into 6-8 tiles just to trace, which means merging the vector mask tiles back into one piece somehow - again, not viable as a volume job.
The workflow I ended up with (and I hope it helps someone later on here) is as follows:
1) Render all the files in bulk using backburner at a fairly large res
2) Separate the masks into a folder and run that trough a neural network upscaler at 4x res. This one runs on my GPUs on CUDA, so takes very little time to upscale the images. But it's important to use this instead of Photoshop to keep sharp lines!
3) Batch action: Open the mask images in Photoshop, select white and make a mask. Convert the pixel mask into a path using a 2px tolerance (this is where the upscale was important - without a fairly large tolerance the path ends up wavy, but at a larger tolerance I'm losing detail. At 4x the res I can afford to round off to 2px and keep the detail!). Downscale the file back to 25%. Save the path as an .ai file. This is executed automatically in bulk once I've set up an action.
3) Action, but executed manually (Illustrator is retarded - no batch processing!): Open the .ai files in bulk in Illustrator, making sure to keep the original pixel proportions of the mask file (there's a tickbox - important so that the vector mask is in the same place as it should be when overlaying the raster renders!). An action is set up to select all lines, release compound path, then select all again and make the compound path (this is important because the automatic compound path is wrong at first), then select the resulting path and fill with black (as required by client), then save file. So for this I need to essentially open any of the bunch of tabs and go "Play action > CTRL+F4 (close tab) > repeat" - sounds bad, but would only take me a minute or two for 100 files!
4) Open all the files in Illustrator again and go scripts>SaveDocsAsSVG - all files get saved as SVG files in a given location.
Sounds like a bit of work, but it really isn't, surprisingly, just need to set up all the actions and run them. Sure beats processing hundreds of masks manually. Though it would be even faster if Corona could save a vector mask *nudge nudge, wink wink* :) (or if Illustrator wasn't retarded and using a low-res proxy to trace....)