-
Notifications
You must be signed in to change notification settings - Fork 263
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
Portrait image rendering is not scaled with sufficient quality #1709
Comments
Is there a performance issue? There could be an option for rendering - FAST (no antialising, no interpolation) |
I appreciate your effort to improve the image rendering in MapTool. I for one has been disappointing of how scaled images look. However, I find your example troubling. The image on the right looks terrible to me, and much worse than the one on the left. Some of the text is near unreadable, and the edges of the characters look jagged. I really don't want MapTool to look like that. |
Indeed. That right side image is really terrible. As we will be moving to Java 14 in the very near future there may be other rendering options available or there may be other improvements that will help. Most of the decisions about the scaling inside of MapTool happened a long time ago and performance was certainly a concern at the time. |
oops, sorry, I mixed up left and right, the left is the one that I've patched |
…ing when zoomed, also for Portrait image rendered alongside stat sheet. Quick fix only, doesn't address any of the spread out rendering hint logic. Fixes RPTools#1709
…Since the portrait is scaled this leads to a better looking picture - same as asset viewer. Fixes RPTools#1709
From some tests I did, I believe the zone renderer currently uses I tried switching it to Also, I found some options for resizing images in Java: https://stackoverflow.com/questions/24745147/java-resize-image-without-losing-quality |
I'm sure lots of people have done studies/analysis trying to figure out the best approach for a given situation. Might as well take advantage of that. I'm off to read the SO link... |
The ZoneRenderer doesn't use a scaling hint right now - we tried that but the difference was not THAT visible and rendering speed decreased. VALUE_INTERPOLATION_BILINEAR Is used in Overall I found the improved quality when scaling a token to be not significant enough. @Merudo do you have a screenshot? I'm still wondering if background images should at least be scaled with a hint. Ultimately we'll need an option to turn on/off high quality rendering to not lock out slow machines. |
When you inspected the images for quality, which scaling did you choose? In my tests, the difference was very pronounced at about 50-80% scaling. And yes, I agree the user should be in control for this. We could easily let the user select between nearest neighbor, bi-linear and bi-cubic. Most videogames have tons of settings related to graphics (texture quality, anti-aliasing, VSync, tessellation, occlusion, anisotropic filtering, HDR, shadows, etc.), I don't think us having a single interpolation setting would be too much. Especially since in my experience, in VTT around 50% of movement is zooming in and out :) |
The link to your now defunct commit related to the zone renderer: nmeier@7ef77f9 |
Yea, that top one is definitely more readable. I'm not opposed to adding a Graphics? Video? Performance? section (tab?) for 1.8 and add some options. I don't think there is a UI option (just /command?) for Craigs noise filter thing either which could be added? |
Though it's a sidenote, the noise should go in the existing accessibility tab (imo) |
Such a high quality background image works well, yes. Question for me was whether the performance hit is ok for pattern images. And tokens themselves seemed not significantly better without pixel peeping. There should be an issue for a real rendering hint/quality of rendering setting, yes. |
A new issue to add a rendering quality selection to the Application -> Performance preferences for selecting interpolation method and the noise filter settings to Accessibility -> Visual(?) would be a good idea. The quality improvement doesn't justify the 10x performance hit for bicubic and the 2x hit for bilinear for me but those with gaming rigs I'm guessing won't be impacted. |
Tested. Portrait rendering improved. No adverse side effects observed. |
Fair enough and good point. I think there is also a Performance section with just 2 options. Maybe an assessment of what goes where is needed. A little housecleaning. It's easy enough to move those things around in the same dialog. |
Describe the bug
Various places in MapTool set or don't set the rendering hint for interpolation. The PointerTool painting the portrait for example sets no hint, resulting in a badly scaled image. The Handout (AssetViewer) does set Bilinear (only applies when picture is larger than screen size).
Also considered : the Token rendering itself (ZoneRenderer) is done without appropriate hint (right side, left side with patched in rendering hint)
The ImagePanel has a switch - shrink with bilinear, grow with bicubic as of #691
To Reproduce
Look at rendered images.
Expected behavior
Use bilinear everywhere consistently, not sure bicubic is worth it anywhere.
MapTool Info
Desktop (please complete the following information):
Additional context
SwingUtil has a common antialiasing method/pattern, that should probably be used everywhere. Maybe it should just set up antialiasing and interpolation hint to 'pretty'. There are some spots in code that explicitly turn off antialiasing (sharp lines needed).
The text was updated successfully, but these errors were encountered: