PhotoLine Image Assets for Games Requests

Hier diskutieren die Betatester von PhotoLine untereinander und mit den Entwicklern
User avatar
Herbert123
Mitglied
Posts: 1693
Joined: Sat 12 May 2012 21:38

PhotoLine Image Assets for Games Requests

Post by Herbert123 » Fri 02 Nov 2018 22:43

I have been getting more and more jobs related to creating and preparing game assets and interactive ebook design, which includes textures, game sprites, and working with alpha channels. And hitting brick walls again and again in PhotoLine, unfortunately.

Here are the issues I am encountering:

1) PNG export.

A) Any image with less than 256 colours is automatically saved as an indexed PNG. I tried the Export option, the Web export option, and the regular save option. No matter what I try, PhotoLine insists on saving an optimized reduced indexed palette version, which is infuriating, and really slowing down my workflow. Opentoonz (animation software) and InDesign (which I use for interactive epub ebooks creation) do NOT support indexed PNG files.

This means I cannot use PhotoLine in a very simple workflow: I have to export as a PSD, and then convert these PSDs to a full 24+8bit alpha PNG file. It is causing me constant headaches. Even sending a layer to an external PNG optimization tool like Color Quantizer results in automatic indexed PNG files.

I tried to export a 16bit per channel PNG with a simple graphic (few colours) and PhotoLine will export a correct 16bpc version. But when I switch the file to 8bit (background layer) or export the layers as PNG file (even from the 16bpx file) all the files are STILL saved as indexed ones! AAARGH!!! I NEED it to be 16bit or 8bit per channel when I tell it so!

This behaviour is fine with web export, but incredibly unwanted and painful for other work. Please let the user decide whether to save an indexed or full 24/32bit PNG file. It's driving me insane lately. There are no settings under the FILE options for PNG, and I am begging on my knees here for you guys to add several options to control the PNG output behaviour precisely.

B) A transparent layer or a layer with a layer mask is saved from PhotoLine with the transparent areas filled with black. This behaviour is great again for web work and results in much smaller files (obviously), but for game texturing work it is often absolutely essential that a PNG file is saved with a fully intact colour bitmap with an alpha channel.

For example, let's say we create a particle effect with a fire texture. We add a soft circular layer mask in the middle, at ~20% size. Now, in the game engine we'd like to use a shader to move the alpha channel randomly for each particle, so that each particle gets a different looking texture based on the same fire texture.

Can't do it in PhotoLine, because PL will fill the area that is transparent with black, and export it like that. Which results in a black hole in the original fire texture in the game engine. Basically, game designers want the colour map and alpha map completely separately saved in the PNG file. Filling areas which are black in the alpha channel/transparency with block colour, and thereby losing the colour data in the RGB channels is really completely undesirable for game asset prep.

I can't use PhotoLine for this work either at the moment. Again I save a PSD, and I am forced to use work-arounds in other tools.
Please, please allow for an option to preserve the colour data in the RGB channels when saving a PNG file with an alpha channel.


2) Channelpacking. See: http://wiki.polycount.com/wiki/ChannelPacking
How can we do this in PhotoLine? The channels do not allow me to paste a greyscale bitmap directly into a selected or isolated channel. I'd like to be able to control each channel individually, like this:
600px-SneferTileExplain.jpg
I hope the PNG issues can be resolved. (2) I can do in Gimp, if necessary.
You do not have the required permissions to view the files attached to this post.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait

User avatar
russellcottrell
Mitglied
Posts: 84
Joined: Sat 26 Jul 2014 10:13

Re: PhotoLine Image Assets for Games Requests

Post by russellcottrell » Fri 02 Nov 2018 23:53

If I undertand you correctly . . . .

You can save with transparency but PhotoLine has some odd background layer behavior. If you set the background color to transparent and try to cut a piece of the background, it doesn’t work. It works on other layers, or a duplicated background, with the background layer hidden. You get a transparent section that saves as a .png.

As to channel packing, the Change Channels tool does that. You can copy the clipboard, or another channel, to any channel.

User avatar
Herbert123
Mitglied
Posts: 1693
Joined: Sat 12 May 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Post by Herbert123 » Sat 03 Nov 2018 01:00

No, it's a bit deeper than that. Open a texture image, add a layer mask, and use a pure black to hide part of the texture. Then save an a PNG. Open the result in PhotoLine, and select the layer. Then create a layer mask based on Alpha (layer mask button in layer panel). This creates a layer mask based on the PNG's transparency. Delete this mask.

Result: black where the transparency is 100%. PhotoLine replaces the original bitmap data with pure black - which makes sense for web work, but for game texturing work this is often unwanted behaviour.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait

