Author Topic: Implementing new model loaders  (Read 8806 times)

jjzazuet

  • Jr. Member
  • **
  • Posts: 16
    • Unsung Stories
Implementing new model loaders
« on: September 24, 2012, 12:57:16 PM »
Hello.

I'm currently trying to implement a model loader for Unreal PSK models.

A quick look at Bonzai's JavaDoc tells me that I should start by creating a new implementation of:


What I'm not so sure about is how to perform create the actual Bonzai native model or how to register this new PSK model loader implementation with the engine.

Is there any documentation which covers this subject?

Thanks for your time and help!

JZM

jerome_j

  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Implementing new model loaders
« Reply #1 on: September 24, 2012, 03:37:51 PM »
You'll have to implement IModelReader interface and register it to BonzaiEngine singleton similarly to:

A basic implementation of IModelReader interface:

For static model, you'll have to create Mesh, GeometryData, VertexData, Material objects and store them in the model object.
There's some helpers for creating GeometryData/VertexData for converting various format of geometry and also generaing normals GeometryIndexed.
« Last Edit: September 24, 2012, 03:43:30 PM by jerome_j »