SVG Importer
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
SVG Importer
SVG importer script for trueSpace 7.61
It reads in SVG files and saves the curves in COB format for modelspace/truespace6
http://clintons3d.com/plugins/truespace ... mport.html"
Nov 21, 2015: Small update, now reads polylines
It reads in SVG files and saves the curves in COB format for modelspace/truespace6
http://clintons3d.com/plugins/truespace ... mport.html"
Nov 21, 2015: Small update, now reads polylines
Last edited by clintonman on 21 Nov 2015, 21:24, edited 2 times in total.
-
Emmanuel
- Chief Warrant Officer
- Posts: 670
- Joined: 14 Jun 2009, 06:47
Re: SVG Importer
Cool !
Thank you Clinton
Thank you Clinton
-
Draise
- Captain
- Posts: 3200
- Joined: 21 Sep 2009, 19:33
- Type the number ten into the box: 0
- Location: Bogota, Colombia
Re: SVG Importer
I gave it a whirl with an SVG and got the following error:
I can't load anything...
I can't load anything...
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
-
Cellulo
- Lieutenant
- Posts: 927
- Joined: 27 Sep 2012, 07:48
- Type the number ten into the box: 9
- Location: France
Re: SVG Importer
Thanks Clintonman, is it compatible with tS7.6 full ?
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: SVG Importer
Works with tS7.61 full and std.Cellulo wrote:Thanks Clintonman, is it compatible with tS7.6 full ?
-
Cellulo
- Lieutenant
- Posts: 927
- Joined: 27 Sep 2012, 07:48
- Type the number ten into the box: 9
- Location: France
Re: SVG Importer
Ok thanks.
-
Draise
- Captain
- Posts: 3200
- Joined: 21 Sep 2009, 19:33
- Type the number ten into the box: 0
- Location: Bogota, Colombia
Re: SVG Importer
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: SVG Importer
Fixed, the error was caused by a known problem. The importer can't handle exponents in the numbers. The update takes small exponent values and makes them zero.
Also the stand alone svg importer won't be updated anymore. All new changes will go into the curves loader found in the curves toolbar.
http://clintons3d.com/plugins/truespace ... urves.html"
BTW, @Draise your sample will import with a very spikey looking curves. That's caused by some kind preview bug for sharp cornerd curves. If you adjust the curve resolution the spikes will disappear. Also if you export to tS cob the spikes don't show in modelspace. I think the "O" spike is a special case and may need adjusting manually.
Also the stand alone svg importer won't be updated anymore. All new changes will go into the curves loader found in the curves toolbar.
http://clintons3d.com/plugins/truespace ... urves.html"
BTW, @Draise your sample will import with a very spikey looking curves. That's caused by some kind preview bug for sharp cornerd curves. If you adjust the curve resolution the spikes will disappear. Also if you export to tS cob the spikes don't show in modelspace. I think the "O" spike is a special case and may need adjusting manually.
-
Draise
- Captain
- Posts: 3200
- Joined: 21 Sep 2009, 19:33
- Type the number ten into the box: 0
- Location: Bogota, Colombia
Re: SVG Importer
Wow, that was great! Good work!
I will try out your new curves stuff, this one I have not updated in a while. Neato.
Thanks Clinton..
I will try out your new curves stuff, this one I have not updated in a while. Neato.
Thanks Clinton..
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: SVG Importer
Left tiger is the raw import, middle is with some manual cleanup and the right is the original tiger shown in a web page
More improvements: get it here - http://clintons3d.com/plugins/truespace ... urves.html"
The main motivation is that I wanted the ability to export CSS animations for SVG files. During the process got sidetracked by many needed improvements.
fixed a path bug
polygon import improved, import as curves then freeze and add pivots
import color and transparency
freeze curve maintains hierarchy
text import font, font size, font style and transforms
CSS animation export
TODO: script to make cleanup easier, current steps are 1. rectangle select all edges 2. form face 3. invert selection 4. delete 5. if facing wrong direction flip face
More improvements: get it here - http://clintons3d.com/plugins/truespace ... urves.html"
The main motivation is that I wanted the ability to export CSS animations for SVG files. During the process got sidetracked by many needed improvements.
fixed a path bug
polygon import improved, import as curves then freeze and add pivots
import color and transparency
freeze curve maintains hierarchy
text import font, font size, font style and transforms
CSS animation export
TODO: script to make cleanup easier, current steps are 1. rectangle select all edges 2. form face 3. invert selection 4. delete 5. if facing wrong direction flip face
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: SVG Importer
Another update. Image shows the option to break compound paths into individual curve items and shows 2 new buttons for cleanup and flipping faces.
The CSS animation is working, but I found that Microsoft browsers don't work. They can't apply CSS animations to SVG tags, so this version adds Greensock animation export. Greensock is a javascript based animation system, "GreenSock Animation Platform (GSAP) is a suite of tools for scripted, high-performance HTML5 animations in all major browsers."
This version also adds some scaling and better text sizing.
The CSS animation is working, but I found that Microsoft browsers don't work. They can't apply CSS animations to SVG tags, so this version adds Greensock animation export. Greensock is a javascript based animation system, "GreenSock Animation Platform (GSAP) is a suite of tools for scripted, high-performance HTML5 animations in all major browsers."
This version also adds some scaling and better text sizing.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: SVG Importer
May 31, Update supports svg image tags, constant color materials option, animation export ignores disabled clips. Also a couple of bug fixes for opacity keys and a file path bug.



