jwatte
18-04-2007 07:22:24
I have a mesh that consists of part transparency, and part opaqueness. I'm using 3ds Max 9 with the 1/26/07 release of oFusion.
The material is a multi/sub with two child materials. The first child is a regular material with a diffuse map. The second child is a regular material with a diffuse map, and that same map instanced as opacity map. The map in question has "image alpha" set as "mono channel output" which is how you get the alpha to render inside Max. I have also un-checked the pre-multiplied alpha checkbox (because, well, it isn't pre-multiplied
The transparent parts are given material ID 2, and the opaque parts material ID 1.
I have two problems with this mesh:
1) In the oFusion viewport, the alpha material is drawn alpha-tested instead of properly blended. I find this surprising, as alpha test is almost never what you actually want these days (it reduces the effectiveness of early Z, MIP mapping is a real drag, etc). Is there a way to make the material render with blending instead?
2) When I export this mesh, and load it into Ogre (using movable object), using the default "near terrain" scene manager, and add a scene node with this mesh, it is drawn using additive mode -- the entire mesh, not just the transparent parts.
I'm using Ogre 1.4 rc 1.
Here's the material file that gets exported. Note the mysterious "Material_#46" name, which isnt' actually found anywhere in my material!
The material is a multi/sub with two child materials. The first child is a regular material with a diffuse map. The second child is a regular material with a diffuse map, and that same map instanced as opacity map. The map in question has "image alpha" set as "mono channel output" which is how you get the alpha to render inside Max. I have also un-checked the pre-multiplied alpha checkbox (because, well, it isn't pre-multiplied
The transparent parts are given material ID 2, and the opaque parts material ID 1.
I have two problems with this mesh:
1) In the oFusion viewport, the alpha material is drawn alpha-tested instead of properly blended. I find this surprising, as alpha test is almost never what you actually want these days (it reduces the effectiveness of early Z, MIP mapping is a real drag, etc). Is there a way to make the material render with blending instead?
2) When I export this mesh, and load it into Ogre (using movable object), using the default "near terrain" scene manager, and add a scene node with this mesh, it is drawn using additive mode -- the entire mesh, not just the transparent parts.
I'm using Ogre 1.4 rc 1.
Here's the material file that gets exported. Note the mysterious "Material_#46" name, which isnt' actually found anywhere in my material!
material Material_#46/ogre_axis_tex
{
technique
{
pass
{
ambient 0 0 0 1
specular 0.3 0.3 0.3 1 20
alpha_rejection greater 128
texture_unit
{
texture_alias 0
texture axis_tex.dds
}
}
}
}
material Material_#46/ogre_axis_tex_alpha
{
technique
{
pass
{
ambient 0 0 0 1
specular 0.3 0.3 0.3 1 20
alpha_rejection greater 128
texture_unit
{
texture_alias 0
texture axis_tex.dds
}
}
}
}