Many times, your job requires you to output images in actual physical dimensions (such as A4 21cm * 29.7cm). However, the calculation of the physical size of an image requires the number of pixels and PPI, where PPI determines the printing accuracy. However, the image saved by Blender is always output in 72 or 96. We have to open Photoshop and create a new A4 300 PPI canvas, then render it in Blender and return to Photoshop to convert the 72ppi image to 300ppi. This problem has existed for at least 19 years ...Now it's time for it to end....
After clicking the "Enable" button, when you press F12 to output an image, it will include DPI information.(The image referred to here is the image of the output path)
Before outputting the image, please set the output path.
The rendered output image will carry DPI information.
In the input options, you can choose to adjust the paper size (cm) or pixel size (px), then set the DPI. You can preview the final output size.
Finally, click the "Force Sync" button to configure the image output settings.
After finishing, press F12 to output the image.
Proportional adaptation function can achieve a similar function to adjusting image size in Photoshop, scaling the image to the corresponding size proportionally.
The scaling ratio is determined by the initial rendering resolution.
Choosing the simple mode can interpolate and scale the initial rendering resolution to the final output resolution size.
Choosing the precise mode will render the final image size completely. You need to click the "Force Sync" button to set the final rendering resolution to the renderer.
About Us A development team from the BlenderCN community dedicated to improving Blender and promoting open source spirit since 2018
·As of the end of 2023, free technical support and services have been provided to at least 300000 Chinese language users
Fix the issue to meet the release requirements
This extension does not require special permissions.
Thanks for your contribution.
Extensions should not require any external functional components (other than Blender itself) that need to be downloaded from elsewhere. See the Extensions Platform Terms of Service.
In this case it means you need to bundle Pillow with your add-on.
If you can't (or don't want) to change your extension to adapt to it, you can self-host it without this restriction.
Also, it would read much better if the description could be first completely in English, and then (optionally) in Chinese.
We've added new mandatory fields: Featured Image and Icon. Featured Image is shown at the home page instead of the first preview image, and icon is shown in the extension's title (and later will be shown in Blender as well).
Could you please update your extension with an icon and a featured image?
Apologies for the late heads up.
Thank you for your reply. I will start making the necessary modifications
The utility of this extension seems questionable to me.
I'd suspect anyone rendering with the intention of printing is not rendering then sending a file directly to the printer and finding the DPI is incorrect. It's much more likely they open it in software that provides options for printing, and print from there.
Further, setting the DPI is just one kind of meta-data one might set for images. It would be possible to write a separate extension that sets other kinds of meta-data on Blender generated images.
For an extension like this to be more generally useful, it could support setting various attributes of a generated image.
Having said that, if there is some use case where it's important to set the DPI. This is something Blender could support trivially as reading/writing the DPI is already supported, there is just no UI to define it for rendered images.
From checking the code:
This add-on uses backslash literals as path separators which won't work on Linux or macOS.
Use os.sep
for the native path separator or utility functions such as os.path.join
or the pathlib
module.
This add-on uses absolute MS-Windows paths (including drive letters such as C:\
).
Add-ons should query the system using relevant API's instead of assuming absolute paths exist on the users system.
Got it, I will start fixing it
This tool is used to solve the dpi problem of Blender output images. Simply put, outputting a 300ppi A4 sized image that can be directly opened in Photoshop or Krita is the correct setting (without the need for manual pixel conversion). Currently, there is no place in Blender where ppi can be set This problem should have existed for 19 years
Here is a video that may help you understand its purpose https://www.bilibili.com/video/BV1xF4m1c7o1/
This issue has been changed according to the requirements in 1.0.3. Perhaps you downloaded the previous version 1.0.2. To avoid ambiguity, I have now removed 1.0.2
Fix some issues
Hey everyone,
Just a heads-up about a recent change regarding the licensing of add-ons on the Blender extension platform. Moving forward, all add-ons will need to be released under the GNU/GPL 3.0 license (SPDX:GPL-3.0-or-later). This is mainly to keep things simple and consistent across the board.
Previously, we accepted various licenses as long as they were compatible with Blender’s distribution. However, to avoid any confusion and streamline the process, all add-ons using the bpy API should now be presented as GPL 3 (the same license the Blender bundle is distributed). Regardless of whether the original code was under GPL 2, or something else like MIT or ZLIB.
Existing add-ons versions won't be affected. However, new updates will need to comply to the revised requirements.
Thanks for understanding, and feel free to reach out if you have any questions.
Pillow module should be bundled as wheel as already pointed before. If what I'm seeing now is response to that request it is done incorrectly. Please see the link provided and learn how to bundle it as a wheel, don't prompt user to install it (and remove that part from description as well)
Add-on zip should only include parts necessary to run it. Everything else (images, .gitignore, .gitattribute)
修复问题以满足发布要求
Fix the issue to meet the release requirements
Still not really convinced by the utility of this tool and find the promotional graphics misleading, as if changing the DPI causes the image to be higher quality.
My sense if - if this is at all useful. Blender itself can expose a DPI setting which is used when creating rendered images.
Please try using Blender to output a PNG that can be directly opened in Photoshop/Krita with dimensions of 21cm x 29.7m and 300ppi. (Limitation 1: Cannot directly input pixels (users do not want to remember or convert, please input physical dimensions directly) 2. Cannot cheat by changing PPI in Photoshop/Krita, if opened directly, it will be 300ppi) ———————————————————— Addendum: Both C4D and MAYA have this function, and printing requires direct output according to physical dimensions. Instead of calculating pixels and then having to go to Photoshop/Krita to change the PPI.
By the way, this issue has been around for almost 20 years. It should have been a built-in feature of Blender, rather than relying on our dozens of enthusiasts to save money to develop an extra add-on for Blender.
This is the earliest record I can find.
https://blenderartists.org/t/blender-dpi-settings-pixel-size-calculator/348195/41
Directly output accurate DPI based on physical size, instead of foolishly converting by pixel
In order to facilitate your understanding, I have added a video and changed the display image.
Or when Blender officially launches this feature, I'll delete it
(Being rejected again causes me some pain, I need to go have a can of beer first before continuing to work)
Blender ships with OpenImageIO python bindings, which can probably do the same as pillow? https://openimageio.readthedocs.io/en/latest/pythonbindings.html
I agree this is useful functionality and it would be good to have this native in Blender.
It would be best if the official support could be provided. But currently
Native support for DPI is being developed now and will be available in next versions, but I decided its good to still allow this, because 4.2 is LTS and people sticking to it might need this feature and we can't ask them to jump to newer version. But if there is too much overlap with native functionality in the future we might have to restrict this extension to be 4.2 only.
But before we approve, I want to give time in case you want to use OIIO module instead of Pillow, like brecht suggest above. Doing that means you won't have to ship PIL as wheel anymore and that will reduce the size of the add-on very very significantly. If that's too difficult for you I understand, but I would advise you to give it a shot anyway, at least it's gonna be good practice.
One minor note: Force synchronization button has description in Chinese. It should be in English unless add-on is being translated.
I will try to fix it and limit it to 4.2 when the time comes
The PR for DPI support in Blender is here with pre-built packages for testing: https://projects.blender.org/blender/blender/pulls/127831
Great, I'm going to test it now
Sign in to comment.
My friend, you don't need to perform rendering output conversion again This is the first tool in 19 years to completely end this problem, and you will witness history https://blenderartists.org/t/blender-dpi-settings-pixel-size-calculator/348195/40 https://blenderartists.org/t/render-at-300-dpi/430563/18