2017-12-08 10:33:10 +01:00
|
|
|
YOGA - Yummy Optimizer for Gorgeous Assets
|
|
|
|
==========================================
|
|
|
|
|
2018-05-04 17:44:03 +02:00
|
|
|
|Build Status| |PYPI Version| |License| |Gitter|
|
|
|
|
|
2018-02-19 16:27:55 +01:00
|
|
|
.. figure:: https://github.com/wanadev/yoga/raw/master/logo.png
|
2018-01-15 17:11:24 +01:00
|
|
|
:alt:
|
|
|
|
|
|
|
|
**YOGA** is a command-line tool and a library that can:
|
2018-01-15 16:55:57 +01:00
|
|
|
|
|
|
|
* convert and optimize images from various format to JPEG and PNG,
|
2018-02-19 16:27:55 +01:00
|
|
|
* convert and optimize 3D models from various formats to `GLB`_.
|
2018-01-15 16:55:57 +01:00
|
|
|
|
2018-01-15 17:22:07 +01:00
|
|
|
**Images** are opened using Pillow_ and optimized using Guetzli_ (for JPEGs) and
|
|
|
|
Zopflipng_ (for PNGs).
|
2018-01-15 16:55:57 +01:00
|
|
|
|
2018-01-15 17:22:07 +01:00
|
|
|
**3D Models** are converted and optimized using assimp_. If models contain or
|
2018-01-15 16:55:57 +01:00
|
|
|
reference images, they are processed by YOGA's image optimizer.
|
|
|
|
|
|
|
|
Convert and optimize an image from CLI::
|
|
|
|
|
2018-01-15 17:11:24 +01:00
|
|
|
yoga image input.png output.png
|
2018-01-15 16:55:57 +01:00
|
|
|
yoga image --output-format=jpeg --jpeg-quality=84 input.png output.jpg
|
|
|
|
yoga image --help
|
|
|
|
|
|
|
|
Convert and optimize a 3D model from CLI::
|
|
|
|
|
2018-02-19 16:27:55 +01:00
|
|
|
yoga model input.fbx output.glb
|
|
|
|
yoga model --no-graph-optimization --no-meshes-optimization --image-output-format=jpeg --image-jpeg-quality=84 input.fbx output.glb
|
2018-01-15 16:55:57 +01:00
|
|
|
yoga model --help
|
2018-01-15 17:22:07 +01:00
|
|
|
|
2018-02-21 09:24:00 +01:00
|
|
|
.. _GLB: https://www.khronos.org/gltf/
|
2018-01-15 17:22:07 +01:00
|
|
|
.. _Pillow: https://github.com/python-pillow/Pillow
|
|
|
|
.. _Guetzli: https://github.com/google/guetzli
|
|
|
|
.. _Zopflipng: https://github.com/google/zopfli
|
|
|
|
.. _assimp: https://github.com/assimp/assimp
|
2018-02-19 16:10:09 +01:00
|
|
|
|
|
|
|
|
2018-11-20 11:21:15 +01:00
|
|
|
Install
|
|
|
|
-------
|
|
|
|
|
|
|
|
From PYPI (Linux / Mac OS?)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2019-09-30 16:51:10 +02:00
|
|
|
First install the build dependencies::
|
|
|
|
|
|
|
|
sudo apt install build-essential cmake python-dev python-setuptools
|
|
|
|
|
|
|
|
Then run the following command (as ``root`` on Linux)::
|
2018-11-20 11:21:15 +01:00
|
|
|
|
|
|
|
pip install yoga
|
|
|
|
|
|
|
|
|
|
|
|
From this repository (Linux / Mac OS?)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2019-09-30 16:51:10 +02:00
|
|
|
First install the build dependencies::
|
|
|
|
|
|
|
|
sudo apt install build-essential cmake git python-dev python-setuptools
|
|
|
|
|
|
|
|
Then clone the repository::
|
2018-11-20 11:21:15 +01:00
|
|
|
|
|
|
|
git clone https://github.com/wanadev/yoga.git
|
|
|
|
|
|
|
|
Go to the project's directory::
|
|
|
|
|
|
|
|
cd yoga
|
|
|
|
|
|
|
|
Build and install using the following command::
|
|
|
|
|
|
|
|
python setup.py install
|
|
|
|
|
|
|
|
|
|
|
|
Windows
|
|
|
|
~~~~~~~
|
|
|
|
|
2020-05-07 10:30:19 +02:00
|
|
|
The simplest way to use YOGA on Windows is to download the lastest standalone build here:
|
2020-04-17 15:22:56 +02:00
|
|
|
|
|
|
|
* https://github.com/wanadev/yoga/releases
|
|
|
|
|
2020-05-07 10:30:19 +02:00
|
|
|
You will have to install Microsoft Visual C++ Redistribuable for Visual Studio
|
|
|
|
2019 to run YOGA. You will find more information in the Zip you downloaded or
|
|
|
|
on in `this document <https://github.com/wanadev/yoga/blob/master/winbuild/README-windows-dist.md>`_.
|
2020-05-06 15:39:17 +02:00
|
|
|
|
2020-05-07 10:30:19 +02:00
|
|
|
If you need YOGA as a library or if you really want to build it yourself, look
|
|
|
|
in the `winbuild <https://github.com/wanadev/yoga/tree/master/winbuild>`_
|
|
|
|
folder.
|
2018-11-20 11:21:15 +01:00
|
|
|
|
|
|
|
|
2019-02-22 16:32:57 +01:00
|
|
|
Installing Development Dependencies
|
|
|
|
-----------------------------------
|
|
|
|
|
|
|
|
pip install .[dev]
|
|
|
|
|
|
|
|
|
2018-02-19 16:10:09 +01:00
|
|
|
Changelog
|
|
|
|
---------
|
|
|
|
|
2019-02-22 16:34:55 +01:00
|
|
|
* **0.10.2:**
|
|
|
|
|
|
|
|
* Updates assimp and python libraries
|
|
|
|
|
2018-11-20 11:23:54 +01:00
|
|
|
* **0.10.1:**
|
|
|
|
|
|
|
|
* Fixes an issue that occures when output file does not already exist
|
|
|
|
|
2018-06-13 14:32:18 +02:00
|
|
|
* **0.10.0:**
|
2018-05-29 16:24:41 +02:00
|
|
|
|
2018-06-13 14:34:03 +02:00
|
|
|
* Prevent overwriting of the output file when an error occurs (#17)
|
|
|
|
* Unicode path support (#16)
|
2018-05-29 16:24:41 +02:00
|
|
|
|
|
|
|
* **0.10.0b1:**
|
2018-05-14 10:42:22 +02:00
|
|
|
|
|
|
|
* Verbose and quiet modes,
|
|
|
|
* Allows to pass textures from memory instead of looking on the filesystem,
|
|
|
|
* Allows to pass a fallback texture instead of raising an error.
|
|
|
|
|
2018-04-05 14:41:21 +02:00
|
|
|
* **0.9.1b1:**
|
2018-04-05 14:50:13 +02:00
|
|
|
|
2018-04-05 14:41:21 +02:00
|
|
|
* Automatic selection of the output format (png or jpeg),
|
|
|
|
* Prevent duplication of textures that are shared between materials,
|
|
|
|
* Fixes Windows paths of textures.
|
2018-04-05 14:50:13 +02:00
|
|
|
|
2018-04-05 14:41:21 +02:00
|
|
|
* **0.9.0b1:** First release (only GLB output for models, no image auto
|
2018-02-19 16:10:09 +01:00
|
|
|
output format)
|
2018-05-04 17:44:03 +02:00
|
|
|
|
2018-06-13 14:32:18 +02:00
|
|
|
|
2018-05-04 17:44:03 +02:00
|
|
|
.. |Build Status| image:: https://travis-ci.org/wanadev/yoga.svg?branch=master
|
|
|
|
:target: https://travis-ci.org/wanadev/yoga
|
|
|
|
.. |PYPI Version| image:: https://img.shields.io/pypi/v/yoga.svg
|
|
|
|
:target: https://pypi.python.org/pypi/yoga
|
|
|
|
.. |License| image:: https://img.shields.io/pypi/l/yoga.svg
|
|
|
|
:target: https://github.com/wanadev/yoga/blob/master/LICENSE
|
|
|
|
.. |Gitter| image:: https://badges.gitter.im/gitter.svg
|
|
|
|
:target: https://gitter.im/wanadev/yoga
|