Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pencil test feature #575

Merged
1 commit merged into from
Jul 8, 2016
Merged

Conversation

shun-iwasawa
Copy link
Member

@shun-iwasawa shun-iwasawa commented Jul 4, 2016

This PR is for the issue #562
New Pencil Test feature is added. Please note you need to add a "Pencil Test..." command to your menu bar in advance. The command is in "Menu Commands">"Scan&Cleanup" category.

Regarding supported camera, for now I'm using Qt library (QCamera class) for detecting devices. I tested with Logicool HD Pro Webcam C910 and Elecom UCAM-DLM130H. They worked fine. For Microsoft LifeCam VX-7000, OT failed to detect it directly so that I needed to go through virtual webcam software such as manycam. I have not tested any DSLR camera.

## Usage ### Choose camera and resolution - Select camera from the "Camera" combo box. - Select Resolution from the "Resolution" combo box. - Then the finder image will be shown in the preview area. ### Setting file & level name - Specify level name in "Name" input box by typing directly or click the right-arrow button which will input next available single-letter name automatically. - Specify frame number in "Frame" input box. If the file already exists, overwrite confirmation dialog will open. - Specify file type and save in folder path. Please note that the file will not be saved when you capture the images. You have to save the level afterwards. ### Adjust image - Threshold value is used only for "black&white" color type. - "BG reduction" is for reducing the unevenness of lighting (just like white balance). You need to capture white paper with "capture white BG" button before use this parameter. ### Onion skin - Onion skin is available for stop motion animation. It displays the previously-captured frame with specified opacity. ### Capture - Press "Capture" button, then the captured image will be placed in the current xsheet as raster level. - If you specify the same level name as the current cell content, then the captured frame will be set in the same column. If the level is different, the new column will be inserted for it. ### Checking the frame containing more than one levels - Use Preferences>Interface>"Show Raster Images Darken Blended in Camstand View" option so that you can see more than one non-transparent raster levels darken-blended both in the viewer and in the rendering result.

@shun-iwasawa
Copy link
Member Author

Jenkins

@shun-iwasawa
Copy link
Member Author

Jenkins

@shun-iwasawa
Copy link
Member Author

@turtleTooth
I know you are super busy on implementing other features, but could you please kindly review briefly this PR?
As written in my previous comment, I used QCamera for handling cameras. I already noticed that it has a problem: Capturing to buffer is not currently supported on Windows (according to this). So I had no choice but to save the captured image to file (in $TOONZCACHEROOT) for every frame, which slows the frame rate awfully. I'm thinking of transferring to another library (such as libgphoto2 as you suggested) for the future improvement considering the speed issue and DSLR support. Thanks!

@ghost
Copy link

ghost commented Jul 7, 2016

I tried it today and it is great. Truly wonderful. It worked very well and I am so excited for this feature. I would say that this is ready for pulling. There are a few things I suggest at least for the future.

Keep in mind that I love this feature, and these suggestions are small compared to how awesome this is to have in the software. I am also approaching this from a stop motion background. I have never done a pencil test, but I do stop motion a lot.

Is there a way to add a maximize button to the window? I found resizing the window to be something I had to do often.

Can Capture be linked to a shortcut? In stop motion, being able to capture with the enter key (DragonFrame) is very useful - perhaps a shortcut only for when the Pencil Test window is open.

Can the resolution be set to its highest value by default instead of its lowest? My camera started with 160 x 120 which isn't a very practical resolution.

One thing that DragonFrame does to keep quality high but playback smooth is capture two versions of the file. For playback it uses a jpg and records a tif for the final product. These are recorded to disk when the frame is captured. This is nice in case the program crashes, the images aren't lost.

Do you think the name Pencil Test might be changed to Camera Capture? There is a large stop motion community that would flock to this feature, and Pencil Test is a term that may not be as familiar.

The ability to playback at least the captured images in the window would be very useful but probably difficult to make happen.

Overall I love it! Thank you so much for this feature. I have wanted an open source stop motion program for a long time.

Do you want the current version merged as it is right now or is there anything you think needs changed before merging?

@ghost
Copy link

ghost commented Jul 7, 2016

Regarding libgphoto2, it doesn't look like it currently supports webcams (http://www.gphoto.org/proj/libgphoto2/support.php). DSLR support would be awesome, but I would hate to lose webcam support.

Right now, the libraries that I know that support webcams are QCamera, GStreamer, and FFMPEG. The current implementation doesn't see too slow here, but I don't know how it runs on slower hardware.

@ghost
Copy link

ghost commented Jul 7, 2016

I did get a crash just now when I had multiple captured levels and did a Ctrl R preview. I will see if I can duplicate it.

So far can't duplicate it.

@ghost
Copy link

ghost commented Jul 7, 2016

Saving and closing is slow. Is there a way to either show the progress of saving (or even just a window that says "Saving, please wait") so that users don't think the program has stopped responding?

Another solution would be to save the images as they are captured.

@ghost
Copy link

ghost commented Jul 7, 2016

Pencil test is awesome. Thanks for implementing it.
penciltest

@shun-iwasawa
Copy link
Member Author

@turtleTooth
Thank you so much for your detailed feedback on this feature.
Your suggestions are very helpful and I will tackle on them.

If the source codes seem to have no problem in your eyes, could you please merge this PR?
Then I will post your suggestions here as a new issue for discussion. Thanks!

@ghost
Copy link

ghost commented Jul 8, 2016

lgtm

@ghost ghost merged commit f8ebe3b into opentoonz:master Jul 8, 2016
@blurymind
Copy link

blurymind commented Jul 9, 2016

changing the resolution while in black and white color type crashed opentoonz once
Temp.zip

this bug is not easy to reproduce - didnt crash the second try

It would be nice to get a multifrme onion skin (shows more than one previous frames)

@blurymind
Copy link

blurymind commented Jul 9, 2016

Another nice to have feature would be to have the ability to shoot a reference video with the webcamera (in realtime) straight from opentoonz.
Very useful for acting shots!

@shun-iwasawa shun-iwasawa deleted the pencil_test_viewer branch December 1, 2016 01:36
@charliemartinez
Copy link

Hi! I'm very interested in using opentoonz for animations with stop motion technic.

But the software does not recognize any camera: neither the one that is incorporated in my laptop nor a new one I just bought, Logitech C922. Both cameras work without problems in other applications such as OBS and official opentoonz (from the AUR repositories of Manjaro).

But now that I'm using Debian, I can only install Morevna.

I am using the OpenToonz-1.2.0.3-morevna-18.06.17-linux64-b8b54 version. The previous one version presented the same problem.
Did it happen to someone else? Is there a solution?

Thank you very much from Buenos Aires, Argentina and congratulations for this excellent work.

@shun-iwasawa
Copy link
Member Author

The camera capture feature is using Qt's QCamera class.
I'm not so familiar with Linux, but according to this, someone advised as follows:

It looks like some GStreamer plugins are missing. Are all of them installed on your machine? (For GStreamer 0.10) Make sure gst-plugins-good, gst-plugins-ugly and gst-plugins-bad are installed.

Also in the Qt Manual it says;

To run applications that use Qt Multimedia, you might also need to install the following GStreamer plugins: 'good', 'ugly', 'bad', ffmpeg (0.10), and libav (1.x). These additional plugins contain various codecs for audio and video decoding, as well as the necessary components for using the camera APIs.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants