-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Black background on obj with PNG textures. #12148
Comments
Help question posted on stackoverflow. |
Does Blender support decals? That is what this looks like. If so, how does the exporter handle them? |
/ping @Mugen87 Maybe you know something about this? |
@MarcinBorkowski03 Can you please share the |
Sure guys. Thanks for your help, here's my model in blender |
I ran into the same problem with a model in 3DS Max recently - this is the workaround I used. Use UV unwrapping to map your model (I've never done this in blender, docs are here though, and the process should be pretty similar to Max). Map the polygons where you want the texture to show as normal - that is, get the model to the point where the texture looks the way it currently does in your screenshot. This is probably best practice anyway, since otherwise it's hard to make the colour of the rest of your model blend with the background colour of your texture |
@MarcinBorkowski03 Can you also share the |
@looeee Thank you for your workaround but I need to make the whole black surface transparent beacuse I'm trying to create creator when customer can upload his PNG photo and change the model texture. @Mugen87 I'm so sorry, sure here is .blend model. CupBlenderModel.zip |
this is not fixed yet ritgh? I have the same problem |
There will be no fix since nothing is broken. As you can see here, the transparent part of a PNG is black per default (since no color is defined for transparent texels). You can change this behavior by setting |
Thanks , if the transparent part of a PNG is black per default , how can i
make this default another color?
The alphaTest = 0.5 is not working for me
Michael Herzog <notifications@github.com> escreveu no dia sexta, 29/03/2019
à(s) 21:02:
… this is not fixed yet ritgh?
There will be no fix since nothing is broken. As you can see at here
<https://jsfiddle.net/16u8dmqv/1/>, the transparent part of a PNG is
black per default (since no color is defined for transparent texels). You
can change this behavior by setting Material.transparent to true so
three.js can perform alpha blending with the respective background
pixels. Another approach is to set Material.alphaTest to a value like 0.5.
In this case the material is not marked as transparent but transparent
texels are discared in the fragment shader in order to produce an alpha
cutout.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12148 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZR4Uge8JeuwVucMKjtehesWdmOBWCm7ks5vbn97gaJpZM4PPkh8>
.
|
Please redirect your questions to stackoverflow or the forum. |
Just a quick note -- |
@garyo I think this really depends on the scenario. When rendering vegetation for example, using alpha cutouts is the better option and also more performant since you avoid any blending overhead. |
Description of the problem
Hello!
I have problem with transparent UV map in threejs. When I set texture in blender and I click "render" everything it's ok
but when I load model in threejs by JSONloader the black background load under PNG texture instead blender's material color.
How can I delete this black background in threejs and use blender material color?
Here is my code:
Three.js version
Browser
OS
Hardware Requirements (graphics card, VR Device, ...)
The text was updated successfully, but these errors were encountered: