Blender Scalable Vector Graphics Converter

I wrote a small converter-program for the plus/4 in .Net4.8 which converts Blender Freestyle SVG (Scalable Vector Graphics) into sequential files (Seq-file). The Seq-file is loaded and interpretated by this small BASIC program:

0 GRAPHIC1,1:COLOR4,1:COLOR0,1:COLOR1,6,4:SCNCLR
1 OPEN8,8,12,“FILENAME,SEQ,READ“
2 INPUT#8,C,X,Y
3 IFC=1THENDRAW1TOX,Y: GOTO2: ELSE IF C = 0THEN LOCATEX,Y: GOTO2: ELSE GOTO4
4 CLOSE 8
RUN

This BASIC code can be easily converted to any other microcomputer (Atari, Apple, Sinclair, MSX, …) of that era. Please send me the code, if you tried this for your system. I want to include it into the converter too.

PRG: GeorgeSVG2SEQ.zip (v 1.230408, you need DotNet 4.8)

Examples:
teapot_example.zip (SVG and SEQ-File for testing)
SEQ_Examples.zip (Seq-files of Hubble, Voyager, Couriosity)
SEQ_porsche911.zip (Seq-file Porsche 911 Turbo)

Atari 800 XL
n1.zip (N1 Fighter) (n1.txt, Atari 800XL only)

Hint: If you use MacOs or Linux and you have trouble reading the files, change the EOL (End-Of-Line) in the file that works with Notepad++.

Video Tutorial Blender 3.5

Some examples:

ATARI 800 XL

