Autotrace : raster to vector converter script

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
janimatic
Posts: 136
Joined: Sat Mar 26, 2005 12:22 am
Contact:

Autotrace : raster to vector converter script

Post by janimatic »

Hey,

you can find the Autotrace script here (only windows for today) :

http://animatic.no-ip.com/pub/dev/moho/js_autotrace.lua

Please place it in [moho]/menu/[yourScriptsDirectory]
and read the instruction at the top of the script
(you'll need to download autotrace binary and to edit a script variable accordingly)
Feedbacks welcome!

Regards
Toontoonz
Posts: 763
Joined: Fri Mar 25, 2005 9:28 pm

Post by Toontoonz »

Greetings!

Your script sounds very interesting, I haven´t tried it or figured out if I can figure out how to set it up.

Could you post a short animation where you used it? Maybe that would help explain to all of us what your script does.
And why one would want to do it - what are the advantages of changing the image from raster to vector.
janimatic
Posts: 136
Joined: Sat Mar 26, 2005 12:22 am
Contact:

Post by janimatic »

hey toonz,

i haven't such animation to show you right now,
but the idea is quiet simple and there are many applications :
>you prefer traditional drawing tools (pixel or even paper/scan) but use vectors for colors and 2d animation (thanks to moho!) This is how toonboom product work for instance.
>you want to animate a finished painting
>you want to give a cartoon look to video footage

This is endless but well be warned that image often needs to be preprocessed before vectorizing for a good results and my script doesn't solve this.

Regards!

Julien
janimatic
Posts: 136
Joined: Sat Mar 26, 2005 12:22 am
Contact:

Post by janimatic »

TIP :
using autotrace to speed up moho interactivity !
(or any other raster to vector converter)

i found a very usefull usage of autotrace + js_autotrace.lua !

When i make image based characters in moho it slow things down..
So when i animate i display a vector version of the character and it plays almost real time in moho !
When the anim is ok i render the image version (png layers from photoshop layers >image ready export layers to png) and play it with audio using
my loop software + js_ram_player.lua

To make the vector version using autotrace+ js_autotrace.lua
i need to make a black and white version of my character in photoshop :
- image > adjustement > brightness and contrast -100 -100
- image > adjustement > invert
- image > color mode> indexed color > uniform (colors:3)
- save as png
- run js autotrace in moho and that's it !
User avatar
Snudddy
Posts: 21
Joined: Sun Mar 06, 2005 6:02 pm
Location: Sweden

Cool tool

Post by Snudddy »

I tried this today and it worked very well!

Would be cool to see something like a menu in Moho with some tracing options.. but for now this is something that is very useful and time saving.
janimatic
Posts: 136
Joined: Sat Mar 26, 2005 12:22 am
Contact:

Post by janimatic »

Hey Snuddy!
thank you for the feedback (i feel less lonely now )..

Autotrace is very powerfull and accept a lot of option, what kind of options would you like?
Here is the huge list of autotrace options :
http://animatic.no-ip.com/pub/dev/moho/ ... w32/README

i didn't try yet the internal color reduction options (prefer to do it externally) but that would be a cool option...

best regards
Nichod
Posts: 184
Joined: Fri May 20, 2005 10:12 pm
Location: USA
Contact:

Post by Nichod »

Is this an internal script? We load in an image and run it in Moho?

Brian
Sometimes in order to accomplish something you need to not sleep.
janimatic
Posts: 136
Joined: Sat Mar 26, 2005 12:22 am
Contact:

Post by janimatic »

yes you select a (pre filtered) image from the moho file browser and it is converted to eps and automatically imported in moho
User avatar
spoooze!
Posts: 689
Joined: Fri Feb 18, 2005 11:42 pm
Location: USA
Contact:

Post by spoooze! »

It sounds great! Can you make it for Mac any time soon??

Spoooze :!:
janimatic
Posts: 136
Joined: Sat Mar 26, 2005 12:22 am
Contact:

Post by janimatic »

hey!

for the script part it's just a matter of writing a little shell script for mac os (like under any unix os)
For the autotrace software i think there is a port to Tiger os X 10.4 through darwinPort.
Tell me if you can run this
http://autotrace.darwinports.com/
and i'll write the shell script for you

(i don't have a mac here!)

sincerly yours

js
Post Reply