nick.ace Posted February 13, 2016 Share Posted February 13, 2016 @ScrotieFlapWack When I open the diffuse texture up in Leadwerks, it works. I had to change the compression type though. Every type of compression except DXT1 (the default one) worked. 1 Quote Link to comment Share on other sites More sharing options...
SlipperyBrick Posted February 13, 2016 Author Share Posted February 13, 2016 Changing the compression type on the texture doesn't seem to work for me, not matter what I do I can't get the black background to go haha. Quote Link to comment Share on other sites More sharing options...
nick.ace Posted February 13, 2016 Share Posted February 13, 2016 Yes it is application specific. Until today had never seen an 8bit representation of the alpha channel in a png as i do with say a targa. I did a bit of reading and photoshop is specifically hiding the alpha channel in png’s From the adobe help desk., Transparency and alpha channels and png PNG does not support arbitrary alpha channels like other formats such as TIFF. PNG specifies that the fourth channel in a file is transparency, and only transparency. When you open a PNG file with transparency in Photoshop, it is considered a single layer image. It is not a flat background image. Alpha channels can contain anything, while transparency is a specific channel relationship. You can have multiple alpha channels per document, but only one transparency channel. Photoshop handles transparency and alpha channels separately. That doesn't make any sense. A PNG can contain whatever it wants. The compression scheme is purely an algorithm on multichannel data (probably designed to better compress RGBA, but that's not a limitation). For example, in the early days of GPGPU computing, textures were used to perform non-graphics calculations. It's Adobe's fault if they want to handle a PNG like that. They probably mention TIFF because they have business interests in that format lol. But even that format seems to have the same bit-depth, so they would have to be dividing a channel or doing some weird math. I haven't used Photoshop so I don't really know the difference between single-layer and background image. Anyway, I think this is the technical reason why Photoshop and Leadwerks both have issues importing some types of compressed PNGs: http://graphicdesign.stackexchange.com/questions/5888/why-cant-photoshop-properly-open-this-png I actually didn't even notice this problem until this texture came around. @ScrotieFlapWack Sorry wrong texture. Open it up in Paint.NET or something and resave it. The encoding is probably not handled correctly by the Leadwerks importer, and this is probably the same issue that Photoshop faces. 1 Quote Link to comment Share on other sites More sharing options...
SlipperyBrick Posted February 13, 2016 Author Share Posted February 13, 2016 I'll try GIMP haha EDIT: Just reporting back here haha. So I opened up my texture in GIMP and exported out as a .PNG and then imported that in to Leadwerks. As Nick said, I changed the compression type to DXT3 and it worked! I don't know if this is worth doing a bug report because I don't know where the problem truly lies. Plus not a lot of users may use Substance Designer, it kinda sucks cos I was planning on using Substance Designer a lot on majority of my textures Quote Link to comment Share on other sites More sharing options...
SlipperyBrick Posted February 13, 2016 Author Share Posted February 13, 2016 Just a screengrab of the problem fixed. I think I will put this as a bug report so it can get Josh's attention. No sign of the normal map on the material though, don't know if this is because the Blend mode is alpha, I did test it without alpha and put it back to solid but still no sign of the normal map. Thanks for the fix Nick! Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 No sign of the normal map on the material though, don't know if this is because the Blend mode is alpha, I did test it without alpha and put it back to solid but still no sign of the normal map. You must have the wrong shader picked then if the normal is not showing up. Using your textures, here are the settings I used for the textures and material: Diffuse and Normal textures: Decal Material: //Leadwerks Material File blendmode=1 castshadows=0 zsort=0 cullbackfaces=1 depthtest=1 pickmode=0 depthmask=1 diffuse=1.00000000,1.00000000,1.00000000,1.00000000 specular=0.501960814,0.501960814,0.501960814,0.501960814 alwaysuseshader=0 mappingscale=1.00000000,1.00000000,1.00000000 drawmode=-1 shader="Shaders/Decal/diffuse+normal.shader" texture0="./damage001_diffuse.tex" texture1="./damage001_normal.tex" Results: Keep in mind low lit areas the normal will be hard to see. 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
SlipperyBrick Posted February 13, 2016 Author Share Posted February 13, 2016 You must have the wrong shader picked then if the normal is not showing up. Rather than using the diffuse+normal.shader I've been using the diffuse+normal+specular.shader. Will a specular map also work in a decal? Quote Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 There is no inherent diffuse+normal+specular.shader for decals. Look in the Shaders/decals folder. I am sure if someone is bored enough to play around with this shader it can be easily added. 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
SlipperyBrick Posted February 13, 2016 Author Share Posted February 13, 2016 Ahh that's where I've been going wrong. I've been using the regular diffuse+normal+specular.shader lol. Thanks macklebee! Quote 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.