kirk23 Posted June 30, 2019 Share Posted June 30, 2019 On 9/12/2018 at 5:02 PM, MattyWS said: The reason for not wanting to use PNGs with transparency in game engines is that PNG files leave a colour bleed (say a leaf using an alpha channel would have a white outline for example, which only gets worse the further away it gets form the camera as it mips). TGA on the other hand allows you to still have colour in the whole image but edit the alpha channel directly, which means the problem with edge bleeding in engines goes away since we can put that colour in the RGB channels. I have an opposite experience : pngs being converted to tga have never leaved any color bleeding because png do not multiply alpha except for 100 transparent pixels which they make 100% black. That could be easily workaround with a special layer having 1% of opacity in AP. That 1% wouldn't allow black background in pngs and this 1% is not visible in a game because of dxt compression which would make it zero anyway. At least in our game engine that also accepts tga only as textures. Tga seems always per-multiply alpha and DO make color bleeding so you have to use something like Solidify plugin for Photoshop and work with color and alpha separately. Imo it makes more troubles than png converting which usually just a click in Xn converter or such. It would be nice to have TGA support but I personally would continue to use png + converter until AP would have Solidify plugin working at least. In general I would say I have higher priority things that make me still paying for Photoshop subscription. 1. alpha stacks using whatever blending math you need 2. "Layer comps" which allow to switch , pack in channels ( with 3d party script) and save automatically color/normal/roughness/metal/ao/height/ etc version of same document using layercomps names as file names ( by script) 3. Chain links in-between layers that allow to link transformation in between layers from different groups independently . An absolutely necessary thing to do non-destructive something and AP seems just one step behind . Wish they would make a checkbox to link same color coded layers temporary like "lock children" . 4. Export color/normal/roughness/metal/ao/height/ packed in different RGBA channels from the same slice 6. Height to normal, normal to curvature, normal to distortion vector, height to edge detection and a few other procedural effects for procedural filter IMO those things are much more lacking for a game artist, not tga at all ps. Right now I have to use Substance Designer where its all and much more possible but gosh it's so huge pain in a..., so terribly inconvenient in its every UI part and tool/node while being node based. Wish a kind of new generation of image editors , vector or pixel based could help to get rid of SD. Too bad neither Photoshop nor AP could do so. bmobius and SrPx 1 1 Quote Link to comment Share on other sites More sharing options...
fde101 Posted June 30, 2019 Share Posted June 30, 2019 PNG compression is lossless so if some kind of "color bleed" is happening that is a flaw in the software being used, not in the file format. PNG is much more complex to implement than the relatively simple TGA format, so if someone is coding a custom engine and does not want to use an external library or take the time to write code to support the format, supporting TGA makes much more sense logistically than PNG... though if time is taken to implement the desired support, PNG is technically the superior format. bmobius 1 Quote Link to comment Share on other sites More sharing options...
.eb Posted July 2, 2019 Share Posted July 2, 2019 @Kirk, with the way Affinity Photo handles Alpha channels (merging masks into flattened images) .. this is not a tool for professionals outside of painters and photographers. I can't imagine an game developer being ok with the "required to flatten an image for alpha to be used". It's beyond moronic. You can not edit an alpha otherwise. That is stupid beyond measure!!! Game Developers should currently avoid this program..for a few reasons.. like TGA-Alphas not existing no matter how many have mentioned it... or the alpha channel workarounds required which can make you sea sick with wasted time. 'but I would avoid Aff.Photo simply because of how the developers here act like Apple forum users... They assume shit that isn't correct and they're arrogant about their ignorance. I have 20+ years in digital art..these guys are digging their own graves. At least Aff. Designer is decent. Quote 20 years of technical 3d, tool dev, tech art experience. There's more to that but I'm just trying to thwart the 101-filler-text people put in replies. I love everyone.. I come across as grumpy but I have a big heart. Link to comment Share on other sites More sharing options...
kirk23 Posted July 2, 2019 Share Posted July 2, 2019 5 hours ago, .eb said: @Kirk, with the way Affinity Photo handles Alpha channels (merging masks into flattened images) .. this is not a tool for professionals outside of painters and photographers. I can't imagine an game developer being ok with the "required to flatten an image for alpha to be used". It's beyond moronic. You can not edit an alpha otherwise. That is stupid beyond measure!!! Honestly I don't even understand what do you mean exactly. Composite alpha? Game textures use one single alpha anyway and a practice to paint something into alpha by hand directly is ill one IMO. You could do a separate group of layers with it's own blending math, adjustment layers, vector shapes and hand painting and then use procedural filter to turn the whole group into composite alpha values or any other of RGBA channels, switching it off and on to preview when necessary while restricting alpha input for other layers. And pack anything to any of RGBA within the main layer stack in general. Same way you could in Photoshop where painting in alpha or even layer masks directly is absolutely not necessary too. An idea of regular layer masks in Photoshop is kind of outdated technique. Why using totally destructive layer masks while you can use non-destructive group clipping instead with it's own mask stacks with smart objects etc. Same in AP and embedded docs in mask stacks So I kind of not exactly sure where is the issue. Then you could export as png or tiff and use 3d party converter . If I am not wrong Batch Photo one for example could even do it automatically without you doing a click by looking for a new files to convert in certain input folder. I agree, would be nice to have it in AP indeed without any 3d party solution but I am lacking layercomps and chain links from Photoshop much more. A necessity to keep embedded doc somewhere in the main layer stack to keep it accessible and editable after cloning into another layers mask stack is also annoying imo So to some extent I agree AP is not ready for gamedev/textures yet , just not because of tga export or alpha channel editing. To be honest Photoshop is not very well suited for gamedev too so I believe AP could do better actually. For example they could implement a kind of edge wear mask system based on depth/heigh and normal input imported from Zbrush within "procedural filter". Like Substance Designer does. The math in use is simple like 2x2 and in fact you could do same in any image editor but with proper live filter interface it could be so much more convenient. Each time I do something in Substance Designer I feel myself like a robot drawing something with a huge long robotic arm holding a brush . AP seems so close and needs so few minor touches to be able to do all the same but with much more natural artistic feel of an instrument and a canvas behind your fingerprints. bmobius 1 Quote Link to comment Share on other sites More sharing options...
hrondleman Posted July 2, 2019 Share Posted July 2, 2019 @Andy Somerfield, The main reasons TGA is used over PNG in game development are that TGA is a very simple format, which makes it quick to implement, and related, TGA image data can be stored as raw image data or lossless compression as required. The most significant difference is TGA stores data as "dumb" RGBA channels, whereas PNG stores this as RGB and Transparency, for most cases this is fine, however the alpha channel in games is often used to store non-colour data, where each channel represents something entirely different. The functional difference here is 0% opacity gets exported with static colour data (either white or black) not the 'real' colour of the image, I'm not sure if this is actually defined in the spec of png or it is just the way it is implemented, however. Premultiplied alpha would also be a problem if this was actually exported this way, however as stated earlier this is not in the spec for PNG and it doesn't appear to be used in AP either. This is also the reason that alpha channel editing is requested (and very useful, there are workarounds for that, however using adjustments). Also, while I understand your reason for wanting to limit the exporters, it seems a little shortsighted to say "ask the other end to support png" when we are not talking about a single application not supporting it but many. Overall I like AP a lot and there are many features that I use that photoshop simply cannot comprehend (inverting a 32bit/channel image for example), however I still cannot use it for many purposes as it is limited to the idea that images are designed to be viewed as-is which in most of my use cases is not true. Edit: Also related, DDS support is also requested for the games industry, as it is widely used due to it being able to be decompressed on GPUs, and allows for mipmaps to be directly included (and edited, in special circumstances). Mystical, OrangeIsALie, SrPx and 1 other 4 Quote Link to comment Share on other sites More sharing options...
fde101 Posted July 2, 2019 Share Posted July 2, 2019 10 hours ago, .eb said: your reply shows your ignorance level of the subject matter. likewise 10 hours ago, .eb said: Maybe read up on the subject before posting replies ? I have... in the specifications. PNG is lossless and is defined to support a non-premultiplied alpha channel when transparency is provided. If you are suffering from unintended "color bleed" that is either due to an error in how you are using the file or a bug in the implementation. 10 hours ago, .eb said: an game developer being ok with the "required to flatten an image for alpha to be used". PNG and TGA files are alike in that they do not support multiple layers. The image will obviously need to be flattened to be saved in those formats. How were you expecting any differently? 4 hours ago, hrondleman said: whereas PNG stores this as RGB and Transparency Here we go again... the official PNG specification is here: http://www.libpng.org/pub/png/spec/iso/index-object.html#6AlphaRepresentation To quote from the specs: Quote An alpha channel included in the image array has 8-bit or 16-bit samples, the same size as the other samples. The alpha sample for each pixel is stored immediately following the greyscale or RGB samples of the pixel. Quote The colour values in a pixel are not premultiplied by the alpha value assigned to the pixel. 4 hours ago, hrondleman said: TGA is a very simple format, which makes it quick to implement Bingo. I agree that it should be supported, but let's try to get the facts straight on PNG as well. bmobius 1 Quote Link to comment Share on other sites More sharing options...
SrPx Posted July 2, 2019 Share Posted July 2, 2019 On 6/30/2019 at 2:54 PM, kirk23 said: ps. Right now I have to use Substance Designer where its all and much more possible but gosh it's so huge pain in a..., so terribly inconvenient in its every UI part and tool/node while being node based. Wish a kind of new generation of image editors , vector or pixel based could help to get rid of SD. Too bad neither Photoshop nor AP could do so. Actually SD is a very specialized tool , more than a equivalent one. Specifically for games, a shader, material editor (and assets browser, and...) for game art, if anything. It is expecting a tool like PS or AP get to be a specialized tool in that niche instead of being a general work horse.... I too would like those features, in any of the two, but.... (I'm curious about why you don't like Substance's UI, but that would be OT ... BTW, I thought they were finally going to eliminate the perpetual purchase option... they've only hidden it a little. By this date, I thought it'd be no more purchase option there... Ouch... now with Adobe having acquired it, and becoming soon part of the CC... "I’m looking forward to sharing more details about how we’re incorporating Allegorithmic’s Substance tools into Creative Cloud over the coming months." ) Patrick Connor 1 Quote AD, AP and APub V2.5.x. Windows 10 and Windows 11. Link to comment Share on other sites More sharing options...
kirk23 Posted July 2, 2019 Share Posted July 2, 2019 2 hours ago, SrPx said: (I'm curious about why you don't like Substance's UI, but that would be OT ... BTW IMO Substance Designer is just one more image editor. They have a nice baker inside still missing a key feature of being able to bake from UDIM textured hi-res objects. And no it's not a shader editor, maybe partly with its pixel processor but in general it's just a node based image editor. Problem is while it's super flexible master of all trades, a kind of a swiss knife it's basically same inconvenient as a swiss knife usually is. I appreciate its node based flexibility but I prefer a simple hammer , convenience over flexibility. They are not the same things. All its basic node/tools are monstrously, unbelievably inconvenient starting from transform gizmo, svg vector tools or curve editor. I've been asking for scaling around a transform center for years. HLS node is almost unusable and you really start to appreciate AP "picker" in curve editor once you try it in SD. It lacks so many all those tiny conveniences we all have accustomed in something like Photoshop years ago already. You have to spend months to make more or less usable tools for yourself there and with a next update half of them are getting glitchy. It's beside the idea of doing everything procedural itself . Which is crazy thing IMO. Once you try to use it as a mixer with hi-res photogrammetry scans it turns slow as hell. I am looking forward to their new Alchemist but from what I saw so far I am not very impressed either. It's just unnecessary extra buildup over same Substance Designer approaches. They just don't understand what artist friendly things are. I bet it's because they mostly listen what various technical artists tell them . That folks usually have codding background experience not an art one. I believe we need just a few "specialized" things in AP and it could be actually better than what Allegorithmic is doing. For art guys at least. ps. I'v been using SD for years already and half of a time you have to care about documenting what you are doing there. Make comments, write special on screen remarks because if you don't the document turns into undecipherable Gordian knot . A week later you couldn't understand a thing in your own files among all those "exposure parameter" and functions. A totally crazy thing either about their UI It's so much a relief to be able to simply pick things of screen in AP or switch some layer on and off quickly to recall what it's doing. Weirdly impossible thing in SD while still perfectly possible in Blender node system for example.( M for bypass a node) Also a thing I requested for years, still "impossible" bmobius 1 Quote Link to comment Share on other sites More sharing options...
SrPx Posted July 3, 2019 Share Posted July 3, 2019 1 hour ago, .eb said: then the old Super PNG exporter Hey, I remember that one.. I did a ton of experiments to get PNGs really small, back in the day when that did matter (it still does, but people care a lot less), in the web. I believe it was also as a standalone command line utility. And Pngcrush, (I believe it was my favorite) and a bunch more of those out there (PNGOUT, etc). Yep, these utilities often allowed to apply extra functionality, not only optimizing... Quote 20 years in digital art and dozens of softwares 25 years or so (not counting the years when I was doing digital and trad art but not getting paid (apart from the typical portrait, lol) for it), too, here (and like 10 years ago, lost the count on apps handled. too many companies, too). Main skill learnt of all that ? : Patience. Quote AD, AP and APub V2.5.x. Windows 10 and Windows 11. Link to comment Share on other sites More sharing options...
kirk23 Posted July 3, 2019 Share Posted July 3, 2019 8 hours ago, .eb said: @Kirk Painting in alpha is a bad thing ? then you're an amateur. Painting in alphas or even layer masks is not bad nor good, it's just a bit outdated approach People have been whining about Photoshop layer masks not being live, auto-updating and non-destructive for years. Now after introducing clipping groups couple years ago (since CS6) you could use smart objects as masks stacked in it's own mask stack order and blending math providing basically same flexibility as node based image editor. I don't use regular layer masks in my psd files at all anymore. You could do same in AP, well not same but close. In a word you can paint to alpha whatever you want. You just don't need to do it directly in channel dialog and could use regular layer stack for this in much more flexible and non destructive way. Procedural filter could make any layer group to be Alpha or any other of RGB , swap in between channels, etc. Just look at it closely . In my opinion AP needs to overcame still existing gap to Photoshop regarding non-destructive, 100% adjustable work style absolutely necessary for texture art first and then make all that tiny extra adornment like tga etc. bmobius 1 Quote Link to comment Share on other sites More sharing options...
Mystical Posted July 3, 2019 Share Posted July 3, 2019 On 7/2/2019 at 6:33 AM, hrondleman said: Edit: Also related, DDS support is also requested for the games industry, as it is widely used due to it being able to be decompressed on GPUs, and allows for mipmaps to be directly included (and edited, in special circumstances). I didn't want to push the envelope on feature requests but I too agree, DDS would also be awesome to support but if I had to choose I'd still prefer TGA was added into Affinity Photo first. If its not too much trouble all Affinity team needs to do is implement an exporter for TGA and its the end of the story really. Other than the fighting going on between a few members in this thread (which I hope affinity team does not write this thread off due to that) I hope the points made by several members of why we want TGA support will suffice as good reason to have it added. If Affinity Team does not want TGA as a core exporter because it does not fit their vision maybe have it as a plugin. This way users could choose to install and anyone who sees TGA as 'bloat' won't see it unless they use the add-on. I'm pretty much looking for any alternative or compromise we can get to have TGA a reality in Affinity Photo. bmobius 1 Quote Link to comment Share on other sites More sharing options...
bmobius Posted July 3, 2019 Share Posted July 3, 2019 3 hours ago, Mystical said: I didn't want to push the envelope on feature requests but I too agree, DDS would also be awesome to support but if I had to choose I'd still prefer TGA was added into Affinity Photo first. If its not too much trouble all Affinity team needs to do is implement an exporter for TGA and its the end of the story really. Other than the fighting going on between a few members in this thread (which I hope affinity team does not write this thread off due to that) I hope the points made by several members of why we want TGA support will suffice as good reason to have it added. If Affinity Team does not want TGA as a core exporter because it does not fit their vision maybe have it as a plugin. This way users could choose to install and anyone who sees TGA as 'bloat' won't see it unless they use the add-on. I'm pretty much looking for any alternative or compromise we can get to have TGA a reality in Affinity Photo. THIS! All of this! Even if you only consider .TGA a legacy format, there is still a sizeable number of artists working with this venerable format. It would be a great addition to have .TGA export included either natively OR as a plugin. I too am also a huge fan of .DDS and the way it handles mipmaps and I would be delighted as can be to see that implemented as well. Getting back to the point, Affinity Photo is SO CLOSE to being a perfect replacement (GENERALLY SPEAKING) for Photoshop, at least from a game development / game artist standpoint. Other talented artists that I currently have the privilege of working with are eagerly watching to see how AP continues to develop. Many of them have their hands on their wallets, ready to scoop up a copy just for their own use. Lastly, as AP can effectively import .TGA, how hard would it be to also allow for export? I encourage Serif to give this format some serious consideration and move to implement as soon as possible in one of their upcoming updates! Mystical 1 Quote Link to comment Share on other sites More sharing options...
Staff Andy Somerfield Posted July 5, 2019 Staff Share Posted July 5, 2019 Thanks guys, An interesting discussion - kirk23 - you make a good point about PNG optimising away colours when alpha is zero. This is a strong enough argument to justify the inclusion of TGA as an exportable format - so we will implement it. A .eb: Do not make ad hominem attacks on other users - it makes you look like a child and if you continue I will remove you from the forum. adirusf, R_G, SrPx and 12 others 14 1 Quote Link to comment Share on other sites More sharing options...
bmobius Posted July 5, 2019 Share Posted July 5, 2019 14 hours ago, Andy Somerfield said: Thanks guys, An interesting discussion - kirk23 - you make a good point about PNG optimising away colours when alpha is zero. This is a strong enough argument to justify the inclusion of TGA as an exportable format - so we will implement it. That is fantastic news! Andy, please give our sincerest thanks to yourself, other moderators, and the talented developers at Serif for going forward with .TGA implementation! Quote Link to comment Share on other sites More sharing options...
ashf Posted July 8, 2019 Share Posted July 8, 2019 good news Quote Link to comment Share on other sites More sharing options...
MattyWS Posted July 9, 2019 Share Posted July 9, 2019 Awesome news! Quote Link to comment Share on other sites More sharing options...
Mystical Posted July 9, 2019 Share Posted July 9, 2019 Thank you for the future TGA implementation, this is fantastic news. Thank you affinity team. Quote Link to comment Share on other sites More sharing options...
mutatedjellyfish Posted July 31, 2019 Share Posted July 31, 2019 Thank god! Quote Link to comment Share on other sites More sharing options...
Kuso77 Posted August 17, 2019 Share Posted August 17, 2019 THANK YOU SERIF!!! You guys and gals are awesome. Launched photo today, and just had a feeling I should check to see if TGA was there as an export format. When I saw that option on the far right, my heart jumped. Had to close export and open it up again just to be sure. Just exported a TGA w/ transparency (using default settings) and imported it into UE4. Transparency showed up perfect w/o any further setting manipulation in UE4! Shouldn't this issue be marked as solved? SrPx and Patrick Connor 2 Quote Link to comment Share on other sites More sharing options...
myclay Posted August 18, 2019 Share Posted August 18, 2019 Transparency is definitely not working as it should here, the transparency still eats away information of the other channels. Quote Sketchbook (with Affinity Suite usage) | timurariman.com | artstation store Windows 11 Pro - 23H2 | Ryzen 5800X3D | RTX 3090 - 24GB | 128GB | Main SSD with 1TB | SSD 4TB | PCIe SSD 256GB (configured as Scratch disk) | Link to comment Share on other sites More sharing options...
fde101 Posted August 18, 2019 Share Posted August 18, 2019 3 hours ago, myclay said: Transparency is definitely not working as it should here, the transparency still eats away information of the other channels. The PNG and TGA file formats are both defined as NOT pre-multiplying the alpha channel. As both are also lossless formats, if PNG is being exported without the added transparency data, there is no reason to expect it would be any different for TGA. This is a software implementation issue, not a characteristic of the file formats. Try this: in Affinity Photo, create a new document with a transparent background. Switch to the brush tool, choose a blue color, with opacity at 100%, draw a quick vertical stroke somewhere on the canvas. Then keep the same blue color selected but reduce the opacity to 0%, and draw a second stroke right next to it. Go to the channels panel and turn off the visibility (eye icon) of all channels except the blue one. You will only see *one* brush stroke. When opacity is at 0%, the color data is not even being recorded by Affinity Photo, so there is nothing there to export. It is not just brushes either: the same thing happens with shapes. Affinity Photo is "optimizing away" anything with 0% opacity internally, so it doesn't matter what format you export in - you will see this same behavior. Quote Link to comment Share on other sites More sharing options...
fde101 Posted August 18, 2019 Share Posted August 18, 2019 Actually, the brush is a bad example - shapes are more telling. Here I created three rectangles filled with one shade of blue, and three with a sort of greenish shade that still has some blue in it. I gave all of them white strokes so that the strokes would stand out when looking at all of the channels. opacityZero.mov Note that in the end, looking at the blue channel only, the rectangles with 100% opacity and the ones with 1% opacity look exactly the same, but the ones with 0% opacity disappear (except for the white strokes). You can see from this that the channel in general is not pre-multiplied - it is not reflecting the 1% vs. 100% opacity - but there is something about the implementation that is causing the 0% opacity to drop off. You can also see that the two different colors are reflected as different shades in the channel, so it is not showing the channel as a black/white mask or similar: it is reflecting the actual channel values. This is NOT a PNG vs. TGA issue - it is something in the implementation of the alpha channel within Affinity Photo itself. SrPx 1 Quote Link to comment Share on other sites More sharing options...
Staff Patrick Connor Posted August 18, 2019 Staff Share Posted August 18, 2019 @fde101 This thread is not the best (only) place for these comments. How about making a bugs post or adding to @myclays bug post fde101 1 Quote Patrick Connor Serif Europe Ltd Latest V2 releases on each platform Help make our apps better by joining our beta program! "There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self." W. L. Sheldon Link to comment Share on other sites More sharing options...
fde101 Posted August 18, 2019 Share Posted August 18, 2019 5 hours ago, Patrick Connor said: @fde101 This thread is not the best (only) place for these comments. How about making a bugs post or adding to @myclays bug post Thanks, I hadn't noticed that bug post until now. I didn't add one because I don't recognize this as a bug. It seems to be an intentional design choice in the engine, and not related to the export format, as it happens without an export. I was responding as part of an explanation of a post already on this thread, which is why it is here. Nevertheless, I will link back to this from that bug post as it does appear to be related. Quote Link to comment Share on other sites More sharing options...
Staff Patrick Connor Posted August 18, 2019 Staff Share Posted August 18, 2019 2 hours ago, fde101 said: ...as it happens without an export. This may make it hard to correct, but I understand how the alpha channel is used in TGA files for "other than transparent data" so this needs resolving for that use case even if it wouldn't draw differently when thinking of the data as true alpha Quote Patrick Connor Serif Europe Ltd Latest V2 releases on each platform Help make our apps better by joining our beta program! "There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self." W. L. Sheldon Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.