Page 1 of 1

Quick view of drawing area as values (grayscale, b+w)

Posted: 24 Sep 2021, 18:04
by johnfromncl
Hi
I like to view my drawing area now and then as greyscale (to see just the values of what I have created) because that gives important visibility and relative contrast information. Currently I achieve this by Effects > Colour > Black and white convertor, and have red as 76, green as 150 and blue as 29, and preview set.
I'm wondering if anyone knows of a way to show the values by simply clicking on a button or using a shortcut. Is there a script for this? Toggling would be easiest, but a different shortcut or button to revert back to the original colours in the drawing area would also be fine. Hopefully this would also NOT show the effects panels which tends to hide some of my drawing area on my setup.
Any help gratefully received.
Many thanks
John

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 25 Sep 2021, 01:44
by Svengali
johnfromncl wrote: 24 Sep 2021, 18:04 Hi
I like to view my drawing area now and then as greyscale (to see just the values of what I have created) because that gives important visibility and relative contrast information. Currently I achieve this by Effects > Colour > Black and white convertor, and have red as 76, green as 150 and blue as 29, and preview set.
I'm wondering if anyone knows of a way to show the values by simply clicking on a button or using a shortcut. Is there a script for this? Toggling would be easiest, but a different shortcut or button to revert back to the original colours in the drawing area would also be fine. Hopefully this would also NOT show the effects panels which tends to hide some of my drawing area on my setup.
This should be easy to do...
1. Save the FX>Black And White Converter as a bin file into your GEORGE folder and name it "Color2Gray.bin"
2. In a new Action Button, create an embedded George Script that contains the following lines (press Select All, then copy the lines so you can paste them into the embedded script):

Code: Select all


 JohnPath = "jf/Library/tvp animation 11 pro/default/george/Color2Gray.bin"
 JohnPath = '"'JohnPath'"' // note enclosing quotes are '""'  single,double,single - necessary because of the spaces in tvp animation 11 pro

 tv_StackExecute JohnPath

 MButton = 0
 While MButton == 0
	tv_WaitButton
	parse result MButton d
END
tv_Undo

What the embedded script does is:
1. Executes the Color2Gray FX (stored in your GEORGE folder) which turns your image to gray according to your settings...
2. Then it waits for you to click any mouse button...
3. Then it executes an UNDO which restores back to the original color

you won't see the FX window.
sven

Thanks NathanOtano!!!

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 25 Sep 2021, 19:01
by johnfromncl
Many thanks for this... but I haven't quite got it working yet.

My lack of knowledge means I'm not quite managing to get the steps right on my mac.
What I did was export the .bin file to jf/Library/tvp animation 11 pro/default/george/Color2Gray.bin
Notes:
1. After having first made a backup of the 'tvp animation 11 pro' folder in case!
2. jf is my home folder
3. Using 'default' as part of the path above was a bit of a guess - which I feel is possibly wrong.

I then created a button ('C2G') and copied in the script above, so when I view the button contents it is
0 Embedded George Script (which has the script copied from above)
1 End

I then quit TVPaint, and even restarted my mac.

When I come back in and click on my C2G button I get the message 'There is no FX in Stack!' - suggesting to me that it hasn't found that bin file - perhaps - since I definitely had the Black and White Converter in the stack when I did the FXBin > Export.

So, for now, I'm not quite there yet. As always, any help will be very gratefully received.

Many thanks
John

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 25 Sep 2021, 19:51
by slowtiger
Simpler:
1. Create a new layer on top.
2. Completely fill it with middle gray (L=128).
3. Set layer mode to "colorize".
4. Switch layer visibility on and off.

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 25 Sep 2021, 20:10
by Svengali
Hi John,
I'm on Windows, so the embedded script expects that the GEORGE folder is inside the main tvpaint folder...

With Mac, I'm not sure what path needs to be included in the embedded script so that the bin file can be found (loaded and executed)... maybe one of the other TVPaint scripters (Nathan?) who knows the Mac can give you the correct syntax for that path to the .bin file.

line that needs to be edited: tv_StackExecute "George\Color2Gray.bin"

To anyone else reading this post, the script demonstrates a simple, toggle functionality that might be adapted to preview other FX (like blur or high-contrast, noise or drop-shadow.)

sven

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 26 Sep 2021, 14:19
by johnfromncl
Hi all and thanks for your suggestions. This is where all this is up to

1) What I'm aiming for is a click to see this greyscale values effect
FX Stack effect.png
FX Stack effect.png (35.51 KiB) Viewed 10768 times
My solution for now is to have the FX stack set up for this and to toggle the effect stack on and off - which is not perfect (since the effect stack is also used for other things) - but is fine if there aren't alternatives that can be got working.

