A simple Python script that converts a Photoshop file to a p2d5 package used by the Disguise Designer software and media servers.
PSD25D depends on psd-tools and Pillow, so install those packages using pip3.
pip3 install psd-tools Pillow
Make psd2p5d.py executable (this is optional)
chmod +x psd2p5d.py
PSD25D takes a single argument which is a Photoshop file containing multiple layers.
./psd2p5d.py example.psd
- The top most layer in the Photoshop file should be the foreground layer;
- The bottom layer in the Photoshop file should be the background layer;
- The bottom layer cannot contain any negative (transparent) space;
- All layers are of equal width and height;
As this is work in progress, there are quite a few limitations still:
- Field of view is not calculated automatically;
- Scale and depth are not calculated correctly;