Announcement

Collapse
No announcement yet.

Creating Atlas with SpeedTree 8 (Games Edition)

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

  • Creating Atlas with SpeedTree 8 (Games Edition)

    Hey!

    Im looking for a solution to create nicely packed branch atlases with SpeedTree 8 that has multiple branches in different sizes in it. Im currently using v8.1.1 and cant really find a nice way of doing this.

    With "Export Image" I need to carefully arrange all my branches and it doesn't allow for a iterative process due to many different reasons breaking it.
    I could render all the branches as separate textures and then import them into a new scene and use "Export to Game" but it only has predefined packing which doesn't pack the textures the way I want. It also doesn't pack the textures very nice.

    The only solution I can see is to do this outside of SpeedTree.

    Does anyone have an idea?

    Cheers,
    Robin

  • #2
    Hello,

    Export to game is the thing you want to use to atlas the textures together.

    We don't yet have documentation on this, but you can write your own texture packing shaders. Look in the <install>/texture_packing directory. You can modify the ones included or write your own. Each of the packers here will show up in the export dialog. Each packer consists of an XML file that defines the channels exported. Then, the .fx file is a shader that lets you fill up those channels however you want. All of the different maps are available to use, plus a few extra things that are useful to know. You can see the definition of the STexturePackingInput struct in <install>/standard_shaders/TexturePacking_fs.fx.

    Hope this helps

    Comment


    • #3
      Hey Greg!

      Just tested it out and that works, thanks! I guess there is no way of having it pack them to optimize the texture space so that there is not so much unused space?

      I have another question as well, is there a way to setup predefined maps when using "Export Image"? Every time I restart the program and want to export textures I have to redo the packing setup.

      Cheers,
      Robin

      Comment


      • #4
        We are always improving the packing algorithm. Could you post a screenshot of a "bad" layout that was generated?

        There is not currently a way to save the texture setup in export image. If you use "export material", however, it will be set up with all the maps needed for a SpeedTree material. This may be closer to what you want to avoid some editing.

        Comment


        • #5
          Its just that it doesn't look at whats in the images or what the shape of the mesh cards have. It would be cool if it worked more like a UV layout tool looking at the UVs rather than the images. The way it is right now it creates a lot of dead space.

          Ah yes, "Export Material" might work. Still need to do some manual editing but presets or something would be really nice to have or that it remembers what you used last time you did it.

          Cheers,
          Robin

          Comment


          • #6
            The tighter you can cut out leaves and fronds, the tighter the packing will be in the map. If you have triangles with UV space outside the actual "visible" part, then we have to cover it with empty space.

            But yes, we still pack using rectangles. Perhaps we can improve this in the future.

            Comment


            • #7
              That would be a nice improvement

              Another thing I feel is missing is a way to add dilation to the textures that are rendered. Is there a way to do this?
              Last edited by RobinJ; 03-15-2018, 10:44 AM.

              Comment


              • #8
                We do this when rendering billboards, and the "streak" option is in the export image/material dialog. But currently, we don't touch the textures going into the atlas. We could maybe add that option as well.

                Comment

                Working...
                X