Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glTF support #284

Open
unicomp21 opened this issue Dec 8, 2017 · 6 comments
Open

glTF support #284

unicomp21 opened this issue Dec 8, 2017 · 6 comments

Comments

@unicomp21
Copy link

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

@kkulling
Copy link

kkulling commented Dec 8, 2017

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

@floooh
Copy link
Owner

floooh commented Dec 9, 2017

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.

@unicomp21
Copy link
Author

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

@unicomp21
Copy link
Author

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

@floooh
Copy link
Owner

floooh commented Dec 21, 2017

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

@unicomp21
Copy link
Author

unicomp21 commented Dec 29, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants