Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

JVM Open Asset Import Library (Assimp)

License

NotificationsYou must be signed in to change notification settings

kotlin-graphics/assimp

Repository files navigation

Build StatuslicenseReleaseSizeGithub All ReleasesAwesome Kotlin Badge

JVM porting ofAssimp

This port is being written trying to stick as much as possible close to the C version in order to:

  • minimize maintenance to keep it in sync with the original
  • minimize differences for people used to dev/work with Assimp

Code

A small example how to load files:

  • for java users:
AiScenescene =newImporter().readFile("test/resources/models/OBJ/box.obj");
  • for kotlin users:
val scene=Importer().readFile("test/resources/models/OBJ/box.obj")

Port Status

Format priority list

If you have a format or a feature which is not yet supported, you can use the original assimp (or the lwjgl one) to load the mesh you have and save it in assimp binary format (.assbin). Once done, you can load it with this port.

In case you don't know how to do it, you may open anissue giving the mesh, specifying the options and I'll convert it for you into binary assimp.

Please note that using the binary assimp format is also the fastest way to import meshes into your application.

The development is essentially feature-driver, if you want to express your preference ->Format wish list

Contributions:

Do not hesitate to offer any help: pushes (java or kotlin, it doesn't matter), testing, website, wiki, etc

Comparison to a simple binding

Advantages:

  • runs entirely on jvm (Garbage Collector)
  • lighter import
  • written in Kotlin (less code to write, more features, more expressiveness)
  • cleaner, more intuitive interface (especially theMaterial part)
  • plain names, without prefixes
  • possibility to set the build-time flags and property (debug/config/log)
  • easier to debug
  • easier to modify/customize, e.g: textures get automatically loaded and offered viagli library, you just have to upload them to GL
  • matrices are column-major instead of row-major and offered via theglm library
  • easier to fix (found a couple of bugs on the original assimp, opened an issue, I didn't have to wait for the next releases fix)
  • reduced the maintenance at minimum by keeping the same structure as possible during the port
  • possible to get the same loading speed, using binary assimp format

Disadvantages:

  • code needs to be ported from cpp to java
  • code needs to be maintained
  • a little slower compared to cpp when loading big meshes if not using assbin

[8]ページ先頭

©2009-2025 Movatter.jp