Adjust Colors Script

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Yeah, as Wes says I'm not sure there is anywhere you can read the fill color values in Lua -- if it's there it's not documented anywhere I can see.

So -- this is as good a time as any to reiterate that one big wish item is to expose as much as possible to Lua AND to document it (the last probably being the hardest to do for someone like Mike -- in most companies you actually have at least one full time person in charge of documentation and I'll bet a dollar that's not the case here).
User avatar
Víctor Paredes
Site Admin
Posts: 5658
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

Well, I suspect it will be not accessible. I hope Mike give us all the info for lua scripting. It would be great. Thanks, anyway. It still being a very useful script and I'm using for several designs.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Hey guys, long time no see.
This is a really great tool mkelly, indispensable in fact, thanks for sharing it.
8)
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Thanks, Chucky, and you're welcome.

Someday if I ever get back to script writing I'll make some other tools I need and that others might want. I'm kind of waiting to see if Mike releases the new version, though, because I get very frustrated over things I ought to be able to do but can't (due to lack of Lua interface to AS).
danceman
Posts: 20
Joined: Sun Dec 16, 2018 5:17 pm

Re:

Post by danceman »

mkelley wrote: Sat Mar 07, 2009 9:50 pm Wes,

I actually adjusted the "limits" so that the colors wouldn't shift around the spectrum. If I leave limits on RGB values then you really can't lower the values of pure saturated colors (for example, if the color is 255 red then you can't darken it even if the other colors are less).

However -- that said I've decided there are *way* too many other things I want to do with this, and I shouldn't have posted so soon. For example -- instead of just adding/subtracting RGB values you could have a switch to "saturate" all your colors (the math for this is not as straightforward but it's easily doable). Saturate is good because as you lighten or darken you tend to desaturate and while you can adjust this it's a bit of a PITA to have to keep tuning the values.

There are at least four or five "standard" sort of color adjustments that can be programmed, so I want to do all of those. Ideally, if AS had a database approach to things I could actually have user defined adjustments that could be saved/loaded, but I won't go that far (because, after all, this is just a tool for me :>).

Anyway, if folks want something like this they might want to hold off until I release version 2.0 <bg>.
Hello Mike, and thanks for such excellent, powerful and utilitarian products especially MK_Adjust_Colors!! It makes Color Points finally practical for feasible application to entire image sequences and video projects.
I hoped you'd time for few critical questions please:
1) could you provide an MK_Adjust_Colors Version2.0 download link or please send the Lua to dancemanj@telus.net?
2) could you please instruct how to Lighten and Darken multiple color-points with MK_Adjust_Colors?,
3) can MK_Adjust_Colors be made to work with Moho versions 12 and\or 13?, right now its grayed-out and non-functional,.

..thanks again for any help, and please keep up the great! and uniquely critical work,
yet another fan, Jeff
User avatar
synthsin75
Posts: 9971
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Adjust Colors Script

Post by synthsin75 »

Mike Kelley is no longer working in Moho. He has moved on to doing 3D animation, and last I spoke to him, he seemed very reluctant to dive back into Moho scripting.
F.M.
Posts: 497
Joined: Thu Nov 04, 2004 4:29 pm
Location: Between my ears

Re: Adjust Colors Script

Post by F.M. »

Yes, Mike now uses Reallusion for his animating, I try to check his forum as often as I can, There's very little happening there.
"and then Man created god!"
danceman
Posts: 20
Joined: Sun Dec 16, 2018 5:17 pm

Re: Adjust Colors Script

Post by danceman »

synthsin75 wrote: Thu Dec 24, 2020 11:17 pm Mike Kelley is no longer working in Moho. He has moved on to doing 3D animation, and last I spoke to him, he seemed very reluctant to dive back into Moho scripting.
Hello, and thank you Wes and F.M.,
Mike replied me confirming his reluctance with Moho as you'd wrote.
I hope to find a method, script or brush etc., that will simultaneously Lighten and Darken multiple Fill >"Color Points" &therein shape fills. And in that Mike recommended yourself and Paul if you'd time to suggest how i or you might code a capable script, perhaps utilizing his existing Adjust Color code which he authorized. Or suggest an existing script\tool that does so if it exists.
He'd also suggested this code segment as starting algorithm in lieu of any existing Color Points attribute you might please suggest:
shape.fMyStyle.fPointCol:SetValue(moho.frame, fColor)

Thanks for your consideration and any help or suggestions you've time for,
Merry Christmas,
Jeff
User avatar
hayasidist
Posts: 3515
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Adjust Colors Script

Post by hayasidist »

I can't take a long and serious look at this for a while... I have a job in progress that is going to be very much my foreground activity for another month or so ... but if you can be a bit more explicit about what you want that might make it a simple fix (it isn't immediately obvious what you mean by simultaneously lighten and darken -- e.g. if you're looking for (animated) light and shadow would having a greyscale (blend mode) overlay layer do the job??)
Paul aka hayasidist
danceman
Posts: 20
Joined: Sun Dec 16, 2018 5:17 pm

Re: Adjust Colors Script

Post by danceman »

Hi Paul,
appreciate your reply considering time of year, so soon as you've time to have a look is also appreciated. Each member jobs' been intriguing, hope yours completes with 0 debug time.

Explicit goal:
(summary): lighten and darken, vector "Color Points" Fills, as their vector shapes appear closer and further from the camera. ie:shade based on distance from lightsource,
(elaborate): A) using rotoscoped vectors of a character(s) limbs in switch-layers, running toward the camera &lightsource, i need to change the "Color Points" < Fill on each vector limb to lighter then darker, as they swing closer then further from the lightsource.

B) And i'm using a Switch-layer so that lightening and darkening on each keyframe will also be interpolated thru each tween frame. Would be ideal to paint ColorPoints lighter\darker with brushes in "Vector Studio"(for Adobe Illustrator)
C) Would prefer to lighten &darken One keyframe and apply those changes to All or Selected keyframes, like Mocha Pro UBER key or After Effects KEYTWEAK.

D) i'm definitely interested in animated! light &shading, so thought &read of Blend Mode layers, but wasn't sure if they'd affect "Color Points" or how to apply blend modes to selected curve ColorPoints. Perhaps your familiar applying blend modes if applicable to project setup in A) above?

Look forward to next soonest, thanks again, and Merry Christmas,
Jeff
User avatar
hayasidist
Posts: 3515
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Adjust Colors Script

Post by hayasidist »

this is a very quick and dirty example of blend modes.

it took longer to type this message and the upload info into YT than it did to throw the demo together...

4 layers:

the "lamp"
the light and dark from the lamp - soft edge / gradient fill - blend multiply
the monolith - four point rectangle - plain fill. movement is point motion.
the "stage" - straight vector...



https://youtu.be/zPXTYOsjdj8


-----
this is an example of using a greyscale image as the texture then overlaying with a solid colour:
https://youtu.be/KFcyaKehHxc

e.g. the grass is done by a greyscale brush that is used as the base over which is masked a colour layer in overlay mode -- that is animated fill colour from green to white ... (all done in Moho - 2d - about 3 years ago)

-----
bottom line -- you probably don't *need* to tweak point colours to do what you need (if you do then I'll eat my words!). e.g.

group - masking hide all
- colour - mask this layer - blend mode overlay
- switch for roto'd character limb - add to mask - interpolate

-- individual frame: use greyscale for relative depth e.g. x808080 for zero offset; xC0C0C0 for close (light); x404040 for far (dark) - make sure the layers have the same number of points if you want to interpolate - but probably not really needed at a high frame rate.


then, you could then put that structure inside a lighting group as in the first example -- i.e. replace the monolith with that colour group.


hth
danceman
Posts: 20
Joined: Sun Dec 16, 2018 5:17 pm

Re: Adjust Colors Script

Post by danceman »

Awesome, thanks Paul,
just got home to see your quad layer, gradient, blend mode tutorial i'm reading &soon to implement.
I agree it should affect ColorPoints fills without tweaks, and really appreciate adapting your technique to switch layer, limb roto's interpolation. Will reply likely needing assistance implementing since still relative newbie to killer Moho and your pro technique, so appreciate your patience and skill.
Also, read the following recommendations:
"..ds_color tool script which allows to replace colors for stroke and fill across individual or multiple layers with a tolerance option."
"..if you select a shape and alt click another shape with the select shape tool it copies the colours between them... (AS7)
And downloaded Every Moho\A.S. Keyframe script i could find,
..your technique is shown to work, but some combination may provide additional control of required animated, Uber edited results wrote of in C).
Look forward to talk soon, thx again,
Jeff
Post Reply