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
Adding Flag for Diffuse Texture Alpha #3801
Conversation
Hopefully adding support to obj import mtl parsing to support a flag for diffuse texture having an alpha pass. "bjs_diffuseHasAlpha 1"
@@ -121,7 +121,14 @@ module BABYLON { | |||
} else if (key === "map_d" && material) { | |||
// The dissolve of the material | |||
material.opacityTexture = MTLFileLoader._getTexture(rootUrl, value, scene); | |||
|
|||
} else if (key == 'bjs_diffuseHasAlpha' && ((material) && material.diffuseTexture)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you want to go with a custom parameter? This does not seem scalable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me review the mtl file structure and and see if there is a parameter that covers the diffuse having an alpha. I'm pretty sure there is not, so my thought would be you could edit your mtl after export.
What thoughts do you have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get your point but this is kind of not convenient
I would perhaps prefer loading the texture and trying to check if there are alpha data
But your solution is also acceptable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roger that! Let me whip up a method for that, then maybe we can compare and then get input from others?
Excellent idea! |
Hi @Pryme8 , |
I have no way of testing this and have just kinda given up on the idea... so y'all can delete this PR. sigh sorry. |
Hopefully adding support to obj import mtl parsing to support a flag for diffuse texture having an alpha pass.
"bjs_diffuseHasAlpha 1"