Hi all,
I've been running into problems with my meshes. Essentially, in a mesh with multiple material groups, each one of those groups will duplicate the vertices of every other group in the mesh, creating these "ghosts" - and a gigantic spike in vertex count.
I created an example with three tori joined as one mesh. Each torus is assigned to the material groups on the right, one for each:
Export shows a spike in vertex count:
When re-importing into Blender, each material is split into its own mesh. Handy for organizational purposes, but the problem here is, for me, each of those meshes includes all of the vertices from the other groups. When we hit edit mode on one of them, we see the horror unfold:
Translated on Z a bit:
And one of the other rings:
I've been working with Ogre for some years, and after discovering this I checked my previous meshes stretching back to around 2014; all were "infected" like this. That's plenty of versions of both Blender and the exporter, and since discovering this issue I've tried as many as I could find, even trying Blender 2.8 and the unstable exporter released for that. No dice.
I experimented with a single finished .mesh of a monster truck body shell made by a friend; I know for a fact it was made, set up, and exported in Blender. Left is how the mesh imported, right is how it was after I reassigned materials, re-exported, then re-imported. The windshield has duplicated every vertex in the other material group.
Here is the .xml of the tori from the first example. I wanted to provide an exporter log, but when I tried to have it write one it was suddenly unable to find OgreXMLConverter and I got nothing. If there's anything else I can provide, I'll try my best.
This Coronavertex is the bane of my existence right now; any insight would be vastly appreciated. Thank you!
Blender exporting - material groups creating vertex "ghosts" of others
-
- Gnoblar
- Posts: 7
- Joined: Fri Jun 29, 2012 10:43 pm
-
- OGRE Team Member
- Posts: 1994
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1074
- Contact:
Re: Blender exporting - material groups creating vertex "ghosts" of others
what are you using for importing? 6912 vertices means 2304 per torus which seems about right considering the vertex duplication required for flat shading and 1728 source vertices for one torus in blender.
Note that the exporter needs to replicate the torus vertices to bake the positions in the mesh file (in contrast to using .scene).
Also try looking at the mesh with: https://github.com/OGRECave/ogre-meshviewer
Note that the exporter needs to replicate the torus vertices to bake the positions in the mesh file (in contrast to using .scene).
Also try looking at the mesh with: https://github.com/OGRECave/ogre-meshviewer
-
- Gnoblar
- Posts: 7
- Joined: Fri Jun 29, 2012 10:43 pm
Re: Blender exporting - material groups creating vertex "ghosts" of others
Thanks for the response. Importing was a random plugin I found based on the "Torchlight" importer called "Kenshi". I just got it because it had been updated to work with Blender 2.8 and I was trying all sorts of export and import plugins trying to solve this. This isn't down to the importer because it imports other meshes, like my friend's pickup truck body, just fine.
I appreciate that the flat shading adds vertices, just a quick example and I didn't think to set them smooth. Regardless, you can see the issue persists on the truck body in my last image, which is smooth-shaded. Nothing appears untoward in meshviewer for the tori:
I know for a fact that pickup truck body was made in, and exported with, Blender - what am I doing wrong? I just want to export my meshes cleanly without these ghost vertices, like he evidently did.
I appreciate that the flat shading adds vertices, just a quick example and I didn't think to set them smooth. Regardless, you can see the issue persists on the truck body in my last image, which is smooth-shaded. Nothing appears untoward in meshviewer for the tori:
I know for a fact that pickup truck body was made in, and exported with, Blender - what am I doing wrong? I just want to export my meshes cleanly without these ghost vertices, like he evidently did.
-
- OGRE Team Member
- Posts: 1994
- Joined: Sun Mar 30, 2014 2:51 pm
- x 1074
- Contact:
Re: Blender exporting - material groups creating vertex "ghosts" of others
As you can see in meshviewer all vertices are in the same shared buffer. Thats why I rather suspect that the importer just duplicates the buffer instead of splitting it.
-
- Gnoblar
- Posts: 7
- Joined: Fri Jun 29, 2012 10:43 pm
Re: Blender exporting - material groups creating vertex "ghosts" of others
The tori were created by me in Blender for this example, not imported. Also, if it's down to the importer, then surely my friend's pickup body would have the same problem when I get it into Blender.
EDIT: In comparing his and my meshes in meshviewer, his has no shared vertices, whereas mine does. From googling around, I guess older versions of Blender and thus older exporters didn't export shared. Not a sausage of support on how to export with unshared geometry with newer versions, and any updated plugins I found made by people having this issue were for versions of Blender just old enough to no longer work on mine.
Forget it.
EDIT: In comparing his and my meshes in meshviewer, his has no shared vertices, whereas mine does. From googling around, I guess older versions of Blender and thus older exporters didn't export shared. Not a sausage of support on how to export with unshared geometry with newer versions, and any updated plugins I found made by people having this issue were for versions of Blender just old enough to no longer work on mine.
Forget it.