Question on UVMap and Materials

I have successfully imported a blender to ogre model with texture and animation

The textures work fine. The UV Cooridates are Correct.





My Question is when I use a different material after the model is imported the texture will be in the wrong place.

I thought the UV mapping was on the Model itself and not the material.



Is there something I’m missing?



Thanks for any help

Greg

the UV coordinates are stored in the mesh, I would expect this to work, although i haven’t really done that much animating either :s try it with the texture flipped around and see if that fixes it



What blender/ogre combination are you using?

blender-2.63a-linux-glibc27-x86_64

with the ogre exporter 0.5.7 preview1 from http://www.ogre3d.org/forums/viewtopic.php?f=4&t=61485



I flipped the image vertically and it WORKS! It must be something in the material file but I dont see it.



Thanks for your help



[java]/ blender material: Cube

material Cube

{

receive_shadows on

technique

{

pass Cube

{

ambient 0.800000011920929 0.800000011920929 0.800000011920929 1.0

diffuse 0.6400000190734865 0.6400000190734865 0.6400000190734865 1.0

specular 0.5 0.5 0.5 1.0 12.5

emissive 0.0 0.0 0.0 1.0

alpha_to_coverage off

colour_write on

cull_hardware clockwise

depth_check on

depth_func less_equal

depth_write on

illumination_stage

light_clip_planes off

light_scissor off

lighting on

normalise_normals off

polygon_mode solid

scene_blend one zero

scene_blend_op add

shading gouraud

transparent_sorting on

texture_unit

{

texture steve.png

tex_address_mode wrap

scale 1.0 1.0

tex_coord_set 0

colour_op modulate

}

}

}

}

[/java]

yeah, be default when the textures are imported from blender, it injects: Flip Repeat.

at least from what I can tell.

You need to set the flip Y flag on the TextureKey when you load the texture in your custom material. If you’re using a J3M file, just specify “Flip” before the path to the texture.