SVG Texture Support
So this one is rather simple, but opens up a wealth of options. Having support for SVG textures in the image texture node would allow for resolution-independent workflows.
A practical example is product visualization. In general clients don't just want a single render, but multiple formats, or after a few months they ask for a larger version to use in promotional materials. Any logos on the product could be SVG textures that will look crisp at any scale, instead of having to export stuff from Inkscape / Illustrator every time the resolution changes.
Another area that could greatly benefit from this would be NPR stuff. Being able to have SVG textures for character features allows you to re-use the same asset for close-up and wide shots, ensuring your textures will always render sharp.
And lastly, having a source file that can be linked and edited directly just speeds up workflow in general.
19 Comments
Back in 2008 Marcelo de Gomensoro Malheiros made a plug-in to integrate svg textures with unlimited resolutions. Maybe a solution like this could be really useful for logos, products renderings etc.
Link for the blendernation post: blendernation.com/2008/03/02/vectex-svg-vector-texture-plugin-for-blender/
@dallalba.andrea: Looks very interesting but I have no idea how to make it work. Thanks for sharing. Any idea?
* @luisburdallo * Well, I haven't done it but from the top of my head the only way to make such an old add-on work is to download the corresponding Blender version and use it there. But since this version didn't have Cycles and a bunch of other features you would be very limited. Not a good option for use in new projects.
I was wondering if the behavior before rasterizing would be like Microdisplacement does so it will rasterize when is as big as it needs to look sharp enough. That way it can save tons of memory or it can also save you from duplicating textures as I do in my workflow sometimes in order not to run out of VRAM memory. I agree with the edit button that will send you back to your default tool to edit the vector or image. That should have been in Blender for a long time. An easy way to edit textures without having to open the other tools and load the file yourself.
@luisburdallo: Would be difficult, I believe, as contrary to the adaptive subsurf it isn't trivial to determine before rending what a good texture resolution would be. Think about that the texture coordinate might only be known after computing a deep, complex material node graph.
@o.mangold: But if Blender behaves as the rest of tools do, it should recognize how much space is occupying within your project final resolution. So if your model is far away from the camera and it's actually occupying only 15% of your resolution which is 4K it can calculate how big the rasterize version should be. Maybe I am missing something else. Just thinking out loud as we talk about it.
@luisburdallo: What I tried to explain is, that in the general case the amount of screen space texture pixels occupy is not easily computed. For the reason that you can easily mess with the texture coordinates inside the material definition in (arbitrarily) complicated ways.
@o.mangold: I am not a programmer so I can't really discuss how it should work internally. I trust your opinion if you are.
@Craig Jones: That's a good point too. Maybe it could let you tweak the SVG resolution manually so you are the one who decides when is good enough and once locked it will be used for the final render. It's basically the same thing but not automated if its too dificult to program.
Hi all, it's the first time I join a discussion so apologize if I'm doing something wrong. I see at least three advantages in having the possibility to use svg files in for texturing, it's just another way to do things and it could go in parallel with raster files.
Please let me know your thoughts.
There was a patch way back in the day where SVG was supported as a texture. Obviously it was never merged, but I can't remember why.
@Jason van Gumster: Yeah, remember stumbling on that a while back, shame that it never made it into master.
Campbell (Barton) tried to use an SVG resource for toolbar icons and found that using internal (at Blender) opengl rendering from a mesh is more convenient and less problematic
You know that for rendering the image has to be rasterized? So somewhere at some point it needs to be decided what size the texture should be. Automatic adjustment to sensible values likely wouldn't be so simple.
But in general, I know what you mean. I think there was already a discussion about it, or experimental implementation or something, but can't find it right now.
Certainly would be a much nicer workflow to reduce manual steps needs until you see an edited (vector) image rendered. Best would be editing vector textures directly on the 3D object. Second best would be external editing (Inkscape, whatever) with instant sync and render update. This method might be possible to do with a plugin. I was wishing for quite some time to have an auto-reload feature for external images. Maybe I will try to write one, when I get to. Adding on-the-fly SVG-conversion wouldn't be much extra work, there. But it would still mean, that you have to specify the resolution manually somewhere.
@o.mangold: I remember it being added in 3ds Max a number of years back, but there's no information on the inner workings AFAIK. The approximation algoritm for rasterizing the SVG would be the hardest thing involved, I agree. But with some trial and error I'm sure there's a good algorithm to be found.
@Midge Sinnaeve (The Mantissa): You are right, a heuristic is certainly possible, working more or less well, depending on the material definition. It likely would require something like baking (maybe low-res) the texture input coordinates onto the mesh before rasterizing the vector image. In simple cases that should work.
We need it today!
It is so wrong that this only has 6 upvotes.
That comment doesn't help at all maybe you should explain why instead??