[SOLVED]Transparent Material problem

marc_antoine

20-03-2009 21:04:25

hey guys, thank you for taking the time to read this, i'm starting to work with ofusion materials and i have come to a problem, i have an ofusion material which is transparent and it looks fine in the 3dsMax oFusion viewport , as seen in the pic:
[attachment=1]matMax.JPG[/attachment]

then when i export the scene and i load it in my app, i get this:

[attachment=0]matEnOgre.JPG[/attachment]

as you can see everything behind the hose that is really dissapers (likesome parts of thevalve and some sort of fluid showed in the first pic).. why is this happening how should a export a scene with a transaprent texture... plz help!

Lioric

23-03-2009 00:53:06

You need to disable depth write in your transparent material

See the Glass scene in the Scenes section for a sample of a transparent and refelctive glass materials

marc_antoine

23-03-2009 05:02:41

yes indeed, i checked the material script generated by oFusion and tryin to learn about the parameters there i found something about the depth_check, so i add it tot he material and finally ended like this:


material Manguera_2/Standard_12
{
technique
{
pass
{
ambient 0.7 0.7 0.7 0.5
diffuse 0.7 0.7 0.7 0.5
specular 0.709804 0.819608 0.952941 0.5 20
emissive 0 0 0 0.5
scene_blend alpha_blend
depth_check off
}

}

}


i will test withdepth_write, like you stated.. also what is the difference between depth_check and depth_write?
thank lioric :)

Lioric

28-03-2009 16:49:04

The depth read and write settings can be set in the oFusion Pass Material, there is no need to modify the material script by hand

The depth read means that before the object is displayed in the screen, it will read the depth information and if the object is in front of the other objects it will be displayed (if you disable this setting, then the obejct will be displayed in the screen even if it is behind other objects)

The depth write means that when the object is displayed in the screen, its depth information is wrtitten to the depth buffer (used later to decide if other objects are to be displayed or not), if it is disabled then the depth buffer is not updated with the object