-
Notifications
You must be signed in to change notification settings - Fork 76
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
Downscale JavaFX Scene Preview #1013
base: master
Are you sure you want to change the base?
Conversation
It confused me when I saw the original percents, since for large scenes, amount viewed on screen was far more zoomed out than expected. Displaying the actual viewed scale and from what it was downscaled to, should hopefully make more sense.
An addition to this could be to crop the displayed area (at full resolution) instead of downscaling (but keeping the whole image). Will look into this. |
and fixed some comments and formatting
Suggested by @alexhliu.
tbh I don't get what the new context menu options do. Also the preview is terribly slow for high resolutions. Maybe we could always render the preview at the preview size and only render the real image at full resolution? 🤔 |
render at preview size would be... more difficult. I can look into changing it to that later. The menu with the size percents is telling you what its displaying it as is effectively 400% if it were the full image, but since it was downscaled its only zooming 200% on the downscaled image, as an example. I wanted to convey both values, because otherwise when you set the zoom, it may appear blurry or pixelated at a low zoom, and you might get confused about canvas size vs preview size (like I did at one point). idk how to otherwise convey both values. (If you are below the size where it scales the preview though, it will just have the standard %s and not mention downscaling.) |
Any ideas on how to make the options better? |
hmmm yeah that wording is a bit strange. It should be describing that the preview is zoomed to 400%, but due to downscaling, that 400% is down scaled 100% (or same zoom level as the output file will be), but since its zoom is 400% in javafx, its only displaying 1/16th of the pixels. Does that make sense? I didnt really know how else to describe it in a couple words... |
Weird issue with afterimages on preview; the code comes from pixel duplication somewhere, but I cant figure out where that is done...
This takes the JavaFX preview window and downscales the preview view to fit within the JavaFX canvas sizes, thus avoiding crashes that might otherwise happen. If using fit-to-screen, there should be little to no noticeable difference on most standard scenes. Scenes that are very tall and thin, or wide and short may be downsized somewhat.
Most of this was pulled out of #786. This will fix #314 and should fix #27.
This allows for renders of sizes larger than 4k on all computers without crashing (as opposed to crashing on different computers at different sizes above 4k). This makes the new effective largest size 26.7k square, or 18* 1920x1080 (34560 x19440) before crashing due to maxing out the SampleBuffer (This can be solved by replacing the double[] with a double[][], as done in #786)
Here is what the canvas scale dropdown looks like now when the canvas is large enough to be scaled (previously, only had the % value on the right):
![A screenshot showing the new Canvas Scale dropdown.](https://user-images.githubusercontent.com/4878558/127058124-e25aa06e-4513-46b2-a4f8-9e63d9192657.png)