Jump to content

Draw order with transparent models: possible bug?


jdurrant
 Share

Recommended Posts

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:

 

post-13453-0-74004600-1426095138_thumb.j

 

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:

 

post-13453-0-25873700-1426095290_thumb.j

 

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...