obj2egg produces unneeded verts

Bug #950906 reported by Wezu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Invalid
Undecided
David Rose

Bug Description

When converting from Wavefront OBJ to .egg with obj2egg.exe (on windowsXP) the egg files have unused vertex.

This is a sample .obj file:

#
# object Plane01
#

v 0.00 0.00 0.00
v 1.00 0.00 0.00
v 0.00 1.00 0.00
v 1.00 1.00 0.00
# 4 vertices

vn 0.00 0.00 1.00
vn 0.00 0.00 1.00
vn 0.00 0.00 1.00
vn 0.00 0.00 1.00
# 4 vertex normals

vt 0.00 0.00 0.00
vt 1.00 0.00 0.00
vt 0.00 1.00 0.00
vt 1.00 1.00 0.00
# 4 texture coords

g Plane01
f 3/3/1 1/1/2 2/2/3 4/4/4
# 1 polygons

There are exactly 4 vertex . And this is the egg:

<CoordinateSystem> { Z-Up }

<Comment> {
  "obj2egg quad4.obj quad4.egg"
}
<VertexPool> vpool {
  <Vertex> 1 {
    0 0 0
    <UV> { 0 0 0 }
    <Normal> { 0 0 1 }
  }
  <Vertex> 2 {
    1 0 0
    <UV> { 1 0 0 }
    <Normal> { 0 0 1 }
  }
  <Vertex> 3 {
    0 1 0
    <UV> { 0 1 0 }
    <Normal> { 0 0 1 }
  }
  <Vertex> 4 {
    1 1 0
    <UV> { 1 1 0 }
    <Normal> { 0 0 1 }
  }
  <Vertex> 5 {
    0 1 0
    <UV> { 0 1 0 }
    <Normal> { 0 0 1 }
  }
}
<Group> root {
  <Group> Plane01 {
    <Group> g {
      <Polygon> {
        <VertexRef> { 5 1 2 4 <Ref> { vpool } }
      }
    }
  }
}

Vertex #5 and #3 are exactly the same, but only #5 is used to make a polygon.

The extra vert doesn't break models and running 'egg-trans -c' seams to fix this, so the bug is of minor importance.

Revision history for this message
David Rose (droklaunchpad) wrote :

This isn't a bug. There is nothing wrong with redundant vertices appearing in an egg file; the syntax specifically allows it. Converters are free to create any number of vertices to represent the model as they see fit. The egg loader automatically removes extra vertices when loading a model, so it has no impact on runtime performance.

Changed in panda3d:
status: New → Won't Fix
status: Won't Fix → Invalid
assignee: nobody → David Rose (droklaunchpad)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers