Skip to content

Single Default Cube Exported Wrongly under Blender 4.3 #255

Description

@Richardn2002

System Information

  • Ogre Version: 14.3.4
  • Operating System / Platform: Arch Linux x86_64, 6.13.5-arch1-1
  • Blender Version: 4.3.2

Detailed description

Image

Above is what ogre-meshviewer shows for the mesh exported from the default Blender project: just a cube. I assume this is not expected?

This looks like some mesh winding order problem to me, and I tried investigating a bit myself:

  • Blender 3 to 4 does have some Python API changes related to meshes (pre 3.5 to 3.5, 3.5 to 3.6, 3.6 to 4.0), but they do not seem related to me. But I am no professional on this.
  • There are 8 vertices in a cube, but in the resulting file there are 24 vertices in total, with each vertex replicating for 3 times. Is this intended?

To replicate, just open Blender, close the startup dialogue, and proceed to export. But anyways here are the mesh and the material:

Mesh:

<?xml version="1.0" encoding="UTF-8"?>
<mesh>
    <sharedgeometry vertexcount="24">
        <vertexbuffer colours_diffuse="False" normals="true" positions="true" tangent_dimensions="0" tangents="False" texture_coords="1">
            <vertex>
                <position x="1.000000" y="1.000000" z="-1.000000"/>
                <normal x="0.000000" y="1.000000" z="-0.000000"/>
                <texcoord u="0.625000" v="0.500000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="1.000000" z="1.000000"/>
                <normal x="0.000000" y="1.000000" z="-0.000000"/>
                <texcoord u="0.875000" v="0.250000"/>
            </vertex>
            <vertex>
                <position x="1.000000" y="1.000000" z="1.000000"/>
                <normal x="0.000000" y="1.000000" z="-0.000000"/>
                <texcoord u="0.625000" v="0.250000"/>
            </vertex>
            <vertex>
                <position x="1.000000" y="-1.000000" z="1.000000"/>
                <normal x="0.000000" y="0.000000" z="1.000000"/>
                <texcoord u="0.375000" v="0.250000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="1.000000" z="1.000000"/>
                <normal x="0.000000" y="0.000000" z="1.000000"/>
                <texcoord u="0.625000" v="0.000000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="-1.000000" z="1.000000"/>
                <normal x="0.000000" y="0.000000" z="1.000000"/>
                <texcoord u="0.375000" v="0.000000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="-1.000000" z="1.000000"/>
                <normal x="-1.000000" y="0.000000" z="-0.000000"/>
                <texcoord u="0.375000" v="1.000000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="1.000000" z="-1.000000"/>
                <normal x="-1.000000" y="0.000000" z="-0.000000"/>
                <texcoord u="0.625000" v="0.750000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="-1.000000" z="-1.000000"/>
                <normal x="-1.000000" y="0.000000" z="-0.000000"/>
                <texcoord u="0.375000" v="0.750000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="-1.000000" z="-1.000000"/>
                <normal x="0.000000" y="-1.000000" z="-0.000000"/>
                <texcoord u="0.125000" v="0.500000"/>
            </vertex>
            <vertex>
                <position x="1.000000" y="-1.000000" z="1.000000"/>
                <normal x="0.000000" y="-1.000000" z="-0.000000"/>
                <texcoord u="0.375000" v="0.250000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="-1.000000" z="1.000000"/>
                <normal x="0.000000" y="-1.000000" z="-0.000000"/>
                <texcoord u="0.125000" v="0.250000"/>
            </vertex>
            <vertex>
                <position x="1.000000" y="-1.000000" z="-1.000000"/>
                <normal x="1.000000" y="0.000000" z="-0.000000"/>
                <texcoord u="0.375000" v="0.500000"/>
            </vertex>
            <vertex>
                <position x="1.000000" y="1.000000" z="1.000000"/>
                <normal x="1.000000" y="0.000000" z="-0.000000"/>
                <texcoord u="0.625000" v="0.250000"/>
            </vertex>
            <vertex>
                <position x="1.000000" y="-1.000000" z="1.000000"/>
                <normal x="1.000000" y="0.000000" z="-0.000000"/>
                <texcoord u="0.375000" v="0.250000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="-1.000000" z="-1.000000"/>
                <normal x="0.000000" y="0.000000" z="-1.000000"/>
                <texcoord u="0.375000" v="0.750000"/>
            </vertex>
            <vertex>
                <position x="1.000000" y="1.000000" z="-1.000000"/>
                <normal x="0.000000" y="0.000000" z="-1.000000"/>
                <texcoord u="0.625000" v="0.500000"/>
            </vertex>
            <vertex>
                <position x="1.000000" y="-1.000000" z="-1.000000"/>
                <normal x="0.000000" y="0.000000" z="-1.000000"/>
                <texcoord u="0.375000" v="0.500000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="1.000000" z="-1.000000"/>
                <normal x="0.000000" y="1.000000" z="-0.000000"/>
                <texcoord u="0.875000" v="0.500000"/>
            </vertex>
            <vertex>
                <position x="1.000000" y="1.000000" z="1.000000"/>
                <normal x="0.000000" y="0.000000" z="1.000000"/>
                <texcoord u="0.625000" v="0.250000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="1.000000" z="1.000000"/>
                <normal x="-1.000000" y="0.000000" z="-0.000000"/>
                <texcoord u="0.625000" v="1.000000"/>
            </vertex>
            <vertex>
                <position x="1.000000" y="-1.000000" z="-1.000000"/>
                <normal x="0.000000" y="-1.000000" z="-0.000000"/>
                <texcoord u="0.375000" v="0.500000"/>
            </vertex>
            <vertex>
                <position x="1.000000" y="1.000000" z="-1.000000"/>
                <normal x="1.000000" y="0.000000" z="-0.000000"/>
                <texcoord u="0.625000" v="0.500000"/>
            </vertex>
            <vertex>
                <position x="-1.000000" y="1.000000" z="-1.000000"/>
                <normal x="0.000000" y="0.000000" z="-1.000000"/>
                <texcoord u="0.625000" v="0.750000"/>
            </vertex>
        </vertexbuffer>
    </sharedgeometry>
    <submeshes>
        <submesh material="Material" operationtype="triangle_list" use32bitindexes="False" usesharedvertices="true">
            <faces count="12">
                <face v1="0" v2="1" v3="2"/>
                <face v1="3" v2="4" v3="5"/>
                <face v1="6" v2="7" v3="8"/>
                <face v1="9" v2="10" v3="11"/>
                <face v1="12" v2="13" v3="14"/>
                <face v1="15" v2="16" v3="17"/>
                <face v1="0" v2="18" v3="1"/>
                <face v1="3" v2="19" v3="4"/>
                <face v1="6" v2="20" v3="7"/>
                <face v1="9" v2="21" v3="10"/>
                <face v1="12" v2="22" v3="13"/>
                <face v1="15" v2="23" v3="16"/>
            </faces>
        </submesh>
    </submeshes>
    <submeshnames>
        <submesh index="0" name="Material"/>
    </submeshnames>
