Transparency

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Shadix
Gnoblar
Posts: 9
Joined: Wed Aug 11, 2004 4:28 pm
Contact:

Transparency

Post by Shadix »

Hi, this is a render pic created with max
Image

U see, the water surface is partly transparent. If i use that script:

material ver_eimer01_wasser
{
technique
{
pass
{
// Rendert beidseitig
cull_hardware none
cull_software none

texture_unit
{
texture ver_eimer01_wasser.png
filtering anisotropic anisotropic anisotropic
// Simple Transparenz
alpha_rejection greater 215
}
}
}
}

The water is completly transparent, it disapears.
What do i have to change in order to get the effect illustrated on the screen?
I appreciate every answer, thx :)
User avatar
semicolon
Halfling
Posts: 94
Joined: Sun Jul 04, 2004 4:42 pm
Location: Bangkok, Thailand
Contact:

Post by semicolon »

It seems like you missed "scene_blend alpha_blend" Put this below "cull_software none"

If it still doesn't work, you may wanna check your texture whether or not it has alpha channel.

Semicolon
"Nature is the mother of learning"
Shadix
Gnoblar
Posts: 9
Joined: Wed Aug 11, 2004 4:28 pm
Contact:

Post by Shadix »

no didn't work, but it worked with submesh and another material:

Code: Select all

material Material_#58/ver_eimer01_wasser
{
	receive_shadows on
	technique
	{

		pass
		{
			scene_blend alpha_blend 
			depth_write off

			// Letzter Wert ist Alpha
			ambient 0.089984 0.089984 0.089984 0.5
			diffuse 0.800000 0.800000 0.800000 0.5

			texture_unit
			{
				texture ver_eimer01_wasser.png
			}
		}
	}
}
}

material Material_#58/ver_eimer01
{
    technique
    {
        pass
        {
            ambient 0.588235 0.588235 0.588235
            diffuse 0.588235 0.588235 0.588235
            specular 0.9 0.9 0.9 0.0
            emissive 0.0 0.0 0.0
            texture_unit
            {
                texture ver_eimer01_wasser.png 
            }
        }
    }
}
We encountered a bug by the way.
If u export a mesh with different materials , the materials get the following
description:
"material Material #58/name"

The texture does not load !

U need to correct the description
"material Material_#58/name"

Without "_" it does not work!
Last edited by Shadix on Fri Feb 25, 2005 1:34 pm, edited 2 times in total.
User avatar
TheGilb
Halfling
Posts: 71
Joined: Sun Oct 06, 2002 11:19 pm
Location: UK
Contact:

Post by TheGilb »

Shadix wrote: We encountered a bug by the way.
If u export a mesh with different materials , the materials get the following
description:
"material Material #58/name"

The texture does not load !

U need to correct the description
"material Material_#58/name"

Without "_" it does not work!
I found this bug too, I hope someone fixes this soon!
User avatar
sphinkie
Greenskin
Posts: 114
Joined: Wed Jul 07, 2004 11:08 am
Location: Paris
x 1
Contact:

Post by sphinkie »

I had it too,
but now, I give names in 3ds to all my materials, and multi-materials.
It is better (I mean "cleaner") and I don't have this problem anymore.
Post Reply