Announcement

Collapse
No announcement yet.

SpeedTree Modeler v8.3.0 (Unity SV) exports alpha with dithered noise

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SpeedTree Modeler v8.3.0 (Unity SV) exports alpha with dithered noise

    I'm evaluating using speetree for foliage creation in a Unity project and we immediately noticed the following issues:
    1. That the alpha channel in the color png is filled with dithering which seems like a bug -- unless there is a good explanation for this?
    2. Exporting textures atlased textures as 1024 results in a 512x1024 image that is obviously stretched vertically.
    3. Card renders are not packed very compactly (empty space).
    4. Texture atlas is not optimally packed.
    image shows issues 1,2 & 4
    Click image for larger version

Name:	badLeafAlpha.png
Views:	59
Size:	196.0 KB
ID:	7278

  • #2
    Hello,

    > That the alpha channel in the color png is filled with dithering which seems like a bug -- unless there is a good explanation for this?

    All transparency is accomplished with alpha testing instead of blending so it doesn't require sorting the polygons. There are places in the tree that require some sort of blending, like branch seams, shells, etc. This is done by dithering the alpha. Instead of computing noise in the fragment shader, it is just embedded in the texture. It will work correctly in Unity. If it really bothers you, you can remove the noise in <app install>/texture_packing/Unity.fx


    > Card renders are not packed very compactly (empty space)

    You are looking at the alpha channel. There is geometry that is bigger than the alpha channel that cannot overlap in UV space.


    > Texture atlas is not optimally packed

    When making an atlas with only a few things, you will most likely have some empty space unless you really hammer the aspect ratios of the original textures. One thing I can suggest, though, is that if those textures on the left are branch textures (if you are putting everything in the atlas, for example), be sure to enable V-tiling in the export dialog. That will take any textures that wrap in V and place them in the atlas such that they still can wrap in V by touching the top and bottom of the atlas. It saves a ton of texture resolution on branches, and often results in better atlases too.


    > Exporting textures atlased textures as 1024 results in a 512x1024 image that is obviously stretched vertically.

    This is the only one I am unsure about. That does look stretched to me. I notice you said 8.3.0. The latest version is 8.4.1. First step is to try upgrading to the latest, as we are always fixing bugs and improving things.


    Hope this helps


    Comment


    • #3
      Greg -- super helpful response -- turning on vtiling resulted in a better packing AND fixed the aspect ratio issue -- so FTW on both of those!

      Click image for larger version

Name:	better.png
Views:	21
Size:	849.2 KB
ID:	7282
      As for the dithering, if it's problematic for us, I suppose we can undo it. However, I do see some edges on the card renders (sorry -- new topic!) Personally, I'd still like to see better packing on the flat cards textures
      Click image for larger version

Name:	cardEdge.png
Views:	26
Size:	87.7 KB
ID:	7281

      Thanks Again!

      Comment


      • #4
        You can remove dithering from the texture packing shader, as I mentioned before.

        But the noise is a final step in the texture packing. It's only added where the opacity > 0.3, so it's not what is causing that extra edge in that last image of yours. Is that a texture that you made? It looks to me that maybe there is white outside where the geometry is in the original texture, and texture filtering is bleeding the white in just a little when constructing the atlas. (E.G like the following image). If so, be sure to have all the transparent parts be black, even if the geometry is cutting them out.


        Click image for larger version

Name:	leaf.png
Views:	26
Size:	4.5 KB
ID:	7285

        Comment


        • #5
          it's Broadleaf_Desktop_Field.spm from the demo/sample download with no changes. I was using it as a test asset to determine if artifacts we were seeing in a custom asset were asset-specific or not. Looks like 8.3.0 is the latest trial version available for Unity, so I cannot verify if this issue is resolved in a later version, or is only specific trial version. --- and Greg, thanks for your prompt response!

          Comment


          • #6
            There is no trial version of the subscription SpeedTree for Unity. Or are you just using export-only mode? You should be able to get 8.4.1 on the SpeedTree store.
            If you are a full games evaluator, please email [email protected] and we can get your download account straightened out so you have the latest.

            Comment

            Working...
            X