User avatar
Herbert123
Mitglied
Posts: 1693
Joined: Sat 12 May 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Post by Herbert123 » Sat 03 Nov 2018 01:02

Like this:
sample.jpg
You do not have the required permissions to view the files attached to this post.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait

User avatar
russellcottrell
Mitglied
Posts: 84
Joined: Sat 26 Jul 2014 10:13

Re: PhotoLine Image Assets for Games Requests

Post by russellcottrell » Sat 03 Nov 2018 04:03

At the risk of not getting it . . . I can save and open the image with transparency. I don’t get the purpose of creating a layer mask then deleting it. If you want access to the alpha channel, use Change Channels, copy transparency to the clipboard, then paste it as a layer; you get the part on the right:

[I can't get it to attach]

User avatar
Herbert123
Mitglied
Posts: 1693
Joined: Sat 12 May 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Post by Herbert123 » Sat 03 Nov 2018 08:41

russellcottrell wrote:
Sat 03 Nov 2018 04:03
At the risk of not getting it . . . I can save and open the image with transparency. I don’t get the purpose of creating a layer mask then deleting it. If you want access to the alpha channel, use Change Channels, copy transparency to the clipboard, then paste it as a layer; you get the part on the right:

[I can't get it to attach]
What I am trying to explain: PhotoLine fills fully transparent areas with black when exporting a PNG file. By opening a PhotoLine generated PNG file and removing the transparency through that layer mask conversion method, this is demonstrated. For game textures this is often unwanted behaviour, and the transparent parts should not be filled with black and instead the original data should be preserved.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait

User avatar
Gerhard Huber
Entwickler
Entwickler
Posts: 3557
Joined: Mon 18 Nov 2002 15:30
Location: Bad Gögging

Re: PhotoLine Image Assets for Games Requests

Post by Gerhard Huber » Sat 03 Nov 2018 08:45

All mentioned "problems" are made to make PNG files small.
Since PNG is first of all a web format, this was wanted in the last 30 years.
Since you have flat images only - PNG can't save other formats - and you want to use this files in other programs, I would suggest to use PSD.

User avatar
Herbert123
Mitglied
Posts: 1693
Joined: Sat 12 May 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Post by Herbert123 » Sat 03 Nov 2018 18:38

PSD is not an option for game engines like Godot (very popular one which I use). Those accept PNG and WebP files (and WebP files lose the bitmap information as well in the fully transparent areas, btw).

The PSD option to export work from PhotoLine is a cumbersome work-around, because I need other software to create the PNG files I need. I can't use PSD as an import format, so outside of PhotoLine I have extra steps to manage. Besides, PhotoLine's PSD files cause loading errors in some of the software that I use, and are not recognized as a valid PSD (which means I first have to open and save from GIMP: it seems PhotoLine saves PSD files without "maximum file compatibility preference", and this causes issues at times).

And you are using PNG as an intermediate format with the external program option between PhotoLine and other applications yourself - which counters your argument somewhat that PNG files must be made small and are meant for the web. But even when sending a layer as PNG to another application for processing will automatically convert a low-colour layer into an indexed PNG file. Arguably this is rather odd behaviour for an interchange format. It ought to remain full RGB.

The beauty of the 24+8bit transparency PNG format is that any application can work with these, and it is lossless. One file works in all applications. Not so with PSD files, and not so with the PNG files which are generated from PhotoLine. Not all software supports 8bit indexed transparent PNG files (even InDesign does not!). And I can't tell PhotoLine to always save a 24bit one - there is no such option to turn that behaviour off.

An example: two weeks ago I was preparing exercise files for an InDesign epub creation course I am teaching. I prepared all the assets in PhotoLine, and exported them all as PNG files. ...but had not noticed that a bunch of images contained less than 256 colours. PhotoLine saved those as 8bit indexed versions, and InDesign doesn't support such files, and renders them wrong. So that was a bit of an awkward moment in class, and I had to tell the students to first convert those files. (PNG files are preferred here, because an epub is just a zipped archive with xhtml files.)

PhotoLine is the only image editor on the market that automatically saves a low colour PNG file as an indexed 8bit one without asking the user. No other application does that! There is always an option that lets the user decide this.

Anyway, that's really the only thing I am asking: one option "force RGB" for PNG files. That alone would resolve 95% of the import problems.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait

bkh
Betatester
Posts: 3601
Joined: Thu 26 Nov 2009 22:59

Re: PhotoLine Image Assets for Games Requests

Post by bkh » Sun 04 Nov 2018 01:07

Herbert123 wrote:
Fri 02 Nov 2018 22:43

A) Any image with less than 256 colours is automatically saved as an indexed PNG. I tried the Export option, the Web export option, and the regular save option. No matter what I try, PhotoLine insists on saving an optimized reduced indexed palette version, which is infuriating, and really slowing down my workflow. Opentoonz (animation software) and InDesign (which I use for interactive epub ebooks creation) do NOT support indexed PNG files.
Seems you are barking up the wrong tree. Indexed PNG files are part of the standard that any PNG decoder is required to handle. See https://www.w3.org/TR/PNG/#15ConformanceDecoder.

For InDesign, you should be able to use tiff, though.

Cheers

Burkhard.

User avatar
Herbert123
Mitglied
Posts: 1693
Joined: Sat 12 May 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Post by Herbert123 » Sun 04 Nov 2018 01:44

bkh wrote:
Sun 04 Nov 2018 01:07

Seems you are barking up the wrong tree. Indexed PNG files are part of the standard that any PNG decoder is required to handle. See https://www.w3.org/TR/PNG/#15ConformanceDecoder.

For InDesign, you should be able to use tiff, though.

Cheers

Burkhard.
Well... Yes, of course it is part of the PNG standard. You misunderstand me: I never said I don't want that capability - as a matter of fact, I always optimize the heck out of all PNG assets in the final stages of a project.

The issue at hand is that PhotoLine doesn't give the user any choice in whether to save an indexed or RGB PNG. When an image contains less than 256 colours PhotoLine decides for us that it should save it as an indexed PNG file - whether we like it or not. Whether our pipeline in other software accepts those or not. Is that wise?

Yes, InDesign supports tiff files, but for epub (interactive fixed ebooks) I prefer to use PNG files, and then tell InDesign to use the original assets during epub export. InDesign positively s*cks (pardon my language here) at both optimization and resampling, and I optimize the PNG files with PhotoLine. Which means I require PNG files in this workflow. But InDesign doesn't accept 8bit indexed transparent PNG files. Lots of my artwork uses less than 256 colours, and PhotoLine exports those automatically as indexed PNG files without asking. See my dilemma?

I animate stuff using the same assets in OpenToonz. Again, OpenToonz doesn't support those indexed PNG files. And even if I WANTED to export full RGB 24bit PNG low colour files from PhotoLine , I just can't. Even the regular export option or save as option, and even the external programs PNG option: PhotoLine will ALWAYS save an indexed PNG file if it deems beneficial.

It's a workflow stopper for me. It slows my work down a lot. And the thing is that every other piece of software I have to process and save PNG files with does allow me to choose between the two. Any other image editor I have ever worked with allows for this with a simple option.

I am just asking that PhotoLine offers a similar option to feed the PNG library a simple parameter to force RGB 24bit, even with files which only have 16 colours, or even 2. Please, please allow users to decide for themselves whether they want to export an indexed or full colour PNG file with low-colour artwork.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait

User avatar
Herbert123
Mitglied
Posts: 1693
Joined: Sat 12 May 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Post by Herbert123 » Sun 04 Nov 2018 01:52

Apologies for my ranting. It's just that I love working in PhotoLine, and this little 'thing' is driving me up the wall at times.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait

User avatar
russellcottrell
Mitglied
Posts: 84
Joined: Sat 26 Jul 2014 10:13

Re: PhotoLine Image Assets for Games Requests

Post by russellcottrell » Sun 04 Nov 2018 05:13

I get it! You want this:
.
gimp2.jpg
.
You can do everything you describe above in PhotoLine, and save it as a .tif. Then open it in Gimp and export it as a .png and it is all still there. (Assuming that you don’t want to do it all in Gimp, which I can understand . . . .) Doesn’t sound too burdensome; I routinely use RawTherapee, SNS-HDR, and PTGui, and even Photoshop for printing because I don’t want to give up the Canon print plugin. So what’s one more program . . . .

ImageJ would be perfect for this if the darned thing would save alpha channels.
You do not have the required permissions to view the files attached to this post.

User avatar
russellcottrell
Mitglied
Posts: 84
Joined: Sat 26 Jul 2014 10:13

Re: PhotoLine Image Assets for Games Requests

Post by russellcottrell » Mon 05 Nov 2018 00:20

packedIcon.png
Open it in Gimp and look at the channels.
You do not have the required permissions to view the files attached to this post.

JulianZI
Mitglied
Posts: 709
Joined: Tue 19 Dec 2006 19:54
Location: München

Re: PhotoLine Image Assets for Games Requests

Post by JulianZI » Thu 08 Nov 2018 15:00

I support the need that the bitmap data in transparent areas should be also saved (optionally).

This is a big advantage if you wan't to create objects or refine the transparency created with the eraser later. This was a topic sometime before, that sometimes it is not possible to un-erase parts of the image. I feel it is connected to the same behavior.