Author Topic: Vertex optimization?  (Read 3099 times)

Offline ErDetEnAnd?

  • int
  • **
  • Posts: 87
    • View Profile
Vertex optimization?
« 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Vertex optimization?
« Reply #1 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()) as well as in the Loader (http://www.jpct.net/doc/com/threed/jpct/Loader.html#setVertexOptimization(boolean)).

Offline ErDetEnAnd?

  • int
  • **
  • Posts: 87
    • View Profile
Re: Vertex optimization?
« Reply #2 on: May 18, 2008, 05:11:29 pm »
Thanks Egon.