Just to let you know and avoid duplicate work. I’m currently working on java3d GeometryInfo replacement. It will support vertex optimizer, normal generator (both flat and per-face smooth group) and vertex-cache aware stripifier. I want to allow any combination of raw data/mixed indices as input geometry - but only for triangles. I do not plan to work on polygon to triangle division at the moment, but it should be possible to stick it just before my GeometryInfo.
This is great, because of I have now trivial indexer/unindexer and was thinking about something like GeometryInfo replacement.
In the meantime, I think it may be good to adapt Xith3D renderer to support mixed geometry.
Yuri
[quote]Just to let you know and avoid duplicate work. I’m currently working on java3d GeometryInfo replacement. It will support vertex optimizer, normal generator (both flat and per-face smooth group) and vertex-cache aware stripifier.
[/quote]
Very nice. The normal generator I could use straight away. 
Are there plans already when this will be added to Xith3d?
Nearly can’t wait. 
How do you propose to name process of finding vertices with same coordinates and merging them into one index (and opposed operation, where every face gets 3 unique indexes to 3 unique vertices) ?
To this point I was calling it optimize/deoptimize - but I also use these words to denote vertex cache optimalization, which is totally unrelated. Any ideas about the names for the operations ? Here are my ideas
mergeVertices / splitVertices
compactVertices / expandVertices
unifyVertices / ?Vertices
makeSimilarVerticesTheSame/makeTheSameVerticesDifferent 
Before it can work, I need few corrections to main xith3d code.
First one is to add support for indexed triangle strips. Here is quick and dirty code - I don’t like it, because it creates temporary buffer object per each strip, but it was fastest for now (this should go into ShapeAtomPeer). In future, it will have to be refactored anyway to allow to use VBO for indices.
} else if (geoArray instanceof IndexedGeometryArray) {
if (geoArray instanceof IndexedTriangleArray) {
mode = GL.GL_TRIANGLES; // say that we want to draw points
IndexedGeometryArray igeoArray = (IndexedGeometryArray) geoArray;
gl.glDrawElements(mode, igeoArray.getValidIndexCount(), GL.GL_UNSIGNED_INT, igeoArray.getIndexData().getIntBuffer());
} else if ( geoArray instanceof IndexedGeometryStripArray ) {
mode = GL.GL_TRIANGLE_STRIP;
IndexedGeometryStripArray igsa = (IndexedGeometryStripArray)geoArray;
int[] strips = igsa.getStripVertexCounts();
int start = 0;
for (int s = 0; s < strips.length; s++) {
gl.glDrawElements(mode,strips[s],GL.GL_UNSIGNED_INT,((IntBuffer)igsa.getIndexData().getIntBuffer().position(start)).slice());
start += strips[s];
}
}
} else {
gl.glDrawArrays(mode, geoArray.getInitialVertexIndex(), geoArray.getValidVertexCount());
}
Then, in GeomContainer, setNormal should be
public void setNormal(int int0, Vector3f vector3f) {
normals.setFloats(int0*3,vector3f);
}
not (int0,vector3f) as it is now.
IndexedGeometryStripArray constructor should be
public IndexedGeometryStripArray(int type, int vertexCount, int vertexFormat, int indexCount, int []stripIndexCounts) {
super(type,vertexCount,vertexFormat,0,null,stripIndexCounts,indexCount);
}
Currently stripIndexCounts are ignored.
It would be also nice to intialize validIndexCount to maxIndexCount in GeomIndexedContainer - currently it is 0 and it is very easy to forget to intialize it, as it is not in constructor.
http://nwn-j3d.sourceforge.net/xith3d/geomdata.zip
Interesting classes are geomdata.XithGeometryInfo and geomdata.GeometryCreator.
Color/tex coord support is untested - it should work, as it is similar code to rest of components, but I might had done some copy/paste mistake. Javadocs are a bit sparse, but I hope you should be able to get it working.
Will these helper classes become part of the xith core, or will they go in the toolkit?
Eric
[quote]How do you propose to name process of finding vertices with same coordinates and merging them into one index (and opposed operation, where every face gets 3 unique indexes to 3 unique vertices) ?
[/quote]
Don’t most modeling programs call this weld & unWeld?
@Orangy - Yep, sounds like a good name for it
abies,
Should I add your proposed changes to CVS or you feel this is too early? [also having in mind our discussion on unified geometry container, http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1071694462, “Mixed geometry in Shape3d”]
Yuri
setNormal is no-brainer, because it is a bug. Third one is optional - I don’t think it will break anything and can save some frustration for newcomers. As for the first - I would suggest to apply it now, as we can wait for mixed geometry for some time (as there are few issues to be resolved there) and ability to use indexed strips is IMHO quite important.
I would like to put geom creator into xith-tk first, but I before that it would be good somebody else would try to use it and maybe comment about problems/API etc ? It is later rather hard to rename files in CVS.
P.S.
I’ll change name to weldVertices and unweldVertices, rename package names and put new version in few hours.
[quote]I’ll change name to weldVertices and unweldVertices, rename package names and put new version in few hours.
[/quote]
Than maybe a diff submitted to Issuezilla, so it will be trivial for me to apply? Thanks in advance!
[quote]I would like to put geom creator into xith-tk first, but I before that it would be good somebody else would try to use it and maybe comment about problems/API etc ?
[/quote]
I can try it with my app - I have indexing/unindexing code centralized, so I’d like to add stripification there, too, so we can test.
Yuri