Jouerose Posted May 26, 2018 Share Posted May 26, 2018 Hello all, I was wondering whether from your experience, setting as true the hasAlpha property of an emissiveTexture work for you in the context of an image that has transparency ? if yes , could you please provide a simple playground example ? I know it works on diffuseTexture but so far I do not see it work on emissiveTexture. thank you for your input and help Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 27, 2018 Share Posted May 27, 2018 Hi J... sorry for the slow replies, but you ask a great question. https://www.babylonjs-playground.com/#KVRKS#12 I'm doing some experiments on my fake streetlights thing... lines 141-161 area. I had a theory I wanted to test. IF a material is using both emissiveTexture AND emissiveColor... I thought MAYBE... the alpha on the texture... would affect the amount of emissiveColor allowed to be seen thru the transparent parts of the emissiveTexture. (wow, what a sentence!) It seems not so, though, per my early tests. It seems... alpha for textures put into the material emissiveTexture channel... is not used/considered. Still, that's a guess. I really just wanted to provide a testing playground (and rattle-on aimlessly), here. :) Question remains open. This question requires an answer from somebody smarter than I. Slow weekend on the forum. More activity/visitors in 2-3 days, likely. Quote Link to comment Share on other sites More sharing options...
Jouerose Posted May 28, 2018 Author Share Posted May 28, 2018 thank you for your response @Wingnut from my point of view, the engine should allow such an operation: hasAlpha on emissiveTexture. @deltakosh what do you think ? PS: I have encoutered this issue as I am working on a 2D interactive piece. cheers Quote Link to comment Share on other sites More sharing options...
dbawel Posted May 28, 2018 Share Posted May 28, 2018 Babylon needs allot of features and there simply aren't the resources to have it all right now. If I had to choose a first feature, it would be a 32 bit texture to use with particles, and not the simple 24 bit usage as it is now. DB Quote Link to comment Share on other sites More sharing options...
Guest Posted May 29, 2018 Share Posted May 29, 2018 @dbawel Not sure to follow the problem with particles as particles read data for 32bits textures already @Jouerose Just use the same texture in emissiveTexture and opacityTexture and the engine will read alpha from opacityTexture and emissive color from emissiveTexture Quote Link to comment Share on other sites More sharing options...
Jouerose Posted May 29, 2018 Author Share Posted May 29, 2018 2 hours ago, Deltakosh said: @dbawel Not sure to follow the problem with particles as particles read data for 32bits textures already @Jouerose Just use the same texture in emissiveTexture and opacityTexture and the engine will read alpha from opacityTexture and emissive color from emissiveTexture MERCI Quote Link to comment Share on other sites More sharing options...
Jouerose Posted May 29, 2018 Author Share Posted May 29, 2018 IT WORKED: to have the same texture in the emissiveTexture field as well as the opacityTexture field did make the engine read the opacity of the image. Thank you Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 3, 2018 Share Posted June 3, 2018 Hi @Deltakosh- On my most recent project using particles (6 months ago), I was still not able to use an alpha channel on the texture for each particle as an alpha channel. As in the past, I was only able to use the black value in the 24 bit image to appear transparent. This is using either BLENDMODE. What am I missing, as I've utilized particles in many projects and have spent many many hours experimenting and delivering particle systems of every kind using the babylon.js framework. So if there is a PG scene which clearly uses a 32 bit image with an 8 bit alpha channel for transparency, I would be very excited... as this will allow me to do so many things I've been writing my way around to accomplish in the past. As well, I'll feel my normal anger with myself for not finding how to accomplish this in the current and past versions. Which is why I've been baffled as to why I've not discovered before as all of the 32 bit alpha channel support has always existed in WebGL since I began using in production almost 5 years ago. Thanks for reviewing this post, and I'll be waiting to see how the community responds. Cheers, DB Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 3, 2018 Share Posted June 3, 2018 Well I'm going to respond by telling you how "demanding" that post sounds. My goodness, DB, you know you can catch more flies with honey than you can with dogstool. (Actually, I haven't done laboratory-grade research on that, but you know what I mean.) Them people who you are working-for... are they stressing you out? Just let me know... I'll have a little talk with 'em. If your anus is all clinched-up, let me know if there's something I can do to relax it. I hate seeing you grumpy... but I suspect that a flower will get more bending done... than a hammer will, in this situation. (hug) 12 hours ago, dbawel said: I'll be waiting to see how the community responds. If you said... "I'll be gathering more research information and trying to chart the impacts of 32-bit opacity on other BJS materials/systems"... wouldn't that "feel" better, if you were in DK's very busy shoes? *shrug* Sorry if I'm butting-in... but remember that you once stomped-off in frustration... and made us all lonely for you. You're a valuable member around here... we want to see you happy and not sad. Try to keep in mind that "life" is leaning-on all of us, in many different ways. Stay cool... I'm sure DK/others will have 32-bit opacity news, asap. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2018 Share Posted June 4, 2018 Here we are: https://www.babylonjs-playground.com/#5PIZUM#1' See line #27: It forces the particle to use alpha from texture alpha channel hence using 32 bits PNG Quote Link to comment Share on other sites More sharing options...
dbawel Posted June 4, 2018 Share Posted June 4, 2018 Hi @Deltakosh I've tried this so many times in the past, and must have missed something. Thank you so much! DB Quote Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2018 Share Posted June 5, 2018 As always, my pleasure! 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.