Announcement

Collapse
No announcement yet.

Shell texture blend problems

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

  • Shell texture blend problems

    Hi!
    I am using SpeedTree8 Unity modeler, and making a hand-painted tree (along with normal maps)

    I was trying to add a moss texture that blends nicely over my tree - I used Shell decoration, and made my own custom alpha:
    Click image for larger version

Name:	SpeedTree_blend.png
Views:	79
Size:	920.0 KB
ID:	6434Click image for larger version

Name:	Alpha_blend.png
Views:	46
Size:	81.4 KB
ID:	6435


    However, when I imported the tree into Unity, the alpha goes wrong, gets crispy and doesn't blend the same way:

    Click image for larger version

Name:	Unity_blend.png
Views:	47
Size:	970.3 KB
ID:	6436

    I understand this is due to the .png compression when exporting to unity, since my billboard looks like this, and alpha isn't as detailed as it was in the original .tga texture I made

    Click image for larger version

Name:	Moss01_Color.png
Views:	43
Size:	1.70 MB
ID:	6437Click image for larger version

Name:	billboard_zoom.png
Views:	43
Size:	678.1 KB
ID:	6438


    So my question is, what could I do to achieve my desired blend of the shell moss texture with the trunk bark texture?



  • #2
    Inside the Modeler, we use alpha blending to draw semi-transparent layers. At runtime, however, we do not use blending since it is slower and we can't be guaranteed the order things will be drawn (which is necessary for blending). Instead, we use a fizzling pattern so the blends can be drawn with alpha testing and remain super fast. If you have alpha to coverage on, this is normally very similar. But without it and when you get right up on the blend region, you will be able to see the effect. While from a distance it usually looks fine, you should probably avoid using smoothly interpolating layers because of what you are seeing. Instead of smoothly fading off the moss, you can paint an opacity for the shell that chunks it away in realistic looking pieces.

    But I can see you have a somewhat stylistic tree. If you absolutely want the smooth gradient, you can still achieve it and keep a fast-rendering tree. You start with your moss texture on the trunk. Then create a small transition texture that fades from moss to branch. Add a branch extension to the trunk using that. Then add another branch extension using the bark texture, which can wrap. This is similar to how we create photogrammetry trees, blending from a scanned mesh piece to a procedural piece with wrapping textures. If you pack all those textures into the atlas, the whole thing can still be drawn in 1 draw call.

    Hope this helps

    Comment


    • #3
      Thank you for your reply Greg!

      Just one rookie question extra - what do you mean by " add another branch extension using the bark texture, which can wrap"?
      Did you mean adding multiple shells (a moss shell and a transition shell)?
      And if the mentioned extension is something else, can I add them without changing the shape of the current model of the tree? For instance, I've seen the stitch options when using photogrammetry, but I know I'd have to redo the tree with that option used

      Comment

      Working...
      X