starandserpent / java-TerraServer

Terra - Voxel octree of chunks, made for Rituals of the old
MIT License
17 stars 2 forks source link

Custom block models #27

Closed bensku closed 5 years ago

bensku commented 5 years ago

Blocks need to be able to have non-cube models. Mesher needs to be able to generate any shape that fits in the block cube while still doing culling as needed. A custom data format for block models (based on JSON) may be a good idea. It would also be ideal to be able to do the modeling in 3D program suich as Blender, not with a text editor.

Terra's core API should contain code handling custom data format, should we make one. Mesher would only need to contain loader code for it.

Pilvinen commented 5 years ago

We could possibly use the JVM version of Assimp (https://github.com/kotlin-graphics/assimp) to import OBJ models. If we only need support for meshes we should be fine with OBJ (ie. no animations, rigs).

It would be one step closer to getting the scene exported as JSON.

I am not aware of any free and open Java/Kotlin libraries which handle the whole thing. We might end up having to create our own implementation for the JSON part - which is probably not ideal, though, as it might be cumbersome to come up with a design which is well optimized.

Pawlost commented 5 years ago

Done