How do I create a png file to use for reflection?
by Dean · in Torque Game Engine · 07/13/2007 (12:46 am) · 7 replies
I'm trying to make shiny metal objects, and my problem is that I don't know how to actually set the alpha in the png file in a way that it'll work for reflection. I know how to generally set an alpha channel color for transparency for gui images (making the whole image translucent or transparent), but that's not working for model reflection. Doing that just makes the result look really crappy. I have both gimp and photoshop and I have no idea how i'm supposed to make this work. I've read "you have to set the alpha channel", but short of going into gimp and selecting a single color as alpha, I have no idea what anyone is talking about apparently. can anyone explain to me in laymans terms what i'm supposed to do, or at least link me to some kind of tutorial? thanks.
#2
by "layers", do you mean channels? if so, what do i do with the red, green, and blue channels etc ? I don't see an opacity slider for channels.
When I study the example orc skin, in photoshop there's separate channels for red, blue, and green and then a rgb channel. they all look translucent, and only the areas that are supposed to be reflective are on it, the rest of it is empty. that makes sense to me. but when i open the file in ms paint, its a full, completely opaque image with all the other parts of the skin I can't even figure how to get it to show me in photoshop. Maybe if you could explain why that is, I'd understand more :/
07/13/2007 (8:13 am)
Okay. hmmm ... when i create the layers, the background image isnt allowed to have opacity, and it doesn't allow me to even create layers if the background has empty/transparent space in it. so what should the background layer have on it? should it be solid black? and on the other layers I set opacity on, they're not allowed to have empty/transparent space, so what color should the empty space be? black or white maybe? And then, when I save the file as png, it flattens all the layers together. or maybe i'm misunderstanding you.by "layers", do you mean channels? if so, what do i do with the red, green, and blue channels etc ? I don't see an opacity slider for channels.
When I study the example orc skin, in photoshop there's separate channels for red, blue, and green and then a rgb channel. they all look translucent, and only the areas that are supposed to be reflective are on it, the rest of it is empty. that makes sense to me. but when i open the file in ms paint, its a full, completely opaque image with all the other parts of the skin I can't even figure how to get it to show me in photoshop. Maybe if you could explain why that is, I'd understand more :/
#3
Are you used to working with the TGA file format? PNG's handle Alpha channel information differently than TGA's.
You don't need to touch the channels at all - don't create a new alpha channel!
Make sure none of your layers are locked. Split your texture up into various layers and use the opacity slider on each layer to control environment mapping/reflection.
In the screenshot that follows you can see a texture that I have for a sniper rifle. As you can see, I have the various pieces split into different layers and am altering the opacity on each individual layer to obtain my desired amount of environment mapping. This is a PSD document (so I can use layers) which I then export to PNG as needed.
Don't be alarmed if your texture is barely visible due to the opacity settings, this will not affect the diffuse texture in any way. The alpha information is only being used to determine the amount of environment mapping.
07/13/2007 (8:26 am)
Huh?Are you used to working with the TGA file format? PNG's handle Alpha channel information differently than TGA's.
You don't need to touch the channels at all - don't create a new alpha channel!
Make sure none of your layers are locked. Split your texture up into various layers and use the opacity slider on each layer to control environment mapping/reflection.
In the screenshot that follows you can see a texture that I have for a sniper rifle. As you can see, I have the various pieces split into different layers and am altering the opacity on each individual layer to obtain my desired amount of environment mapping. This is a PSD document (so I can use layers) which I then export to PNG as needed.
Don't be alarmed if your texture is barely visible due to the opacity settings, this will not affect the diffuse texture in any way. The alpha information is only being used to determine the amount of environment mapping.
#4
07/13/2007 (8:40 am)
I'm using png. I think i know what my problem was... I needed to actually DELETE the background layer, because it was locked and I couldnt do much with it. I deleted the background layer and now I think i can do what you're telling me. but now my model isn't actually reflecting. I've got emap = true in my datablock, so probably i need to enable it somehow in my modeller (blender).
#5
I'm not sure how it works with Blender, I only know how to enable emapping from Max or Milkshape.
07/13/2007 (8:54 am)
You can just double click a layer in order to unlock it, you don't need to delete it.I'm not sure how it works with Blender, I only know how to enable emapping from Max or Milkshape.
#6
07/13/2007 (4:03 pm)
It wouldn't let me unlock the background. thats why i deleted it. this helps alot . thanks :)
#7

the translucent rectangle on the right is what i'm using for the metal parts. not working :/
07/13/2007 (8:00 pm)
Well, I still can't get it to work. I followed every set of instructions I could find to get environment mapping to work, and as far as I know I'm doing everything right. Maybe I made my png file wrong? Here's a quick test image I made
the translucent rectangle on the right is what i'm using for the metal parts. not working :/
Torque Owner Tim Heldna
For example, you may have a gun with both wooden and metal components. You would split these up into separate layers within a PSD document and set the wood areas of the texture to have a very low or no opacity value and the metal areas, which you would want to be more "shiny", to have a higher opacity value.