Back to the Shapespark home page

Foliage transparent png problem?


just testing shapespark on foliage. i have to use transparent png for all leafs. but look like culling objects each other.

I tried to deatch all objects but the result is the same. how can i fix this?

Hello. Transparency is hard to handle. Shapespark uses order dependent algorithm that requires rendering of triangles from the furthest away to the closest to the camera. Such sorting is not always possible, and the problems that you see are the result of incorrect render order.

Foliage textures use binary transparency: a pixel is either fully opaque or fully transparent. It is possible to detect such textures and handle them in a different way that does not require rendering from back to front. We will try to add such improvement in one of upcoming releases.

1 Like

Starting from version 1.7 Shapespark detects alpha-cutout textures and handles them in order independent way. Foliage should now render without such artifacts.

1 Like

hi …
I tried (1.7.1) but the problem still exists. I use png (transparent) texture. any advice?

Sorry about it, there are two issues here:

  • We had a bug that caused the alpha-cutout texture detection to work only for scenes with light probes. It is fixed now.

  • The texture uses white color for fully transparent pixels, which is interpolated around the edges of the leaves and causes white border to appear there. Shapespark should solve this issue by converting all transparent input textures to premultiplied alpha format. In such case the color of fully transparent pixels wouldn’t affect the rendered image. Until we have such conversion it is better to use black color for fully transparent pixels in cutout textures.