SlipperyBrick Posted February 12, 2016 Share Posted February 12, 2016 I have a few questions in regards to decals, there isn't really any documentation on them. Are normal and specular maps supported in decal materials? Would there be any options I need to change in my decal material, such as the Blend mode? What shader do I use for my decal material if it has a normal and specular map, would this be the standard diffuse+normal+specular.shader or would I need diffuse+normal+specular+alphamask.shader? Right now I am trying to project a decal on a wall and the material is set up as a standard material, normal map, diffuse, specular. The shader is all set up for normal and specular inputs. Ignore the big white square You can see that there is no normal map or specular map showing on my decal. Here is the material. The blend mode for the material is set to 'Solid'. When I change to alpha nothing happens, when I change to shade my white background on my diffuse disappears. Quote Link to comment Share on other sites More sharing options...
Slastraf Posted February 12, 2016 Share Posted February 12, 2016 Aside from that.. How do you draw decals at a wall ? i have never figured it out . Quote Link to comment Share on other sites More sharing options...
Josh Posted February 12, 2016 Share Posted February 12, 2016 See the example decal material in the AI and Events map. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SlipperyBrick Posted February 12, 2016 Author Share Posted February 12, 2016 You can scale the box down and have it at 0 on the X axis (or whatever axis your wall is point out from). What I can't seem to figure out is how to get the normal and specular map to work with it and also my diffuse has transparency as it is a .PNG file. Inside Substance Designer my diffuse shows as expect but then I bring it into Leadwerks and the transparent background is filled with black. You can see the last 4 nodes of my diffuse is transparent as I am feeding the my main pattern into the opacity slot of my Blend nodes which acts as a mask. Quote Link to comment Share on other sites More sharing options...
SlipperyBrick Posted February 12, 2016 Author Share Posted February 12, 2016 Hey Josh, I can't seem to get the AI & Events map. I've searched on the Workshop and can't find it there. I've gone to the tutorials section of the website and there isn't a download available in the AI, Events & Pathfinding tutorial. I've also made a new project through Project Manager and chose Tutorials but it isn't in there either Quote Link to comment Share on other sites More sharing options...
Josh Posted February 12, 2016 Share Posted February 12, 2016 Create a new FPS project and it will be in the "Maps" folder. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Olby Posted February 12, 2016 Share Posted February 12, 2016 It's in the FPS shooter template. 1 Quote Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64) Link to comment Share on other sites More sharing options...
SlipperyBrick Posted February 12, 2016 Author Share Posted February 12, 2016 I took a look at the project and the decals seems pretty straight forward. It must be something I am doing wrong in Substance Designer. What's strange is my ouputs are RGBA yet when I export my .PNG files from Substance Designer it looks fine in a thumbnail and in picture viewer as if there is some sort of transparency there but when I bring it into Leadwerks my diffuse texture has the black background haha. I brought the images into Photoshop and they don't seem to have any alpha channels on them. Quote Link to comment Share on other sites More sharing options...
knocks Posted February 13, 2016 Share Posted February 13, 2016 PNG's don't support alpha channels, it uses alpha transparency that is part of the png format. Outputting the diffuse as a targa will give you an alpha channel. Quote My first Adobe purchase was Photoshop 2.0, CS6 was my last! < = > Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 PNG's don't support alpha channels, it uses alpha transparency that is part of the png format. Are you sure? https://en.wikipedia.org/wiki/Portable_Network_Graphics PNG supports palette-based images (with palettes of 24-bit RGB or 32-bit RGBA colors), grayscale images (with or without alpha channel), and full-color non-palette-based RGB[A] images (with or without alpha channel). Probably just an error on Scrotum's part or a problem when he exported from SD. Also, he hasn't stated what compression method he is saving the LE tex file. The default conversion is DXT1 which doesn't support transparency. If the inherent example in the AI and Events map, doesn't help then my suggestion is for him to actually post the textures in question. 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...
Brutile Posted February 13, 2016 Share Posted February 13, 2016 From what little I know about Substance Designer, I'm pretty sure it uses black and white as transparency and opacity, and doesn't actually use the alpha channel. I could be wrong, but it might be something to check, because if there's no alpha channel in photoshop, then something is not right. Quote Link to comment Share on other sites More sharing options...
knocks Posted February 13, 2016 Share Posted February 13, 2016 A png uses alpha transparency that is written into the png file but not as an independent channel. Quote My first Adobe purchase was Photoshop 2.0, CS6 was my last! < = > Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 A png uses alpha transparency that is written into the png file but not as an independent channel. You keep saying that but yet I am finding otherwise. Transparency of image[edit]PNG offers a variety of transparency options. With true-color and grayscale images either a single pixel value can be declared as transparent or an alpha channel can be added (enabling any percentage of partial transparency to be used). 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...
knocks Posted February 13, 2016 Share Posted February 13, 2016 You will never open a png and see 4 channels. Quote My first Adobe purchase was Photoshop 2.0, CS6 was my last! < = > Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 You will never open a png and see 4 channels. 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...
knocks Posted February 13, 2016 Share Posted February 13, 2016 Did you save your png and reopen it or simply add the alpha? Quote My first Adobe purchase was Photoshop 2.0, CS6 was my last! < = > Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 Try it for yourself. It was saved then reopened still shows an alpha channel. 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...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 Even used an independent texture viewer - LE's old Texture Tool - and it still shows an alpha channel. 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...
knocks Posted February 13, 2016 Share Posted February 13, 2016 Interesting i do not see the alpha channel. The only way i have ever seen this was with a 3rd party application called SuperPNG many years ago. Can you view the alpha channel of the png attached? Quote My first Adobe purchase was Photoshop 2.0, CS6 was my last! < = > Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 yeah this is weird. hmmm but it shows up in both. I don't know the difference. It looks like your program reads the alpha like it is saved into the color channels where as my programs see it as an independent channel. EDIT-- granted we are way off topic here - sorry for the derailment Scrot. But in any case as long as I can get a transparency gradient out of a PNG, I will continue to use it. Placing a TGA next to a PNG, and I can see no difference in what is displayed. 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...
knocks Posted February 13, 2016 Share Posted February 13, 2016 That one was straight out of substance designer, I always was under the impression png didn't write to an independent channel. Quote My first Adobe purchase was Photoshop 2.0, CS6 was my last! < = > Link to comment Share on other sites More sharing options...
macklebee Posted February 13, 2016 Share Posted February 13, 2016 That one was straight out of substance designer, I always was under the impression png didn't write to an independent channel. It may not - I cannot for say for 100% certainty as I am far from being a texture format expert. I am just going by what I have seen using the programs I have and what I just read in the wikipedia about PNG that it can have an alpha channel added. These two things seem to support each other. 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...
nick.ace Posted February 13, 2016 Share Posted February 13, 2016 That one was straight out of substance designer, I always was under the impression png didn't write to an independent channel. It depends on the type of encoding for PNG (there are multiple types) as well as the program used to view it. A lot of image formats can vary a bit in their encoding (Paint.NET gives you some options). There are also API limitations, such as if you open a 32-bit .png in MS Paint, it'll be opaque. If you open a 32-bit .png in Paint.NET, then it'll be transparent. https://en.wikipedia.org/wiki/Portable_Network_Graphics Quote Link to comment Share on other sites More sharing options...
SlipperyBrick Posted February 13, 2016 Author Share Posted February 13, 2016 Just dropping back in to confirm that Substance Designer does use black and white as mask for transparency. When I export my textures out of Substance Designer and bring them in to Photoshop and check the channels there is no alpha channel in any of the textures I had to add it in Photoshop and even then when I add it into Leadwerks it still has a black background. In Photoshop though I can see there is no background, its completely transparent. Here are the textures. Substance Designer Decal.rar If you open them up in Photoshop or GIMP you should see they have transparency but if you check the channels box there is no alpha channel but in Substance Designer I am specifying my outputs as RGBA. Even if I add an alpha in Photoshop on the textures it still shows up with a black background in Leadwerks. It must be a Substance Designer issue because any grayscale images I bring in to Leadwerks straight from Substance Designer give me and access exception error, I have to open the texture in Photoshop and export it as PNG from Photoshop for Leadwerks to be ok with it. Quote Link to comment Share on other sites More sharing options...
knocks 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. Quote My first Adobe purchase was Photoshop 2.0, CS6 was my last! < = > 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.