jdurrant Posted March 11, 2015 Share Posted March 11, 2015 I’ve been creating a simple scene to familiarize myself with Babylon.js. It includes tree models with palms that are modified planes. To keep the polys low, I use a transparent PNG texture to get leaf-level detail. In the blender material panel, I click the “Transparency” checkbox, choose “Z Transparency”, and turn the alpha value down to 0.0. In the blender texture panel, I also click on the “Alpha” checkbox (in the “Influence” subpanel), and turn that value up to 1.0. I then export to a *.babylon file and load it within babylon.js. The individual models look good in both blender and babylon.js. However, in Babylon.js the draw-order is affected. Trees that are farther away are sometimes drawn last: The issue appears to resolve when I deactivate all alpha and transparent options in blender, while still using the transparent PNG texture. In this case, the trees look fine in Babylon.js, but they don’t look right in blender: Don’t know if this is a bug or not, but thought I’d let you know just in case. I got the effect I wanted in the end, but the solution wasn’t obvious (at least to me). Thanks for a great engine! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 12, 2015 Share Posted March 12, 2015 Hello and welcome, to get the right thing here, you have to export your PNG in the diffuse channel and enable alpha. In this case Babylon.js will understand that you want alpha testing and not alpha blending I think that our Blender experts will be able to help you more here 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.