Announcement

Collapse
No announcement yet.

[UE4][Games-Indie] Photogrammetry Stitch lighting issues

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

  • [UE4][Games-Indie] Photogrammetry Stitch lighting issues

    I've been having some trouble bringing speedtree models I've been working on over into Ue4.

    I'm using Speedtree Games-Indie, and specifically the photogrammetry+texture blending tools to merge a trunk with procedural branches. I finally got it working well in ST but when exported to UE4 and lighting baked, I get some weird shadowed seams where the blend should be meeting the branch/trunk.

    I'm trying to figure out if it's something about how the blend or maybe baked AO is handled in the vertex colours, but coming up short, especially as the seam materials only seem to be for the rectangular bands, not the whole zone.

  • #2
    Hello are you using a texture blended extension or the vertex extended extension template for the stitch. Are you getting any errors (!) in the generators where it's not liking the stitch location? The texture band stitch will create a new stitch material for the band area...could you include an image of the texture it's creating?

    Comment


    • #3
      Hi Sarah

      I'm using a texture blended extension. I don't believe I have any errors in the generators (It took me quite a while to get a good position for them with the complexity of my basemesh), those would just show up in the node network yes?
      Click image for larger version

Name:	2021_11_23_Nodes.jpg
Views:	39
Size:	17.6 KB
ID:	10514

      Yep, each blend has textures it's generating.

      Click image for larger version

Name:	Redgum_Stitch_02.png
Views:	38
Size:	1.09 MB
ID:	10515
      Click image for larger version

Name:	Redgum_Stitch_02_AO.png
Views:	38
Size:	308.9 KB
ID:	10516
      Click image for larger version

Name:	Redgum_Stitch_02_Normal.png
Views:	38
Size:	1.13 MB
ID:	10517

      (They have some messy normals in the middle there from interacting with my photogram base, but not at these edges where the issues are happening)

      and I have them atlas-ed together for the export:

      Click image for larger version

Name:	2021_11_23_Atlas.jpg
Views:	38
Size:	32.6 KB
ID:	10518

      Comment


      • #4


        I have had no success at all importing blends into UE. I began presuming that my UE shader/ material set-up needs some updating and it was not a Speedtree problem.


        Click image for larger version

Name:	K_Trunk Blend.jpg
Views:	32
Size:	783.0 KB
ID:	10528

        Comment


        • #5
          OK, I've done some more digging:

          Seems like my issue is being caused in part at least by the lightmap generation phase in Speedtree

          I exported to Maya and the faces that are part of the seam blend but are not the regular rectangular band faces (are stolen from the photogram mesh) have been given absolutely TINY spaces in the lightmap. Even in the zoomed in section they're the still barely visible, orange highlighted flecks in the middle

          Getting the texel density for relative parts of the export, you're looking at 6x smaller than the density of the rest of the stitch band and 13x smaller than the rest of the photogrammetry basemesh. This is a real hero tree piece, so I'm OK with giving it a larger baked lightmap overall, but even at 4096+ these UVs are smaller than individual pixels. There's no way they can be used properly.

          So maybe something is breaking in the scaling lightmap gen/export phase? An incorrect scaling priority is being given to these?

          I also tested with Unreal 4 Raytraced lighting, and had the same issues though (perhaps they also use lightmap UVs for their calcs, but in a more dynamic way)

          Any thoughts?

          Click image for larger version  Name:	2021_11_25_Stitch_Analysis.jpg Views:	1 Size:	630.8 KB ID:	10531
          Last edited by B_John_Bailey; 11-24-2021, 09:22 PM.

          Comment


          • #6
            Originally posted by ohat View Post

            I have had no success at all importing blends into UE. I began presuming that my UE shader/ material set-up needs some updating and it was not a Speedtree problem.


            Click image for larger version

Name:	K_Trunk Blend.jpg
Views:	32
Size:	783.0 KB
ID:	10528
            Yeah, blends as a whole don't seem to behave really very well. The noise-interpolated masking seems like a good idea but in practice doesn't really give the kind of results you are expecting considering how the tree looked in speedtree. I know it's a shortcut to allow more efficient masked/cutoff rather than heavier transparent shaders, but I think the approach needs to be refined a bit to be a closer approximation of what the speedtree viewport gives.

            Comment


            • #7
              Aha, another hint that it's lightmap-based. When I enable the full PathTracing renderer in Ue4 (Ie all shadows are calculated per pixel, disregarding any lightmaps) the problem disappears:
              Click image for larger version

Name:	2021_11_25_Full_PathTracing.jpg
Views:	27
Size:	345.7 KB
ID:	10534

              Comment


              • #8
                Do we think that the lightmap issue with seam bands edges is unique to my model or a broader problem then?

                Comment


                • #9
                  Well it looks like Speedtree have to look at that seam unwrapping scale issue...
                  In general I would love more control when it comes to unwrapping in Speedtree.

                  Comment


                  • #10
                    Originally posted by SarahScruggs View Post
                    Hello are you using a texture blended extension or the vertex extended extension template for the stitch. Are you getting any errors (!) in the generators where it's not liking the stitch location? The texture band stitch will create a new stitch material for the band area...could you include an image of the texture it's creating?
                    Hi Sarah,

                    Does this seem to make sense? I think Speedtree's UV creation here is breaking for me

                    Comment

                    Working...
                    X