An improved SVG-importer!

Discuss ideas for new features with other users. To submit feature requests to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Hugging_Bear
Posts: 106
Joined: Wed Feb 23, 2022 2:21 pm

An improved SVG-importer!

Post by Hugging_Bear »

Hi Victor,
my greatest wish for 2025 is an improved SVG-importer for Moho. The present one works fine for fairly simply graphics. But after importing more complex graphics, one needs to do a lot of clean-up work (colour correction). See example:
The Guardian of Tales - YouTube Channel
https://www.youtube.com/@guardianoftales
User avatar
SimplSam
Posts: 1218
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: An improved SVG-importer!

Post by SimplSam »

Looks like you are using Moho 14, but still using the 'old' Moho 12.5/13.5 SVG import add-on.

Moho 14 has the improved SVG importer built-in, which supports Gradients and Glow. Use: File > Import > SVG File...

Also .. to speed up some imports, use a new blank document, because if you have lots of Layers already in a document it will slow down the SVG importer.
Moho 14.3 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.3 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
Hugging_Bear
Posts: 106
Joined: Wed Feb 23, 2022 2:21 pm

Re: An improved SVG-importer!

Post by Hugging_Bear »

The 'new' SVG-importer is copy/paste of the old script SVG-importer! In other words, they are both identical! That's why I'm so disappointed with version 14. I upgraded to version 14 only because of the announcement of the 'new' SVG-importer. :(
The Guardian of Tales - YouTube Channel
https://www.youtube.com/@guardianoftales
User avatar
Víctor Paredes
Site Admin
Posts: 5814
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Re: An improved SVG-importer!

Post by Víctor Paredes »

Hugging_Bear wrote: Wed Jan 08, 2025 5:55 pm The 'new' SVG-importer is copy/paste of the old script SVG-importer! In other words, they are both identical! That's why I'm so disappointed with version 14. I upgraded to version 14 only because of the announcement of the 'new' SVG-importer. :(
Actually, SimplSam worked with us on version 14 (you will find him in the credits :D). He did a fantastic job improving the svg importer.
Image Image Image Image Image Image
Moho co-owner

Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
User avatar
Greenlaw
Posts: 10382
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: An improved SVG-importer!

Post by Greenlaw »

Hi Hugging_Bear,

Moho 14's built-in SVG importer has improvements that are not available in the mohoscripts.com version, so it's not identical.

If you installed the SVG Importer script from mohoscripts.com, you should remove it, as it is outdated and unnecessary for Moho 14.
User avatar
Hugging_Bear
Posts: 106
Joined: Wed Feb 23, 2022 2:21 pm

Re: An improved SVG-importer!

Post by Hugging_Bear »

I made the test and got exactly the same results!!!
The new build-in SVG-importer might work better for other users, but I don't experience any difference.
The Guardian of Tales - YouTube Channel
https://www.youtube.com/@guardianoftales
User avatar
Hugging_Bear
Posts: 106
Joined: Wed Feb 23, 2022 2:21 pm

Re: An improved SVG-importer!

Post by Hugging_Bear »

Hi guys,
I repeated a test for you, so you can see what I mean:
The Guardian of Tales - YouTube Channel
https://www.youtube.com/@guardianoftales
User avatar
SimplSam
Posts: 1218
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: An improved SVG-importer!

Post by SimplSam »

I think the problem is the add-on is overriding the in-built tool, because it has the same 'internal' name.

Try removing the add-on (remove: ss_svg_import.lua from <Custom Content Folder>\Scripts\Tool -- you can use menu: "File > Open Custom Content Folder" to get to it), as suggested by @Greenlaw, and restart Moho. You then should not see the [SVG] icon in the Tools panel. Then try your import/s again.

Or, you can send a test (.svg) file. But - I think the problem is the add-on 'override'.
Moho 14.3 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.3 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
Hugging_Bear
Posts: 106
Joined: Wed Feb 23, 2022 2:21 pm

I did remove the old addon script (tool) SVG-importer!

Post by Hugging_Bear »

Hi guys,
I made a couple more tests with the old addon script (tool) SVG-importer removed:

PS: The word I was looking for was 'opacity'.
The Guardian of Tales - YouTube Channel
https://www.youtube.com/@guardianoftales
User avatar
SimplSam
Posts: 1218
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: An improved SVG-importer!

Post by SimplSam »

OK... now if you send a test file. I can try and see what is not working.

You can DM me.
Moho 14.3 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.3 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
Hugging_Bear
Posts: 106
Joined: Wed Feb 23, 2022 2:21 pm

Re: An improved SVG-importer!

Post by Hugging_Bear »

Here is the link to the project files and SVG-files: https://mega.nz/folder/sLtC3IiR#vqb2GGjryTNuH4_5IznGiA
The SVG-files that end in 01 are converted via Photopea. The ones that end in 02 are converted via Adobe Illustrator. I've already 'cleaned up' the Captain Hook character manually.

You can download the original eps files here: https://www.freepik.com/free-vector/pir ... etail=true
https://www.freepik.com/free-vector/gir ... 342160.htm
Just download the zip file.

I decided to return to Adobe Illustrator for converting to the SVG format because those files remain the information which layers contain gradients and which not (but still corrupt the colours within each gradient).

Can anyone give me tips which are the best settings within Adobe Illustrator for obtaining the best results in Moho?
The Guardian of Tales - YouTube Channel
https://www.youtube.com/@guardianoftales
User avatar
Víctor Paredes
Site Admin
Posts: 5814
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Re: An improved SVG-importer!

Post by Víctor Paredes »

Hi, Hugging_Bear.
I checked the files and the color differences you are seeing are because the original SVG is using different blending modes for many of its layers.
Sam pointed out that these blending modes are not part of the SVG, but a CSS instruction. And CSS is not strongly supported in SVG 1.1, which is what Moho is using. So these blending modes are not supported by the importer.

The workaround for now is to manually apply the blending modes to the layers in Moho after importing. Once the blending modes are applied, the artwork looks exactly as the original.
Image Image Image Image Image Image
Moho co-owner

Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
User avatar
Hugging_Bear
Posts: 106
Joined: Wed Feb 23, 2022 2:21 pm

Re: An improved SVG-importer!

Post by Hugging_Bear »

The workaround for now is to manually apply the blending modes to the layers in Moho after importing.
In other words, I'm stuck with my clean-up work for now! :(
I estimated that clean-up work takes about 60% of workload per project. I had many good project ideas, that I dropped because I knew I won't have the time for all that clean-up work!
On the positive side: the expression 'for now' indicates the hope of some improvement in the future! :D That would be a huge time-saver indeed!
The Guardian of Tales - YouTube Channel
https://www.youtube.com/@guardianoftales
Post Reply