Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Pages: 1
Hi,
I have a small problem with the alpha channel.
So, I made the texture with the alpha channel(I wanna get transparency), but when I'm importing the model with this texture to the editor, there, where should be transparency is a black colour instead of it.
Is there some solution?
Thanks in advance
Offline
Hello,
You have to create a material that manage alpha too.
If you use 3ds max to create your objects, just set a transparency on the material (with Easy Ogre Exporter).
if you want to modify manually the material script see : http://www.ogre3d.org/docs/manual/manual_14.html
Offline
For transparent objects, the related material parameters are "depth_check"/"depth_write": http://www.ogre3d.org/docs/manual/manual_16.html#SEC49
Offline
Thanks for helpful replies.
Last edited by sky14 (29-Feb-2012 11:39:34)
Offline
Ok, I managed to make transparency but still I want to get a bit different effect.
I made a two images which will show what I mean.
First image showing effect which I have currently:
Second image showing effect which I would to get.
My question is, how to get such effect like on the second image?
BTW. I use the Fragmotion to exporting models and all changes in the material I must write manualy.
Offline
try this in your pass :
ambient 0.447059 0.447059 0.447059 1
diffuse 0.588 0.588 0.588 1
specular 0.203922 0.203922 0.203922 1 10
scene_blend src_alpha one_minus_dest_alpha
alpha_rejection greater_equal 128
cull_hardware none
cull_software none
texture_unit leavesTex
{
texture texture.png
filtering linear linear linear
}
Offline
Ok, for a tree, use "alpha_rejection" on the pass (http://www.ogre3d.org/docs/manual/manual_16.html#SEC54). It takes a parameter between 0 and 128, which will be used for checking if the value in the alpha channel is upper or equal to it. If so it will show the colour on the rgb channels.
You can also use "alpha_to_coverage on" for better quality (smoothed edges between transparent/visible).
<edit>gasp arkeon got me again, bip bip</edit>
Last edited by Nodrev (29-Feb-2012 16:21:27)
Offline
Ok, I added alpha_rejection command to the material and now it works! Thanks for help!
Offline
fwiw there are quite a few threads on the ogre3d.org forums about alpha materials....if you look for my username and 'alpha' there you should find some code
Offline
Pages: 1