Page 1 of 8 12345 ... LastLast
Results 1 to 10 of 76

Thread: Attempting a Blender to DXF or SVG animation exporter plugin for Blender 2.6

  1. #1
    Join Date
    Sep 2013
    Location
    Moscow
    Posts
    41

    Default Attempting a Blender to DXF or SVG animation exporter plugin for Blender 2.6

    Check later posts by TL for working plugin...
    Last edited by dream; 09-09-2015 at 14:35.

  2. #2
    Join Date
    Oct 2006
    Location
    Cleveland, Ohio
    Posts
    2,333

  3. #3
    Join Date
    Apr 2008
    Location
    DC/VA metro area
    Posts
    365

    Default

    Kudos for your work dream! I tried doing dxf export from Sketchup a few months ago, but it didn't go so well.

    Free sketchup can't export a view, only the object to dxf I think I used. Fair enough.

    Ildasos is able to convert it (make sure optimization is off) to ilda object or ilda frame, and laserboy could rotate it but I think I had issues with zoom or something. But you just end up with too many faces on objects once projected. It might be possible to use them with a clipping plane to cut off the back half, but still there was enough optimization that would need to be done on what I had it would be easier to trace it from an image.

    Blender export with means to get to ilda could possibly be a way to get results like the killer Pangolin plugin for 3dsmax. That would be killer!

  4. #4
    Join Date
    Apr 2006
    Location
    Germany
    Posts
    121

    Default

    I've an dxf exporter based on the svgwriter ready for months, but was just too lazy for a nice GUI around it.
    ILD SOS even supports color gradients on lines and the "sample raster" should also work with svg files.

    I think I could add a GUI around this the next days/weeks, so it's easier to use. Currently I'm editing my export script for the various options
    the vector renderer from Blenders provides.

    Thomas

    Quote Originally Posted by dream View Post
    Thanks.

    Haven't gotten much progress with this to be honest.
    This is as far as I can get by using the default DXF exporter of Blender.
    I am able to access the vertices and their colors, material color and particle positions to write that data to a DXF file myself, but the format is a bit confusing for me.

    I am more interested in the SVG renderer right now. http://www.geocities.jp/blenderyard/...26/README.html
    I was able to modify it to fix some bugs and support material colors, still trying to add vertex color support. I'll post that when I'll do more tests.

    If I could get the "Sample Raster" feature of ILD SOS to work with SVG, now that would be killer. We could use the SVG exporter as-is and get proper colors and shading.
    I've asked about this in the ILD SOS thread.

  5. #5
    Join Date
    Apr 2006
    Location
    Germany
    Posts
    121

    Default

    Color gradients are simply a colorfade from one to another color.

    I've just tested the sample raster function with svg files and it really doesn't work...

    Currently the script is really messy, it was done in a few minutes based on my previous work with blender and dxf files.
    Give me some time to clean this a little up... ;-)

    Out of interest, what bugs did you encounter in the original svg script?

  6. #6
    Join Date
    Apr 2006
    Location
    Germany
    Posts
    121

    Default

    It's also pity that this renderer ignores points and lines that aren't part of a polygon. I wanted to create some line abstracts but ended up with nothing. I've thought of a workaround but it doesn't work for all shapes, only works with orthogonal camera and produces dublicate vertices.
    This can't be possible, since the rendere can only transform objects with surfaces to lines...
    Regarding freestyle scripting, it's virtually nowhere documented... This is also my problem regarding the GUI options for the dxfWriter...

    so here is the dxfWriter for Blender.
    Download
    Just copy it to the Blender/scripts/freestyle/style_modules/ directory and assign it as style module in Blender.

    It respects the percentage scale for rendering and does proper frustum culling. Currently it doesn't support RGB colors,
    instead it maps the rendered colors to the standard dxf palette. But I think this isn't a big problem, since ILD SOS can overlay
    the colors from the rendered images...
    Currently no GUI is provided for the writer for controlling which edge types are exported. But I'm working on this.


    I'm currently using the dxfWriter in one Layer and other Layers for the various freestyle rendering options.
    All I have to do is rendering twice, one pass for writing the dxf files and one pass for the bitmap files.
    Afterwards both are combined with ILD SOS. To help ILD SOS use a relative thick line in freestyle for rendering.

    Here's a small example including shading (not testet on a real preojector, but should display ok).
    Only Blender and ILD SOS were used...

    Objects inside Blender:
    Click image for larger version. 

Name:	Blender.jpg 
Views:	53 
Size:	52.5 KB 
ID:	41113

    ILD SOS:
    Click image for larger version. 

Name:	ildsos.jpg 
Views:	69 
Size:	38.7 KB 
ID:	41114
    Attached Files Attached Files

  7. #7
    Join Date
    Jul 2008
    Location
    My momentum is too precisely determined :S
    Posts
    1,765

    Default

    Nice work both! Looking forward to what comes off this...

  8. #8
    Join Date
    Apr 2006
    Location
    Germany
    Posts
    121

    Default

    Quote Originally Posted by dream View Post
    Great job TL!
    I can think of a workaround, might work:
    Adding another pass to iterate through all curves and meshes in the scene looking for lines and points and adding them manually to the DXF data.
    What do you think?
    There are few problems in my opinion:
    1) as this had to be done in pythons, it would be very slow
    2) we would have to uses the same 3d to 2d algorithm as blender internal and decide afterward which points/lines are visible due to objects behind other objects etc.

    maybe there is another solution for this...

    Quote Originally Posted by dream View Post
    I think it's okay like this myself.
    But I can think of one reason when you'll want to add proper color exporting: for people not using ILD SOS.
    So maybe we should consider this.
    It does use a approximated color at the moment, it can be changed easily, it's only a question of time...

    Quote Originally Posted by dream View Post
    Anyway, when I get my PC running I'll test this out with some complex animations and post the results.
    Good job again.
    I'm really curious about your results...

    Quote Originally Posted by dream View Post
    BTW, can we host the exporter on googlecode , sourceforge or blender.org one day? I hate when I can't find the download of a tool after few years...
    I will put it on my web page...

    Thomas

  9. #9
    swamidog's Avatar
    swamidog is online now Jr. Woodchuckington Janitor III, Esq.
    Join Date
    Nov 2006
    Location
    santa fe, nm
    Posts
    1,545,425

    Default

    that's my video

    let me know if you want the show file for it.. as a little thank you for the awesome work you guys are doing on the dxf plugin.

    Quote Originally Posted by dream View Post
    Reading vertex position, normal, color, material data, bone weight, bone name/index and exporting to file takes few seconds for a complex 3000+ vertex scenes for me. Only read colors and materials and considering your scenes will be simpler than that because of modern scanner speed and I think it won't be *very* slow, but definitely will add a lot of delay for each frame, yeah.
    I'd suggest to make it optional (check button?).


    I see what you mean. I wasn't even thinking about rendering lines and points *and* polygons at the same time. Only thinking about rendering lines for abstract animations like people make with LSX now.
    http://www.youtube.com/watch?v=ZDh5H...cgswgPUMk2ilKw
    Maybe add point and line support as optional and experimental feature for stuff like this.

    As for another solution, Cython or C Python modules might be an option but will be platform dependant, unless we make a module for Win, Mac and Linux. Can't think of anything better, sorry.


    I just got my PC charger fixed, will work on it now.
    suppose you're thinkin' about a plate o' shrimp. Suddenly someone'll say, like, plate, or shrimp, or plate o' shrimp out of the blue, no explanation. No point in lookin' for one, either. It's all part of a cosmic unconciousness.

  10. #10
    Join Date
    Oct 2006
    Location
    Cleveland, Ohio
    Posts
    2,333

    Default

    Nice work. In the ilda file posted in 11 above, it appears that the corner sensitivity is a little too high, or some other little bug, as occasionally a non-corner edge is drawn inside the wheel and on its side. Other than that, it's good progress and with the faster render times I look forward to trying this again sometime.

Posting Permissions

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