mmonem / blender2ogre

Automatically exported from code.google.com/p/blender2ogre
GNU Lesser General Public License v2.1
0 stars 0 forks source link

White Meshes in Mogre 1.7.1 #47

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hey, I'm not sure if this is an issue or there is just something I'm missing. 
Either way here it is.

*What steps will reproduce the problem?
1. Open blender 2.61, enable plugin, create a mesh, create UV, create material, 
turn on ogre material layers, set diffuse and normal textures on the blender 
material the normal blender way,  create a rex/difnormal material through the 
blender2ogre 0.5.6 Preview plugin and set its normal and diffuse textures. 
Export using the blender2ogre 0.5.6 Preview plugin

*What is the expected output? What do you see instead?
To see a mesh with a diffuse and normal map displayed in my Mogre 1.7.1 
application.
Instead my mesh is missing its texture, and appearing a shadeless white

*What version of the product are you using? On what operating system?
blender2ogre 0.5.6 Preview
Windows 7 x64

*Please provide any additional information below.
Here is the Material that is not working.

//user material: rex/DiffNormal
vertex_program rex/DiffNormalVP cg
{
    source SuperShader.cg
    entry_point mainVS
    profiles vs_3_0 arbvp1
    compile_arguments -DDIFFUSE_MAPPING -DNORMAL_MAPPING
    default_params
    {
        param_named_auto worldViewProjMatrix worldviewproj_matrix
        param_named_auto worldMatrix world_matrix
        param_named_auto inverseWorldMatrix inverse_world_matrix
        param_named_auto sunLightDir light_position 0
        param_named_auto lightPos0 light_position 1
        param_named_auto lightPos1 light_position 2
        param_named_auto lightAtt0 light_attenuation 1
        param_named_auto lightAtt1 light_attenuation 2
        param_named_auto fogParams fog_params
        param_named_auto fogColor fog_colour
    }
}
fragment_program rex/DiffNormalFP cg
{
    source SuperShader.cg
    entry_point mainPS
    profiles ps_3_0 arbfp1
    compile_arguments -DDIFFUSE_MAPPING -DNORMAL_MAPPING
    default_params
    {
        param_named_auto sunLightCol light_diffuse_colour 0
        param_named_auto lightCol0 light_diffuse_colour 1
        param_named_auto lightCol1 light_diffuse_colour 2
        param_named_auto ambientLight ambient_light_colour
    }
}
// abstract passes //
abstract pass rex/DiffNormal/PASS0
        {
            iteration once
            vertex_program_ref rex/DiffNormalVP
            {
            }
            fragment_program_ref rex/DiffNormalFP
            {
            }
            texture_unit baseMap
            {
                texture TextureMissing.png
            }
            texture_unit normalMap
            {
                texture TextureMissing.png
            }
        }
// blender material: Material.001
material Material.001 
{
    receive_shadows on
    technique
    {
        pass Material.001
        {
            alpha_to_coverage off
            colour_write off
            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 BuildingTex_Normal.tga
                tex_address_mode wrap
                scale 1.0 1.0
                colour_op replace
            }
            texture_unit 
            {
                texture BuildingTex.tga
                tex_address_mode wrap
                scale 1.0 1.0
                colour_op replace
            }
        }

        pass Material.001.LAYER0 : rex/DiffNormal/PASS0
        {
            depth_bias 2.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 baseMap
            {
                texture BuildingTex.tga
                tex_address_mode wrap
            }
            texture_unit normalMap
            {
                texture BuildingTex_Normal.tga
                tex_address_mode wrap
            }
        }
    }
}

Original issue reported on code.google.com by AlmostNo...@gmail.com on 1 Mar 2012 at 3:18

GoogleCodeExporter commented 8 years ago
The realxtend shaders have to be ported to work with Mogre.  The same problem 
appears with OgreMeshy.  You might want to ask the Mogre developers if they can 
port the realxtend shaders.

Original comment by goatman.py@gmail.com on 13 Mar 2012 at 3:55

GoogleCodeExporter commented 8 years ago
I see. Thanks for the response. Best of luck with your work!

Original comment by AlmostNo...@gmail.com on 13 Mar 2012 at 4:31