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

Adding Flag for Diffuse Texture Alpha #3801

Closed
wants to merge 2 commits into from
Closed

Conversation

Pryme8
Copy link
Contributor

@Pryme8 Pryme8 commented Feb 21, 2018

Hopefully adding support to obj import mtl parsing to support a flag for diffuse texture having an alpha pass.
"bjs_diffuseHasAlpha 1"

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)){
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor Author

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?

@deltakosh
Copy link
Contributor

Excellent idea!

@RaananW
Copy link
Member

RaananW commented Feb 26, 2018

Hi @Pryme8 ,
Care to update what's new with the change? You can add it to this PR. Please don'T forget to update the documentation site (if not already done).
Thanks!!!

@Pryme8
Copy link
Contributor Author

Pryme8 commented Feb 26, 2018

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.

@Pryme8 Pryme8 closed this Feb 26, 2018
@Pryme8 Pryme8 deleted the patch-2 branch November 24, 2019 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants