jps0611 Posted August 21, 2018 Author Share Posted August 21, 2018 Was afraid of that...I'll fill a ticket in the Webkit forum. And again....thanks for you hard work and diligence! JPS Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 21, 2018 Share Posted August 21, 2018 No problem, I definitely prefer checking on our side and thanks for reporting. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 22, 2018 Share Posted August 22, 2018 So I was right about the mips and the transparent pixels being stored as 0,0,0,0. Cool I’m not crazy. The work around solution is export younr cat with its background being the same color yellow, then use a secondary alpha texture. Sebavan 1 Quote Link to comment Share on other sites More sharing options...
pichou Posted August 28, 2018 Share Posted August 28, 2018 Hello, sorry to interupt you in this passionated topic! I really liked following your ideas and brainstorming on the subject. But I have to participate because I have the same issue. All the png and svg image I import in babylon have this dark/grey edge showing when you set hasAlpha to true. See in this playground : https://playground.babylonjs.com/#U6F7E2#12 For me the problem occurs on every browser. I tried all of your solution above and none has work. The only way I found to improve this was to use engine.setHardwareScalingLevel(0.5); but not very nive for the GPU I guess. Hope that can help the topic! Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 28, 2018 Share Posted August 28, 2018 Have you try using a tga? (32b, using alpha channel) Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 28, 2018 Share Posted August 28, 2018 hey guys what the heck you are doing here. You are testing the texture color value against the lights and this would be my first thought, when i would start debug. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 28, 2018 Share Posted August 28, 2018 @pichou This comes from your texture: (only color here, no alpha) Quote Link to comment Share on other sites More sharing options...
Guest Posted August 28, 2018 Share Posted August 28, 2018 Even more visibile with no bilinear filtering: https://playground.babylonjs.com/#U6F7E2#13 Quote Link to comment Share on other sites More sharing options...
pichou Posted August 28, 2018 Share Posted August 28, 2018 @Deltakosh, you are saying my png image has a background? Why is it working with just hasAlpha then? @V!nc3r, I haven't tried yet but is the tga format the format you advise to use when working in babylonjs? Thank you guys! Quote Link to comment Share on other sites More sharing options...
Guest Posted August 28, 2018 Share Posted August 28, 2018 It works with hasAlpha because the pixels on that line will be removed (alpha < 128) Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 28, 2018 Share Posted August 28, 2018 Do we and if not why don't we have a method for setting a specific alpha texture so we can have a separate image an alpha? IE: myMaterial.alphaTexture = new BABYLON.Texture("PATH TO IMAGE", scene) myMaterial.alphaTexture.blackAndWhite = true Are yall still getting the artifacts with this: https://playground.babylonjs.com/#HLGXFX#3 *UPDATE* Dumb dumb dumb... http://www.babylonjs-playground.com/#4K1IX9 Just export your cat on a solid yellow background, then export the opacity pass as a separate image. Should fix your artifacts. Why material.opacityTexture is not mentioned in the docs anywhere I can find is beyond me. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 29, 2018 Share Posted August 29, 2018 Quote Why material.opacityTexture is not mentioned in the docs anywhere I can find is beyond me Because documentation is a long and painful work and we are not getting a lot of help on this front (However I wanted to shout out to @JohnK for his invaluable help on the doc) Quote Link to comment Share on other sites More sharing options...
Guest Posted August 29, 2018 Share Posted August 29, 2018 And btw opacity texture is in the doc: http://doc.babylonjs.com/how_to/more_materials#opacity (perhaps not easy to find though?) Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 29, 2018 Share Posted August 29, 2018 Well anyways that would be the solution for everyone struggling with the 0 alpha dropping color values. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.