Page 1 of 7 123 ... LastLast
Results 1 to 20 of 134
  1. #1
    Member
    Join Date
    Mar 2010
    Posts
    1,079

    SVG output script

    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.

    script: http://dl.dropbox.com/u/16486113/Ble.../export_svg.py

    MM.jpg

    the SVG vector files for the picture above: M1 - M2 - M3 - M4 - M5 - M6

    A couple of tips:

    - limit the amount of exported geometry to get a faster export, but also to get different looks...
    - use viewport to frame the objects, you can go ortho mode or edit lens value, check distortions
    - 'add to svg' allows to append shapes to your svg, something like a 'multiple exposure' :p

    here some test done with a previous version of script on a model from project london: arizona

    edit: added some help here

    cheers
    Last edited by liero; 15-Jan-15 at 09:32.



  2. #2
    Member swmo's Avatar
    Join Date
    Oct 2012
    Location
    UK
    Posts
    517
    Very interesting. Thank you!



  3. #3
    thanks a lot Liero



  4. #4
    Member vklidu's Avatar
    Join Date
    Aug 2006
    Location
    czech republic
    Posts
    1,012
    Wow !!! What a day would be hard to wait until Monday to test it. Image looks awesome. Thank you man.



  5. #5
    Member
    Join Date
    Mar 2012
    Location
    France
    Posts
    285
    Just Wow!!!



  6. #6
    Great! That's a really useful add-on! Thanks so much.
    I am eager to see the next major step.
    Svg animation?



  7. #7
    Member tungee's Avatar
    Join Date
    Nov 2007
    Location
    Germany Frankfurt
    Posts
    1,406
    Great as Always! Hope Campell doesnt break this Addon too!
    Edit: This is a Killer Addon!!!
    Such great possibilities!
    Last edited by tungee; 24-Feb-13 at 06:50.
    In the end, only blender will surrender
    i7 4770 - 2x GTX 780 ti- 32GB



  8. #8
    Member Safetyman's Avatar
    Join Date
    Mar 2010
    Location
    Maryland, USA
    Posts
    1,056
    Which version of Blender is this for? I can't seem to get it to work with v2.66.

    error.jpg
    Last edited by Safetyman; 24-Feb-13 at 06:52.
    Quicksand has no sense of humor



  9. #9
    Member ejnaren's Avatar
    Join Date
    Nov 2009
    Location
    Denmark
    Posts
    718
    @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.
    Last edited by ejnaren; 24-Feb-13 at 08:01.



  10. #10
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,632
    @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.
    I rarely use Blender anymore.
    Houdini Indie is only $200.00 and Apprentice is free!
    Atom's Links Page



  11. #11
    Member Safetyman's Avatar
    Join Date
    Mar 2010
    Location
    Maryland, USA
    Posts
    1,056
    @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!
    Quicksand has no sense of humor



  12. #12
    i was waiting for something like this too. Can you share the setting of the different example you post here?



  13. #13
    Member
    Join Date
    Mar 2010
    Posts
    1,079
    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...



  14. #14
    Member ejnaren's Avatar
    Join Date
    Nov 2009
    Location
    Denmark
    Posts
    718
    @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:
    3Dcurvesto2D.png
    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:
    3Dcurvesto2D_persp.png
    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.



  15. #15
    Member dphantom's Avatar
    Join Date
    Jul 2009
    Location
    Lisbon, Portugal
    Posts
    157
    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..

    So many thanks!! Gonna give it a try soon
    Last edited by dphantom; 24-Feb-13 at 20:36.
    Archviz | 3D modeling | Procedural Textures
    Google+ Portfolio | Personal Webpage www.duarteramos.pt



  16. #16
    This is great. Thank You so much, You made my day!
    i cant wait to try this.



  17. #17
    Member
    Join Date
    Mar 2010
    Posts
    1,079
    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 ;)
    Last edited by liero; 25-Feb-13 at 10:08.



  18. #18
    WOW! great work on the various styles



  19. #19
    Awesome!!!

    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.
    Last edited by eXKR; 25-Feb-13 at 07:46.



  20. #20
    Originally Posted by eXKR View Post
    Awesome!!!

    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.
    That's what I've meant too!



Page 1 of 7 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •