In game modeling, generally, the number of trees and plants are produced in the form of "transparent blank Textures", saving surface and accelerating game performance, is a "cost-effective" method.
But when you join ogre.
The exported mesh file does not play any role in the Ogre scenario. Bugs:
After improvement:
Material 01-Default
{
Technique
{
Pass
{
Lighting off
Scene_blend alpha_blend
Depth_check off
Ambient 0 0 0 1
Diffuse 0 0 0 1
Cull_hardware none
Cull_software none
Texture_unit
{
Texture g.png
}
}
}
}
Bold twoCodeIs to open the transparent mode,
Then, the texture uses an image with an alpha channel. The transparency is a transparent image.
It is equivalent to saying that there is nothing in the texture, that is, the direct transparency is 0. JPG and other formats do not contain Alpha transparent channels.
There is also a way to achieve transparency but there will be problems:
The method of modifying the. Material material file is adopted when the object material is transparent. The following is an example of the modification:
Material jirouxiaojirou2
{
Technique
{
Pass
{
Ambient 0 0 0 1
Diffuse 1 1 1 1
Specular 0 0 0 1
Emissive 0 0 0
Scene_blend add
Depth_check on
Texture_unit
{
Texture long.jpg
Tex_coord_set 0
Colour_op modulate
Scale 1 1
Scroll 0 0
Rotate 0
}
}
}
}
The bold part is the key to the transparency of objects, but now we have a problem that objects can be transparent. However, once the light is too strong, the exposure will become white and the light will be weak, the surroundings will become very dark again. Is there a way to make the environment look very bright without affecting the transparency effect? Or is there a problem with my transparent method? Which of the following experts has a better solution to object transparency? One of the two pictures below is the current transparent effect, and the brighter one is what I hope to achieve.
The problem with the above method comes from the Internet and is also a transparent method, but it is better than the first method.
2010. I have a monkeyjs post. All Rights Reserved. You are welcome to reprint it. Please respect the work of the blogger and repost the source in a text box.