PDA

View Full Version : PNGs(w transparency) as texture but transparency wont work



arrow1234
08-17-2011, 05:50 AM
Hi.
I am making my first step toward migrating from JPGs to PNGs because of the advantage of embedded transparency on the PNGs. However i have problem, they dont work as it should, i opened up the png in photoshop they all look fine. In lightwave they look like this:

err.... see attachment please.

I tried the "Invert Layer" in Texture Editor - Transparency, it looks even worse, what did i do wrong? HELP~

Many thanks

biliousfrog
08-17-2011, 06:35 AM
The transparency in the PNG will allow you to overlay a 'cut out' image over another surface...for example, adding a decal to an aeroplane fusilage. If you want to cut out an object you will need to use a black and white image as a clip map or transparency map.

Sensei
08-17-2011, 07:02 AM
If above render is made with textures on quads (not clip map) then you should use Node Editor instead of legacy Texture Editor. Make 2D Image node, plug color to Color, and alpha to math > scalar > subtract 1.0 - alpha, and put it to Transparency.
Don't forget to enable Render Globals > Ray Tracing toggles.

BlueApple
08-17-2011, 07:12 AM
Is the attached node setup exactly what you are using?

Myagi
08-17-2011, 07:15 AM
Alpha, that images normally contain, is the opposite of transparency, ie. a max alpha val is when something is entirely opaque. So inverting is the correct approach.

However when you add the image to the Transparency channel you only want the alpha component in there, not the RGB stuff, so you can make an instance of the image in the image editor and select "Alpha Channel: Alpha Only" on the instance. It would also be wise to set "Alpha Channel: Disabled" on the one used for color.

OR

You can use nodes, then you only have to make an Image node. Connect Color to Color, and the Alpha output to a Math->Scalar->Invert node and then to Transparency.


Edit: oh the fail, I was beat by two people ;)

arrow1234
08-17-2011, 07:29 AM
Alpha, that images normally contain, is the opposite of transparency, ie. a max alpha val is when something is entirely opaque. So inverting is the correct approach.

However when you add the image to the Transparency channel you only want the alpha component in there, not the RGB stuff, so you can make an instance of the image in the image editor and select "Alpha Channel: Alpha Only" on the instance. It would also be wise to set "Alpha Channel: Disabled" on the one used for color.

OR

You can use nodes, then you only have to make an Image node. Connect Color to Color, and the Alpha output to a Math->Scalar->Invert node and then to Transparency.


Edit: oh the fail, I was beat by two people ;)



ah...thanks. This is the Legacy Texture Editor way , which is what i did(see attachment again). It works great~ thanks

Also thanks for the help on the node editor too, i tried that method and it works great as well.

Many thanks

Myagi
08-17-2011, 07:39 AM
If "Alpha Channel" is "Enabled" on the RGB image it will apply the alpha as layer opacity. You may not notice much of that in your scenario, but it might be visible on the edges. To ensure no strange things happen I would recommend setting it to Disabled. (Disabling it will make the node variant not work.)

arrow1234
08-17-2011, 09:50 AM
will do that, thanks or your help