env_map spherical

davesh

10-11-2006 18:16:20

I've got the production version of ofusion. I'm trying to create a material in max that looks like the following once exported through ofusion:


material glassy
{
technique
{
pass
{
lighting off
scene_blend add
depth_write off

texture_unit
{
texture glassy.png
env_map spherical
}
}
}
}


Currently I cant figure out which material settings in max result in env_map spherical within the texture unit.

I tried setting the texture_unit to be a Bitmap. I then clicked on the Environ toggle and then setting Mapping: to be Spherical Environment. But this seems to have no effect.

The closest I've gotten so far is the following material:


material glass2
{
technique
{
pass
{
ambient 0.7 0.7 0.7 1
diffuse 0.7 0.7 0.7 1
specular 0.9 0.9 0.9 1 20
scene_blend add
alpha_rejection greater 128
texture_unit
{
texture_alias 0
texture glassy.png
}
}
}
}


How do I need to configure the material in max so that ofusion exports the texture_unit with the following option?


env_map spherical

Lioric

11-11-2006 02:40:30

Im sure you are using the oFusion Material, and are setting the "Env Map" mode in the Texture Unit that contains the the image file

What version are you using?

Do you have the latest hotfixes installed?

Is the material correctly displayed in the preview viewport?

I did a test with a torus object applied an oFusion material with a technique, pass and teture unit, and then set the "Env Map" mode of texUnit to "spherical"

The material is exported correctly, this are the results:


material 01_-_Default
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235 1
diffuse 0.588235 0.588235 0.588235 1
specular 0 0 0 1 10

texture_unit
{
texture_alias 0
texture spheremap.png
env_map spherical
}
}

}

}

davesh

11-11-2006 12:42:48

Ok. Thank you. You have gotten me closer. The layer that I thought was an oFusion TextureUnit was actually just a bitmap. I'm not sure why since I created this layer by clicking on one of the "Texture Units" buttons in the oFusion Pass layer.

So I've fixed this and now I have the spherical environment map setting in my material. However I have extraneous information as well:



material glass2
{
technique
{
pass
{
ambient 0.992157 0.788235 0.701961 1
diffuse 0.7 0.7 0.7 1
specular 0.9 0.9 0.9 1 20
emissive 0.0156863 0 0.713726 1
scene_blend add

texture_unit
{
texture_alias 0
texture glassy.png
colour_op_ex blend_manual src_texture src_current 0
colour_op_multipass_fallback dest_colour zero
alpha_op_ex blend_manual src_texture src_current 0
env_map spherical
}
}

}

}



How do I get rid of these options?


colour_op_ex blend_manual src_texture src_current 0
colour_op_multipass_fallback dest_colour zero
alpha_op_ex blend_manual src_texture src_current 0

Lioric

11-11-2006 15:45:43

In the TextureUnit, set the "Color Blend" and "Alpha Blend" Mode from "manual" to its default value "modulate"