while working on the quake3->egg converter i had serious need to convert curved surfaces. cause i didnt want calculate the stuff myself i decided to try nurbssurface as provided by panda.
so here’s the problem:
white is my base-mesh ( i manually added it), red the resulting surface
as you can see. it works quite well. except that it’s not covering the entire base mesh. i managed to shift it to the other corner. but it still spawns over 75% of the mesh only. i also had it working so it was only 50% covering only around the center.
here’s the egg
<CoordinateSystem> { Z-Up }
<Comment> { }
<Group>{
<VertexPool> BSPmap {
<Vertex> 0 {
0 0 0
}
<Vertex> 1 {
1 0 1
}
<Vertex> 2 {
2 0 0
}
<Vertex> 3 {
0 1 0
}
<Vertex> 4 {
1 1 1
}
<Vertex> 5 {
2 1 0
}
<Vertex> 6 {
0 2 1
}
<Vertex> 7 {
1 2 0
}
<Vertex> 8 {
2 2 1
}
}
<Polygon> {
<VertexRef> { 0 1 3 <Ref> { BSPmap } }
}
<Polygon> {
<VertexRef> { 3 1 4 <Ref> { BSPmap } }
}
<Polygon> {
<VertexRef> { 1 2 4 <Ref> { BSPmap } }
}
<Polygon> {
<VertexRef> { 4 2 5 <Ref> { BSPmap } }
}
<Polygon> {
<VertexRef> { 3 4 6 <Ref> { BSPmap } }
}
<Polygon> {
<VertexRef> { 6 4 7 <Ref> { BSPmap } }
}
<Polygon> {
<VertexRef> { 4 5 7 <Ref> { BSPmap } }
}
<Polygon> {
<VertexRef> { 7 5 8 <Ref> { BSPmap } }
}
<NURBSSurface> patch1 {
<Order> { 3 3 }
<U-knots> { 0 0 1 2 2 2 }
<V-knots> { 0 0 1 2 2 2 }
<Scalar> U-subdiv { 10 }
<Scalar> V-subdiv { 10 }
<RGBA> { 1 0 0 1 }
<VertexRef> {
0 1 2 3 4 5 6 7 8
<Ref> { BSPmap }
}
}
}
i converted it to non-nurbs using
egg-qtess -e nurbtest.egg >out.egg
i was able to get a full basemesh covered with order set to 2 2 but thats not what i want. quake3 sais it uses bi-cubic interpolation. (dunno if that would be 3 3 but it guess so cause 4 4 would totaly not work)
any ideas how to fix this?