exporting_images.rst 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .. _doc_exporting_images:
  2. Exporting images
  3. ================
  4. It is often desired to do an operation to all or a group of images upon
  5. export. Godot provides some tools for this. Examples of such operations
  6. are:
  7. - Converting all images from a lossless format to a lossy one (ie: png
  8. -> web) for greater compression.
  9. - Shrinking all images to half the size, to create a low resolution
  10. build for smaller screens.
  11. - Create an atlas for a group of images and crop them, for higher
  12. performance and less memory usage.
  13. Image export options
  14. --------------------
  15. In the "Export Dialog", go to the Images tab:
  16. .. image:: /img/exportimages.png
  17. In this dialog the image extensions for conversion can be selected, and
  18. operations can be performed that apply to all images (except those in
  19. groups -next section for that-):
  20. - **Convert Image Format**: Probably the most useful operation is to
  21. convert to Lossy (WebP) to save disk space. For lossy, a Quality bar
  22. can set the quality/vs size ratio.
  23. - **Shrink**: This allows to shrink all images by a given amount. It's
  24. useful to export a game to half or less resolution for special
  25. devices.
  26. - **Compress Formats**: Allows to select which image exensions to
  27. convert.
  28. On export, Godot will perform the desired operation. The first export
  29. might be really slow, but subsequent exports will be fast, as the
  30. converted images will be cached.
  31. Image group export options
  32. --------------------------
  33. This section is similar to the previous one, except it can operate on a
  34. selected group of images. When a image is in a group, the settings from
  35. the global export options are overridden by the ones from the group. An
  36. image can only be in one group at the same time. So if the image is in
  37. another group different to the current one being edited, it will not be
  38. selectable.
  39. .. image:: /img/imagegroup.png
  40. Atlas
  41. ~~~~~
  42. As a plus, an atlas can be created from a group. When this mode is
  43. active, a button to preview the resulting atlas becomes available. Make
  44. sure that atlases don't become too big, as some hardware will not
  45. support textures bigger than 2048x2048 pixels. If this happens, just
  46. create another atlas.
  47. The atlas can be useful to speed up drawing of some scenes, as state
  48. changes are minimized when drawing from it (through unlike other
  49. engines, Godot is designed so state changes do not affect it as much).
  50. Textures added to an atlas get cropped (empty spaces around the image
  51. are removed), so this is another reason to use them (save space). If
  52. unsure, though, just leave that option disabled.