16 Responses to “Blender Scalable Vector Graphics Converter”

  1. MMS sagt:

    Dear Georgios,

    You are a real pioneer on these 3D methods on this platform!

    I can say, there was not a single proper 3D designer PRG on Plus/4, and now with your tools we are able to:
    1) Render 3D pictures from the 3D coordinates exported from Blender
    It takes a lot of time, but all calculation all done by the Plus/4!
    Maybe the original rendering calcualtion was not developed by you, but you gave all the credits and converted it to our platform, also applied some improvements.

    2) Draw a picture from the SVG file, exported by Blender. In this case the selected contours are drawn by the Plus/4, like a plotter commanded by the SEQ file created from the SVG file. This one is much faster method

    Thank you for your dedication and great tools. This relatively unknown platform really need this enthusiams and support!

  2. George sagt:

    Thank you for your kind comment!

  3. Alvaro sagt:

    I will try on C64, you can post o where can I download sequential files of 3 images?

  4. George sagt:

    Hi Alcvaro,

    i don’t provide any svg files, only the knowledge how to make your owns svg files with Blender 2.79. Start with a simple Cube in Blender, export it as SVG, convert with the tool above on your C64. Use a Basic Extension like Simons‘ Basic for the C64. You have to adapt the 5 BASIC lines above.

    If this worked, try more complex models from „Nasa 3d ressource site“ or Blendswap“.

    If you need any further help, feel free to ask. 🙂

    George

  5. Alvaro sagt:

    I have never used nor know anything about 3D modeling in tools like Blender; I love programming BASIC and 6502 assembler for the C64; I made a small module in BASIC and another in assembler to handle the graphics to be attached to any BASIC program that needs to display graphics; I would appreciate at least a small sequential file to test. If you look in the BASIC group I posted images of a BASIC program to display Tektronix sequential vector files (this text machine translated).

  6. admin sagt:

    Hi Alvaro,
    i added a link to an example (teapot) in above uder the link for the converter.
    Have fun with testing!
    Greetings George

    P.S. Great work with that Tektronix sequential files!

  7. Cyril sagt:

    Hello , very nice ! do you have your 2 others examples with the .SVG files ? I would love to reproduce them on computer too !! thanks for your great work ! cheers

  8. admin sagt:

    Hi Cyril,
    if you can handle Blender a little, you can create your own SVG’s with the models from the NASA 3d Ressource site with the help of this tutorial. Otherwise feel free to ask me again..

  9. Anonymous sagt:

    I got this code to work on my Atari. The real trick was getting TEAPOT.TXT in a plain text enough form so that INPUT could digest it. I ended up using Script Editor on a Mac and exporting as plain text, then changing the extension to „.txt“ then importing that file into Atari800MacX using the edit an ATR disk function with the Atari/Mac Character Translation turned on.

    10 REM BLENDER2.BAS 11/13/22
    20 GRAPHICS 8+16:COLOR 1
    25 POKE 77,128
    30 OPEN #1,4,0,“D:TEAPOT3A.TXT“
    40 INPUT #1,A,B,C
    41 IF A=0 THEN PLOT B,C
    42 IF A=1 THEN DRAWTO B,C
    43 IF A=3 THEN GOTO 50
    49 GOTO 40
    50 CLOSE #1
    70 GOTO 70

  10. Anonymous sagt:

    Hello again! I’m the poster of the Atari code above. George, if you could post a series of SEQ text files that you have already converted, that would be amazing. I don’t have a setup able to perform the original conversion using your Windows executable but if you have a bunch of SEQ files already read to go, I’m sure people would be able to enjoy them much more easily.

    Thank you!

  11. admin sagt:

    Hi Mr Atari800,

    Thank you for trying out and the code. I really apreciate this. I will include your code to the next release.

    I have put a link above for the seq-files (Hubble, Voyager and Curiosity) you and Cyril asked, so you can render them.

    If you cant read the SEQ-Files for your emulator for your 8bit, you can try to change the EOL (3 Variants: Windows, Apple or Unix) first. The EOL ist the character for a newline, which differs from OS and even the 8bits.. If you can’t figure out, write a small testprogram in your BASIC which creates a sequential file and open it with an texteditor like (Notepadd++ under Windows) and look up which EOL is used.

    Maybe I will port the App to MAUI oder Python in the future or open up the source (after a good refactoring). I did not expect the interest people have in this project.

    Greetings George

  12. Anonymous sagt:

    Mr. Atari800 here. This is great! Thank you for posting the files. Now I need to attach a virtual hard drive to my emulator since the new files are so large they won’t fit on a virtual floppy drive! If you have any more SEQ files (like the shuttle one?), I will definitely give them a try!

    Thank you!

  13. admin sagt:

    Hello Mr. Atari800,

    You are welcome. If your emulator do not support virtual drive, you can split the text-files up. Adapt the Basiccode with a pause (getkey§) for disk.swapping and then load the next file. Share some pictures if you want…i will put them on the site.

    A later version of my converter (unreleased) makes a second pass and removes unnecessary(double) lines or points for reducing the file sizes. I also came up with a better method in Blender, where you don’t need to rescale the pictures. The svg is already in the right resolution then.

    Greetings George

  14. dariog sagt:

    ah yeah, I (again) wanted to ask how long it takes the Porsche on a Commodore
    thanks!

  15. Can you post the seq file for the porche?

  16. George sagt:

    Hi Bill,
    uploaded the seq.

    Try this Apple II code (edit the filenames):
    NEW
    0 HGR2:HCOLOR=3: LOMEM: 24576: REM ALLOCATE VARS OVER $6000
    1 PRINTCHR$(4)“OPEN TEMPLE.SEQ“:PRINTCHR$(4)“READ TEMPLE.SEQ“
    2 A=FRE(0):INPUT C,X,Y
    3 IFX>279THENX=279
    4 IFY>191THENY=191
    5 IFX<0THENX=0
    6 IFY<0THENY=0
    7 IFC=1THENHPLOTTOX,Y:GOTO 2
    8 IFC=0THENHPLOTX,Y:GOTO 2
    9 IFC=3THEN11
    10 GOTO 2
    11 PRINTCHR$(4)"CLOSE TEMPLE.SEQ"

    Greetings George

Leave a Reply