www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: ErDetEnAnd? on May 18, 2008, 02:04:58 pm

Title: Vertex optimization?
Post by: ErDetEnAnd? on May 18, 2008, 02:04:58 pm
Hello.

I got a 3D object engine which writes models, and then they're passes into jPCT. When accessing an object's mesh data by a VertexController I see 33% less vertices than the original model has - regardless of model. What is going on?

Regards.
Title: Re: Vertex optimization?
Post by: EgonOlsen on May 18, 2008, 04:29:09 pm
jPCT aggregates vertices that share the same space to one by default. That speeds up geometry processing. In some cases (for animations for example), this is not what one wants, which is why you can disable it in Object3D (http://www.jpct.net/doc/com/threed/jpct/Object3D.html#disableVertexSharing() (http://www.jpct.net/doc/com/threed/jpct/Object3D.html#disableVertexSharing())) as well as in the Loader (http://www.jpct.net/doc/com/threed/jpct/Loader.html#setVertexOptimization(boolean) (http://www.jpct.net/doc/com/threed/jpct/Loader.html#setVertexOptimization(boolean))).
Title: Re: Vertex optimization?
Post by: ErDetEnAnd? on May 18, 2008, 05:11:29 pm
Thanks Egon.