oryol icon indicating copy to clipboard operation
oryol copied to clipboard

glTF support

Open unicomp21 opened this issue 8 years ago • 6 comments

We need glTF support: https://github.com/KhronosGroup/glTF

unicomp21 avatar Dec 08 '17 11:12 unicomp21

Just use assimp with the oryol engine, it brings completly glFT-support.

kkulling avatar Dec 08 '17 12:12 kkulling

Several ways to achieve this (more or less brain-dumping, none of this works yet out-of-the-box):

  1. offline conversion: the oryol-conv3d tool (https://github.com/floooh/oryol-tools/tree/master/src/oryol-conv3d) has an assimp-loader, currently glTF import might be disabled in the build settings, and the assimp dependency version might need to be brought to the latest version
  2. direct loading: this would basically be a new asset loader, but I would not integrate this directly into Oryol, since core Oryol doesn't define a material system, but glTF sort of requires some sort of material system.

I have some changes in mind to move loading of complex assets (basically asset files which reference other asset files, like textures) out of Oryol, and into some sort of asset-loading-collection module... but first I want to finish the switch to sokol_gfx for the rendering backend.

floooh avatar Dec 09 '17 14:12 floooh

Thanks! BTW, the intention is to procgen assets in a webworker using the gltf format(s). So, runtime loading is the hope.

unicomp21 avatar Dec 11 '17 09:12 unicomp21

Any chance there is mikktspace support in here? Or should I just pull in the reference files from blender?

https://wiki.blender.org/index.php/Dev:Shading/Tangent_Space_Normal_Maps

unicomp21 avatar Dec 21 '17 10:12 unicomp21

Asset loading/parsing and shaders are all performed by the application code (or maybe later in external custom modules). Right now you would need to write your own loader. You can look at the Dragons sample for inspiration, which loads mesh, skeleton and animation data from a custom '.orb' binary format:

https://github.com/floooh/oryol-samples/blob/7f01ccdd9853a18aef0a405a1bb634fa954314ba/src/Dragons/Dragons.cc#L210-L236

Using this loader:

https://github.com/floooh/oryol-samples/blob/master/src/Common/OrbLoader.cc

And this fileformat parser:

https://github.com/floooh/oryol-samples/blob/master/src/Common/OrbFile.cc

floooh avatar Dec 21 '17 11:12 floooh

Thanks Andre!

On Thu, Dec 21, 2017 at 5:45 AM Andre Weissflog [email protected] wrote:

Asset loading/parsing and shaders are all performed by the application code (or maybe later in external custom modules). Right now you would need to write your own loader. You can look at the Dragons sample for inspiration, which loads mesh, skeleton and animation data from a custom '.orb' binary format:

https://github.com/floooh/oryol-samples/blob/7f01ccdd9853a18aef0a405a1bb634fa954314ba/src/Dragons/Dragons.cc#L210-L236

Using this loader:

https://github.com/floooh/oryol-samples/blob/master/src/Common/OrbLoader.cc

And this fileformat parser:

https://github.com/floooh/oryol-samples/blob/master/src/Common/OrbFile.cc

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/floooh/oryol/issues/284#issuecomment-353331365, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhV_W_ccHATitJHiLoQ6LjBj2UvpGfxks5tCkT1gaJpZM4Q68Sr .

unicomp21 avatar Dec 29 '17 22:12 unicomp21