</mesh>

Material:

// generated by blender2ogre 0.9.0 on 2025-03-13 12:46:42
material Material {
    receive_shadows off
    technique {
        pass {
            scene_blend alpha_blend
            cull_hardware none
            depth_write off
            diffuse 0.8 0.8 0.8 1.0
            specular 0.5 0.0 0 0 0

            // additional maps - requires RTSS
            rtshader_system {
                lighting_stage metal_roughness
            }
        }
    }
}

blender2ogre.log

2025-03-13 12:46:42 [ INFO] * Target path: <REDACTED>/cube
2025-03-13 12:46:42 [ INFO] * Target file name: blender2ogre.scene
2025-03-13 12:46:42 [ INFO] * Blender version: 4.3.2 (release; Linux)
2025-03-13 12:46:42 [ INFO] * Processing Scene: blender2ogre, path: <REDACTED>/cube
2025-03-13 12:46:42 [ INFO] * Processing Materials
2025-03-13 12:46:42 [WARNING] Roughness input is not connected
2025-03-13 12:46:42 [ INFO] * Exporting root node: Cube 
2025-03-13 12:46:42 [ INFO] * Generating: Cube.mesh.xml
2025-03-13 12:46:42 [ INFO]   - Vertices: 8
2025-03-13 12:46:42 [ INFO]   - Loop triangles: 12
2025-03-13 12:46:42 [ INFO] * Writing shared geometry
2025-03-13 12:46:42 [ INFO] - Done at 0.02 seconds
2025-03-13 12:46:42 [ INFO] * Writing submeshes
2025-03-13 12:46:42 [ INFO] - Done at 0.02 seconds
2025-03-13 12:46:42 [ INFO] - Created Cube.mesh.xml at 0.02 seconds
2025-03-13 12:46:42 [ INFO] - Created Cube.mesh in total time 0.02 seconds
2025-03-13 12:46:42 [ INFO] * Exporting root node: Light 
2025-03-13 12:46:42 [ INFO] * Exporting root node: Camera 
2025-03-13 12:46:42 [ INFO] - Exported Ogre Scene: <REDACTED>/cube/blender2ogre.scene 
2025-03-13 12:46:42 [ INFO] - Done at 0.03 seconds

OgreXMLConverter.log

12:46:42: XMLMeshSerializer reading mesh data from <REDACTED>/cube/Cube.mesh.xml...
12:46:42: Reading geometry...
12:46:42: Geometry done...
12:46:42: Reading submeshes...
12:46:42: Submeshes done.
12:46:42: Reading mesh names...
12:46:42: Mesh names done.
12:46:42: XMLMeshSerializer import successful.
12:46:42: MeshSerializer writing mesh data to stream <REDACTED>/cube/Cube.mesh...
12:46:42: File header written.
12:46:42: Writing mesh data...
12:46:42: Writing submesh...
12:46:42: Submesh exported.
12:46:42: Exporting bounds information....
12:46:42: Bounds information exported.
12:46:42: Exporting submesh name table...
12:46:42: Submesh name table exported.
12:46:42: Mesh data exported.
12:46:42: MeshSerializer export successful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions