Loading the mtl mesh material colors from a Wavefront .obj model using Silk.NET.Assimp #1554
Unanswered
1vx-437312114
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone.
I've written a model loader for 3D models in the Wavefront obj format in C# using the Silk.Net Assimp-Bindings. I used the code from the opengl tutorials (Tutorial 4.1 - Model Loading) provided by the Silk.Net-Framework as a foundation.
So far everything works (loading vertices, normals, textures ...). But now i want to get the mesh material colors from the mtl-File.
Using the C++ version of assimp i would simply call the aiGetMaterialColor function passing a
AI_MATKEY_COLOR_XXXXX
type as parameter for the color type i would like to get.E.g.:
How do i do the same thing using Silk.Net.Assimp?
So far i have:
And now i am stuck which parameters should i pass to this function to get the material colors (ambient, diffuse, specular ...)? Is this even the right method to call or do i have to use another method?
Beta Was this translation helpful? Give feedback.
All reactions