Paintbrush plugin

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
spasmodic_cheese
Posts: 330
Joined: Wed Aug 04, 2004 2:02 am

Post by spasmodic_cheese »

if you got an easier way to do it i'd sure like to know =P
User avatar
TDolce
Posts: 36
Joined: Sat Oct 30, 2004 3:02 am
Location: Germantown, TN

Additional comments

Post by TDolce »

If you can get Living Cels working,..I want it too!!! We can talk off line if need be. I have the beta somewhere as I was supposed to be a beta tester,..then after they sent me the beta,...it wouldn't open without a full working version of Expression. That ticked me off. I was then stuck with a beta version that didn't work!! Even if I had Expression (which I do now) the LC wouldn't work because it has timed out by now.

RE: Moho plugin,....I'll give it a whirl after I download Moho 5.

RE: Curvature or smoothness of curves,...I did read the manual back when I tried version 4 and it never achieved that quality line. I had posted an example on the old forum for all to see and really nothing ever came of it as I think it was just a shortcoing of Moho at that time. Perhaps now it has improved? I wil have to try Moho again.

I deleted the app after version 4 out of frustration. It was very frustrating because I wanted the program to work for me so bad due to the amazing "bones" feature.

It's time to run the program through its paces again.

TD

Todd Dolce'
Todd Dolce
User avatar
TDolce
Posts: 36
Joined: Sat Oct 30, 2004 3:02 am
Location: Germantown, TN

Post by TDolce »

Brian, I tried the plugin you made last night,..but quite honestly I was very tired before I even started.

I'm thankful for people like you!

It seemed to be an improvement, but I still didn't quite get that line I was seeking. I still noticed some blockiness or jagged edges on a really tight curve. I tried to make some adjustments with the "speed" allowances and with the "pressure" allowances, but perhaps I didn't try hard enough. I will play with it some more over the weekend on Sunday.

I definately think it's a step in the right direction! I'm sure it's something I'm doing wrong,..so I'll look at it closer Sunday.

What I'm also going to try is to see if Moho will let me import a Vector file and allow it to be immediately editable without tracing. Perhaps I may need to bring it in as an .eps or other format,..but I'm going to try. If my poor memory serves me correctly, I think I did something like this in Version 4 with a file I created in XaraX and then exported to Moho and it was immediately editable and then I just added bones and away I went.

This would allow me to utilize the smooth variable width lines that Xara has and just simply animate and paint in Moho.

I certainly haven't given up on your plugin Brian,..more or less just thinking outloud.

td
Todd Dolce
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Yeah, I still need to spend some time on it. When I was whacking it together, I put in a printout of the clock value everytime Moho registered a mouse movement. Even if I moved the mouse (or pen) as smoothly as I could, the numbers had some glitches in them. I figure either Moho or Lua is doing a bit of housekeeping and throws the numbers off a bit. Not too terrible, but I wish I had access to a straigt-up system time with enough resolution to be useful. Any help for me there, LM?

Also, I'll see if I can work out something that would make the angle tolerance tend a little higher when it see's a lot of point's close together. That might get rid of some of what you're talking about. I'll see what I can bust out over the weekend.

Using other tools for some of the drawing is fine. It's finding the right one. I've tried it with a few various progs, and a few of them don't seem to close curves in a way that Moho understands (.eps or .ai). I'll have to give XaraX a try. Flash actually works pretty good in that respect. Looking at how other programs that people like helps me, a lot, in trying to figure out what is needed.

--Brian
User avatar
TDolce
Posts: 36
Joined: Sat Oct 30, 2004 3:02 am
Location: Germantown, TN

Post by TDolce »

Brian,

No prob. Hey Xara X is a real beauty! I mean if there is an app to study as far as line quality and tablet interaction,..that one is it. It is a real quality program.

I know what you mean about importing other formats. I recall that there were some issues when bringing in another format from another app. I would much rather do everything in the same application and GUI, but there never seems to be that option with most apps.

I hate having to do one thing there, and one thing here, so then I can get it to import over there....blah blah blah. Moho is pretty darn close though to being self contained and self sufficient. I think the more plugins that are created by folks like you, the closer that comes to reality.

TD
Todd Dolce
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Well, thanks for the compliments, but I'm just waiting for the people who can really code to show up. I mean, I won't stop, but the last tiime I really did any coding was on a big ol' IBM mainframe 20 years ago, and assembler on my ZX-80 before that. I've been looking for a Junior High schooler I could hijack a textbook from so I could get my math right. I look through the scripts, and there's so much trigonometry involved that I've mostly forgotten it's scary. I've been doing basic seat-of-the-pants engineering for so long it's taking a bit of a refresher to get the number crunching back, and even then it's pretty kludegy.

Most of the problem I've had, as I said, is with curves actually being closed when you import them, so you can just fill 'em and go. I was mostly going for it for .AI exports from 3D progs so I could use some publicly available, open source style objects to keep me form having to draw things like cars and such. And I wouldn't mind a suggestion of something that works for that, but most 3D programs I've experimented with either lack a vector outline export, or leave so many disconnected curves that it's an excersise in frustration to try and bring it into Moho. Say, in particular, with Wings 3D, which I like. But the export leaves so many overlapping points and disconnected curves that it's either a huge pain, imposible, or Moho refuses to see it as a valid file and won't show anything. After looking at what an Illustrator file looks like in text, I'm not surprised. It's pretty complicated.

