-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add reading/saving shaders from/to .mtl files #43
Comments
@ereator I would be happy to have a look at this feature request and provide a PR sometime in the near future. Is this still up for grabs? If so, I'd go ahead and assign this to myself. |
@otmanesabir Thank you very much for your will to help with this feature! |
@ereator brilliant - will have a go at this!| Would we also want to try to directly load shaders (.mtl) if they are referenced in obj files? |
@otmanesabir |
@ereator
I've considered moving this loading logic to the Any thoughts on these issues? Or how we can approach this here? |
@otmanesabir |
@erator
Okay, makes sense. Will follow an incremental approach with the implementation as well
…On Apr 23, 2022, 9:43 PM +0200, Sergey Kosov ***@***.***>, wrote:
@otmanesabir
I think this feature may be implemented in a few stages - during the implementation, I hope it will become clearer what and where should be placed.
Maybe it makes sense to put the implementation first in CShaderPhong class... It already contains the most important coefficients as ks, ka, etc. Textures in .mtl files at the beginning may be completely ignored. So, every time when material appears in .obj file, we can create a new Phong shader and then apply it to a solid, corresponding to a group in the .obj file...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Is your feature request related to a problem? Please describe.
When loading geometry from an .obj files containing multiple objects (e.g. as groups [g]) it is often the case that these objects have links to theirs materials, saved in accompanying .mtl files. Thus, it is very important to add reading / saving shaders into / from .mtl files. The description of the Wavefront material template library file format may be found at Wikipedia.
Describe the solution you'd like
Add methods
load()
andsave()
toCShader
class.The text was updated successfully, but these errors were encountered: