Announcement

Collapse
No announcement yet.

How to Generate Lightmap UVs from Mesh Frond's existing UV Set

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

  • OptimizedFrond
    replied
    Hello,

    As the asset is under an NDA, I'll have to see if I can send a sample file that repeats the problem.

    But basically, from what I noticed every time I use a Frond Generator, whether it's using the default mesh or a custom mesh, the lightmap UVs of them appear skewed.
    Leaf Mesh generator behaves as expected, but it doesn't allow me to deform the meshes the same way a "Tree -> Spline/Branch Generator (with forces as influences) -> Frond Generator" configuration does.

    Is it possible to deform Leaf Mesh Generator using forces -- specifically, using a mesh force? It doesn't seem to work. If so that would solve my issue as I'd use that instead of what I mentioned above.
    Last edited by OptimizedFrond; 07-13-2021, 03:41 PM.

    Leave a comment:


  • Greg Croft
    replied
    It's possible you're seeing a bug.

    If you could zip up your tree and send it to [email protected], we can take a look. Be sure to use "save as with assets" from the file menu into an empty directory, then zip the whole directory up. This ensures we get all the assets needed for the tree.

    Leave a comment:


  • OptimizedFrond
    replied
    Originally posted by Greg Croft View Post
    Hello,

    You do have some control over the layout of the parts in the lightmap. I might recommend scaling down the fronds and up the square branch parts.

    http://docs8.speedtree.com/modeler/d...?id=kclightmap

    I'm not really sure why they are so long and skinny compared to UE's. Are the fronds themselves long and skinny? It does try to maintain the aspect ratio (and the surface area, which is why the fronds are bigger than the branches probably). Scaling them down as I mentioned above will also move them closer to a 1x1 aspect ratio.

    I usually recommend to start with your leaves at a scale of 0, get all the branches working well, then scale the leaves up, which that docs page touches on in the tuning section.
    Hello Greg,

    Thanks for answering so quickly. The fronds themselves are triangular shaped akin to what is displayed in the Unreal results. I understand about the tuning and have done it in the past, but that doesn't seem to fix the weird skewed shape of the generated lightmap UVs.

    Leave a comment:


  • Greg Croft
    replied
    Hello,

    You do have some control over the layout of the parts in the lightmap. I might recommend scaling down the fronds and up the square branch parts.

    http://docs8.speedtree.com/modeler/d...?id=kclightmap

    I'm not really sure why they are so long and skinny compared to UE's. Are the fronds themselves long and skinny? It does try to maintain the aspect ratio (and the surface area, which is why the fronds are bigger than the branches probably). Scaling them down as I mentioned above will also move them closer to a 1x1 aspect ratio.

    I usually recommend to start with your leaves at a scale of 0, get all the branches working well, then scale the leaves up, which that docs page touches on in the tuning section.

    Leave a comment:


  • How to Generate Lightmap UVs from Mesh Frond's existing UV Set

    Hello Speedtree community,

    I am creating foliage to be used within Unreal Engine 4, which will need to be baked for static lighting using lightmaps.

    For some reason, it seems that the Speedtree generated lightmaps are subpar; it seems as if the frond lightmap UVs are created from a planar projection (which happens to be at the worst possible angle; as seen from one side of the fronds, despite these being oriented the correct way (towards leaf decal indicator in Speedtree's meshes window).

    I am wondering what would be the best way to tweak those frond lightmaps within Speedtree to get them to look right, and if I could just use the UV Set 0 (default UV set) of those fronds as a base (what Unreal is doing)?

    There is an image attached of what I am getting computing lightmaps within Speedtree (Left) and Unreal (Right).

    PS. I would do it directly in Unreal, but unfortunately lightmap UVs need to stack across each LODs, something Speedtree does by default and that Unreal can't.

    Thanks for the help and insight!
    Attached Files
Working...
X