I don't much like having to go back and forth, either. That's why I'm trying to work of the drawing tools. Well, mostly so I can use 'em. I really like the whole concept of the app, and I've done stuff I don't think I could do anywhere else.

So, I am going to slap a multiplier on the angle tolerance for close points. I was thinking about it at work ( finishing the wax for lost wax casting of a mold I made of an actual bear skin rug, for casting in aluminum, one of the wierder jobs I've had in a while, but I was down to the last few "no thinking necessary" bits) and I 'spect I can do that tonight.What I'm intending is that, when you slow down, I'll add onto the angle tolerance amount a number related to the current distance between points. So, even if you are drawing pretty fine, you shouldn't get a whole lot of extra points. Since the existing code I'm tweaking uses a set difference in angles between points, and you're more likely to get a jiggle in the detail, I think that should do the trick. We'll see.

I'll check out the XaraX tools as soon as I can, see what they look like. One of the problems is, since Lua's an interpreter I've already found it slowing down a lot if I try to do something with a lot of calculations, evn on my speedy new machine. Ah hell, once again it's probably more to do with my clunky code, but lotsa loops and math to check things out can crawl on complex vectors.

Maybe a bit of programming will take my mind off of things from the last few days. Oh, the joys of debugging.

--Brian
User avatar
AcouSvnt
Posts: 190
Joined: Wed Aug 04, 2004 4:14 am
Location: Rochester, NY
Contact:

Post by AcouSvnt »

7feet wrote:Well, thanks for the compliments, but I'm just waiting for the people who can really code to show up. I mean, I won't stop, but the last tiime I really did any coding was on a big ol' IBM mainframe 20 years ago, and assembler on my ZX-80 before that. I've been looking for a Junior High schooler I could hijack a textbook from so I could get my math right. I look through the scripts, and there's so much trigonometry involved that I've mostly forgotten it's scary. I've been doing basic seat-of-the-pants engineering for so long it's taking a bit of a refresher to get the number crunching back, and even then it's pretty kludegy.
I'm actually with you on that, even if I appear to know what I'm talking about when I get into stuff about C++ ... I learned some BASIC in 7th and 8th grade back in the early 80s, and did some stuff on a Commodore 64 after that, and then didn't touch any kind of programming at all again until about four or five years ago. What I can do now I'm doing by forcing myself to concentrate really hard and make the best use of what I understand, knowing there's mountains of stuff I don't. And of course trying to learn more, but at my own pace, learning just what I need to learn to get the ideas out that are in my head.

In other words, I really am a hack, but I think day by day I'm becoming a good hack. And Lua is so different from C++ -- quite honestly it almost looks like, from the book, they went out of their way to make every aspect of it different, right down to the convention of arrays starting at 1 rather than 0 (and the word "end" everywhere instead of a closing curly-bracket is distracting) -- I'm a little intimidated.

But that said, I doubt 99% of the stuff in the Lua book would come into use while scripting for Moho. I think the one who really had to absorb all that was Lost Marble, in order to integrate it into the program. The hard part is done, and once we have an explanation of the API it will probably be just like using a glorified BASIC.

Then again, you tell me. You're the one who's actually been monkeying with it as of yet.
-Keith
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

I almost forgot about the stuff I wrote in Basic. Actually, I forgot about a whole database thing I wrote while I was momentarily the shipping peon at a printing company. My friend who had gottten me the job had also said he could write the DB, but didn't know much of anything. 83? Some compiled Basic.

Hell, I really like playing with this stuff, like most of the things I've done in my career I'm with it because I find it interesting as hell. And like the first couple of films I worked on, it was based on a somwhat different standard than run of the mill, and that also made it fun

As far as a lot of the capabilities of Lua not being used, sure. But I am (okay geek time) curiouys how you would use some of the ways you can structure data. A lot of it seems to be written for manipulating text.
That said, I do think I like Lua as a language. I do remember that back in the day, if I was able to use a high level language, I never liked really stict typeing. So, even if it leads me into a hole sometimes for a few minutes, do like the "whatever" on data types. It saves a lot of debugging.

I figure one of the main reasons fot the choice of Lua for the scripting language is because its not that hard to get a hold of. I say that especially since I only know the API from the printout script than Myles did (thank you Much) and what I can half-assed discern from the existing scripts. Hell, I'm mostly using it like Basic, and it seems to be okay. Would I run it on Mom's Pentium Pro? Probably wouldn't even try.

I'll take being a good hack over a bad hack anyday. I've done hundreds of stupid litle jobs I've at least been proud I got done what the client needed when they needed it, and everyone was happy. That never hurts. But , kinda like you said, the whole thing is based on how Lua tiies into the main program.

I like the index at one instead of zero. It is a bit more natural language.
Okay, it's way too late to get anything done tonight. Off to sleep.
User avatar
TheMinahBird
Posts: 263
Joined: Sat Jul 27, 2013 11:10 pm

Re: Paintbrush plugin

Post by TheMinahBird »

Is there another way to get that Freehand tool? The link is broken. :(
"Now hatred is by far the longest pleasure; men love in haste but they detest at leisure" - Lord Byron
Post Reply