PhotoLine Image Assets for Games Requests

Hier diskutieren die Betatester von PhotoLine untereinander und mit den Entwicklern
Benutzeravatar
Herbert123
Mitglied
Beiträge: 2140
Registriert: Sa 12 Mai 2012 21:38

PhotoLine Image Assets for Games Requests

Beitrag von Herbert123 »

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.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
/*---------------------------------------------*/
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
Benutzeravatar
russellcottrell
Mitglied
Beiträge: 251
Registriert: Sa 26 Jul 2014 10:13
Wohnort: California

Re: PhotoLine Image Assets for Games Requests

Beitrag von russellcottrell »

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.
Benutzeravatar
Herbert123
Mitglied
Beiträge: 2140
Registriert: Sa 12 Mai 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Beitrag von Herbert123 »

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
Benutzeravatar
Herbert123
Mitglied
Beiträge: 2140
Registriert: Sa 12 Mai 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Beitrag von Herbert123 »

Like this:
sample.jpg
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
/*---------------------------------------------*/
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
Benutzeravatar
russellcottrell
Mitglied
Beiträge: 251
Registriert: Sa 26 Jul 2014 10:13
Wohnort: California

Re: PhotoLine Image Assets for Games Requests

Beitrag von russellcottrell »

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]
Benutzeravatar
Herbert123
Mitglied
Beiträge: 2140
Registriert: Sa 12 Mai 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Beitrag von Herbert123 »

russellcottrell hat geschrieben: Sa 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
Benutzeravatar
Gerhard Huber
Entwickler
Entwickler
Beiträge: 4143
Registriert: Mo 18 Nov 2002 15:30
Wohnort: Bad Gögging

Re: PhotoLine Image Assets for Games Requests

Beitrag von Gerhard Huber »

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.
Benutzeravatar
Herbert123
Mitglied
Beiträge: 2140
Registriert: Sa 12 Mai 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Beitrag von Herbert123 »

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
Beiträge: 3674
Registriert: Do 26 Nov 2009 22:59

Re: PhotoLine Image Assets for Games Requests

Beitrag von bkh »

Herbert123 hat geschrieben: Fr 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.
Benutzeravatar
Herbert123
Mitglied
Beiträge: 2140
Registriert: Sa 12 Mai 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Beitrag von Herbert123 »

bkh hat geschrieben: So 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
Benutzeravatar
Herbert123
Mitglied
Beiträge: 2140
Registriert: Sa 12 Mai 2012 21:38

Re: PhotoLine Image Assets for Games Requests

Beitrag von Herbert123 »

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
Benutzeravatar
russellcottrell
Mitglied
Beiträge: 251
Registriert: Sa 26 Jul 2014 10:13
Wohnort: California

Re: PhotoLine Image Assets for Games Requests

Beitrag von russellcottrell »

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.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Benutzeravatar
russellcottrell
Mitglied
Beiträge: 251
Registriert: Sa 26 Jul 2014 10:13
Wohnort: California

Re: PhotoLine Image Assets for Games Requests

Beitrag von russellcottrell »

packedIcon.png
Open it in Gimp and look at the channels.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
JulianZI
Mitglied
Beiträge: 736
Registriert: Di 19 Dez 2006 19:54
Wohnort: München

Re: PhotoLine Image Assets for Games Requests

Beitrag von JulianZI »

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.