mmonem / blender2ogre

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

Clean material output by suppress the default values #42

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Seems the generated material file contained many value which default to OGRE, 
IMHO, those values can be ignored to produce a clean output, which may help us 
on see what material we've actually made. Here is the comparison:

The original output for default Blender scene, aka, the default box:

material Material 
{
    receive_shadows on
    technique
    {
        pass Material
        {
            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
        }
    }
}

below is the output produced by my patch:

material Material 
{
    technique
    {
        pass Material
        {
            ambient 0.800000 0.800000 0.800000 1.000000
            diffuse 0.640000 0.640000 0.640000 1.000000
            specular 0.500000 0.500000 0.500000 1.000000 12.500000
            emissive 0.000000 0.000000 0.000000 1.000000
        }
    }
}

Original issue reported on code.google.com by Hienjni...@gmail.com on 18 Dec 2011 at 10:47

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry about that, but I forgot to tell you that this patch was written against 
revision 70061fd7d83a.

Original comment by Hienjni...@gmail.com on 18 Dec 2011 at 11:12

GoogleCodeExporter commented 8 years ago

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