Hi, here is a script I’ve been playing with for a while: the idea is to get some quick vector output from Blender to feed Inkscape. It is not meant to be a NPR solution -as Freestyle will be- but you can still do some basic tricks. And it is pretty useful for simple shapes and so… I also tried to add a few abstract and geometric stuff into the mix.
Script will export current viewport -think a screen capture application- to a SVG file. Works with meshes and curves. I suggest you to open the svg file in a browser -Opera is very fast- and use it as a viewer while you play with settings. SVG code can also be edited inside the browser.
@liero: No words man, no words! I am going to test this right now!
FOLLOWUP: It works great! I could not get it to export curves but the rest works very very very good!
It is a very well done addon! All the options makes it so powerful.
It is amazing.
Question: I see you use a scale option. How does the size of the resulting SVG objects compare to the size of the object? Say if I export a box where each edge is 10 cm in ortho mode. Is there a way to get the SVG edges to be 10cm in the .svg file?
Congrats again on this great tool! I will have to look through the source soon.
@safetyman: Try specifying a folder on your desktop for output. If that does not work turn off Relative Path. I had a similar crash when I tried it out. But Absolute Pathing to an existing folder that you have permissions too will work.
@Atom – thanks that worked. I’ll have to play around with the settings, but it looks to work really well. You also must select an object or objects for it to render anything.
@Liero – thanks for creating this. I’ve been waiting for something like this for a long time. Great job!
thanks for the response guys, good to see you found this useful!
@safetyman sorry for the path problem, that needs to be properly coded @ejnaren I meant beveled curves, but added a simplistic way to render 3D un-beveled curves as paths; and pixels are just screen pixels atm, the scale works by multiplying this values… as a quick hack I could add an option to calculate scale -just ortho mode- @alan.zirpoli will try to add some way of storing and retrieving the settings from svg file, then I could upload some examples
main issues are related to z ordering of faces and objects, also my math / coding skills are pretty basic so things could surely run faster and better
been doing some fixes, so maybe download the script again…
@liero: I cant tell you how useful that it already is!
I have been researching which is the easiest way to get renders in scale from blender. I am an architect so it is very useful.
By being bale to export drawings directly from blender you have essentially opened Blender for me to use as my main modeling app.
The ortho scale option might be better to add as an alternative addon? Some times you want to get your normal renders out in a certain scale as well. The render to print addon helps though:)
Anyway I just wanted to give you an idea:
If the viewport / camera is in ortho mode. Then curves and handles are distorted uniformly. Meaning that even though the curve is 3D and the viewport is rotated the handles as seen in the viewport shapes the curve as seen in the viewport.
I have traced a simple bezier inkscape over a screenshot from blender.
ie: ORTHO:
Export function in other app all subdivide the curve making it into hundreds of segments to approximate it.
I would be cool if the curve could be exported as is. Only works in ortho mode though: PERSPECTIVE:
I dont know to much about curve math in perspective distortion but it seems the handles are the same angle at the viewport but needs some scaling factor.
I am sorry for this looong post but you have made my week. Im gonna let go now and go to bed.
Thanks for the work man. It will work wonders for drawing sections of buildings with the cross section script I ported some time ago.
Oh man this one hell of a useful addon.
God knows I have dreamt about something like this, think of the possibilities!
This is gonna be great for exporting orthographic views elevations plans etc…
added a fixed scale option when in ortho mode -in fact this script started as orthogonal only- but I guess the right solution would be to implement camera support; will think on the curves idea too…
@dphantom and @84d don’t get too excited as it can get a bit tricky to get nice results… share anything cool you make
Just one thing: is it possible that you add the parameter configuration for all the examples? that way it would be much easier to get an overall idea of “what each parameter is used for”…
Thanks, great work.