2) Slowtiger's suggestion currently gives something different to the above. Namely:
Slowtiger effect.png
Slowtiger effect.png (26.21 KiB) Viewed 10768 times
3) Sven's suggestion - which I haven't got working on my mac due to not being sure where to export that .bin file (I've experimented without success) and then how to then point to it - is very nice in that (as he points out) it could be extended beyond just the black and white converter effect to be any stack effect being able to be toggled on and off. Really that is a major potential enhancement to the use of TVPaint in my mind - once set up in terms of bins and buttons - having the viewing of a range of commonly-used stack effects each a mere button-click away.

Any information on how to get Sven's solution working on a mac would be gratefully received, mainly because of this (in my mind) huge potential, but also for sorting my immediate black and white convertor accessibility issue without having to alter the stack (sometimes) before viewing it.

Any ideas on how I can get 3 above working?

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 26 Sep 2021, 14:43
by NathanOtano
Yop :) sorry i don’t at all have experience working on mac

For your purpose i’d just use a button to convert in grey scale as you want and then use undo, which is close to your use of fx stack and I think is the optimal version (you can even use a shortcut to toggle fx stack preview on and off if it exists?

I remember a toggle to see momentarily only some colors in the sketch panel, maybe you can try to see how it works? It’s a little eye

You may be able to script with george a color modification with tv_pixelmatrix I think. Sven’s option is also nice

If it works the way you alteady use it I would not bother scripting something else ^^

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 26 Sep 2021, 14:46
by NathanOtano
can you show us a path on your mac? maybe there is some spaces and accents that prevents sven’s script from working.
Maybe try to export your bin on your desktop to see if it works?

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 26 Sep 2021, 15:00
by johnfromncl
My path is /Users/jf/Library/tvp animation 11 pro/default/george/Color2Gray.bin. There are no .bin files in that folder, other than the Color2Gray which I put there by exporting to there.

(I'm aware that on my computer there is also /Users/jf/tvp animation 11 pro, but that does not have a george folder in it, so I haven't tried using it.) Really, I have no clue about TVPaint folders...

Another thing, I notice that Sven uses a backwards slash (the world of PC's), while my address is a forward slash (the world of macs), but I imagine that TVPaint handles that somehow. I experimented changing that slash, but it did not sort or change the error message I've been getting.

I'm now wondering if I need to figure out how to specify a full path address instead of what I image to be a relative one that Sven supplied...

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 26 Sep 2021, 15:13
by johnfromncl
I've just tried an absolute address by making Sven's first line
tv_StackExecute "/Users/jf/Library/tvp animation 11 pro/default/george/Color2Gray.bin"
But I still get the "There is no FX in Stack !" message on clicking my button.
Ditto when creating my .bin file on my desktop and pointing to that.

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 26 Sep 2021, 15:59
by Svengali
Hi John,

Go back and look at my original post where I just modified the embedded GEORGE script. Notice that your path is now hardwired so it could be assigned to a variable so that the entire path could then be enclosed in single-double-single quote sets (' " ').
This is necessary because your path includes spaces. Nathan's post reminded me that GEORGE requires special handling with paths that include spaces.

sven

EDIT: You might simplify things for yourself if instead of putting the bin file in the GEORGE subfolder, you instead create a desktop folder named FX where you can store a collection of various FX .bin files that are called by the tv_StackExicute command. Doing so would both simplify the path AND make it easier to add special FX .bin files you want to preview.

Also, you can create another button with an embedded script which will tell you, for sure, the path to your GEORGE subfolder.

Code: Select all

tv_GetPath GEORGE
tv_warn result

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 27 Sep 2021, 00:42
by NathanOtano
There is some response about how to handle mac vs windows slashs and other os related stuff is Madsjuul george library on the wiki i think maybe?

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 29 Sep 2021, 15:29
by D.T. Nethery
NathanOtano wrote: 26 Sep 2021, 14:43 =
For your purpose i’d just use a button to convert in grey scale as you want and then use undo, which is close to your use of fx stack and I think is the optimal version (you can even use a shortcut to toggle fx stack preview on and off if it exists?

I remember a toggle to see momentarily only some colors in the sketch panel , maybe you can try to see how it works? It’s a little eye

The little eye button is in the Sketch Panel. It will temporarily hide red, green, or blue pixels and show only black pixels. It is a keyboard shortcut called "Black Preview".
I don't know how it could be tweaked to convert color to greyscale , but that button might contain a clue ? I'm only chiming in here to mention the location of the little eye button, I don’t have any idea how to adapt it or show greyscale only.
QuickLook_Eye_Button_Sketch_Panel.jpg

.

Re: Quick view of drawing area as values (grayscale, b+w)

Posted: 30 Sep 2021, 14:16
by NathanOtano
yeah i feel this is a nice behaviour
I also think an external solution switch the global screen to grey scale with a shortcut would just be much easier to find ^^ https://9to5mac.com/2019/05/27/how-to-u ... -your-mac/