transparent texture
transparent texture
Hi all!
I have this problem:
I have some trees bult with 2 planes and the texture use the alpha channel to determine the transparent zone...
first impression seems to work:
but if i move on the right, and the trees are between the camera and the building i see this effect:
the problem seems that if there's something behind the object with the transparent alpha channel, happens that is not rendered, otherwise (look for example the top of the trees, that have nothing except the skybox behind, are rendered correctly
i tried to set the EMT_TRANSPARENT_ALPHA_CHANNEL or EMT_TRANSPARENT_ALPHA_CHANNEL_REF but doesn't change nothing.
thanks in advance!
ghiboz
I have this problem:
I have some trees bult with 2 planes and the texture use the alpha channel to determine the transparent zone...
first impression seems to work:
but if i move on the right, and the trees are between the camera and the building i see this effect:
the problem seems that if there's something behind the object with the transparent alpha channel, happens that is not rendered, otherwise (look for example the top of the trees, that have nothing except the skybox behind, are rendered correctly
i tried to set the EMT_TRANSPARENT_ALPHA_CHANNEL or EMT_TRANSPARENT_ALPHA_CHANNEL_REF but doesn't change nothing.
thanks in advance!
ghiboz
if i set the lighting material to false, works correctly with the buliding (that have lighting =true)but gives same error with the other trees object...
thanks!
i tried to change all the textures from tga with alpha channel to png with transparent zones, now the problem is only an object with a transparent texture that have behind another object with transparent texture....
thanks!
i tried to change all the textures from tga with alpha channel to png with transparent zones, now the problem is only an object with a transparent texture that have behind another object with transparent texture....
thanks mate... you're helping me very much!!!!hybrid wrote:This is once more a problem with the hard-coded zbuffer disabling, that was reintroduced in 1.4. Please remove the lines with ZWriteEnable=false in the MaterialRenderer files. You'll have to take care for proper setting of that flag for billboards etc.
i commented this in the "CD3D9MaterialRenderer.h"
Code: Select all
((SMaterial&)material).ZWriteEnable = false;
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Well, this is an open issue, we'll keep it in mind. It was reverted because many people complained about problems with transparent billboards etc. But I guess we just need to add some more SMaterial getters and setters to set the zbuffer once, and let the user change it after that. Silently forcing the value to something fixed is quite...fixed.
hello!
i want to put two textures in one model. a skin and a tatoo for example.
if i have 10 skins and 10 tatoos, then it's a little hard to make them to one texture.
so i thought the best way to do is, put a texture to the model(skin), and put another texture(tatoo) in top of it with alpha channel.
but when i searched how to do it, i just found how to use two textures in one model, and how to use alpha channel... but how can i do both? xD
or there is another way to do it?
maybe i don't want to use just 2 layers, maybe more.. but i necessary need 2 layers.
do you have any idea how to do it? maybe i should do it without alpha, but i don't know how.
thank you for help
i want to put two textures in one model. a skin and a tatoo for example.
if i have 10 skins and 10 tatoos, then it's a little hard to make them to one texture.
so i thought the best way to do is, put a texture to the model(skin), and put another texture(tatoo) in top of it with alpha channel.
but when i searched how to do it, i just found how to use two textures in one model, and how to use alpha channel... but how can i do both? xD
or there is another way to do it?
maybe i don't want to use just 2 layers, maybe more.. but i necessary need 2 layers.
do you have any idea how to do it? maybe i should do it without alpha, but i don't know how.
thank you for help
I had the same problem to you.
Hope this be helpful.
Hope this be helpful.
Code: Select all
video::E_MATERIAL_TYPE leafMaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
tree->getLeafNode()->setMaterialType( leafMaterialType );