Announcement

Collapse
No announcement yet.

Using Dataprep to set Lightmap resolution from mesh bounds?

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

    Using Dataprep to set Lightmap resolution from mesh bounds?

    We import thousands of parts, and we recently noted that the default settings gave nuts and bolts more lightmap space then large panel parts, for example.

    So far, we've only briefly tested the "Compute Lightmap Resolution" with the "ideal ratio" node, which did not make things better.

    Ideally, we'd want to calculate the surface area of an imported part and assign a specific lightmap resolution from that, but I'm guessing that's impossible.

    Looking briefly at what we could find, there was a "filter by bounding volume" node, but we didn't find a lightmap resolution node and we're unsure how to actually use the filter node...

    Our workaround right now is to use the Statistics window and set lightmap resolutions manually, which is incredibly tedious!

    #2
    Hi,


    I tested a synthetic setup where i have tiny objects up to huge objects (a bunch of boxes in max):

    https://www.screencast.com/t/0SistHvf

    In dataprep I am using this simple setup:

    https://www.screencast.com/t/p2q1B6wyI

    This has the effect of setting lightmap resolution on the actor, identically to the Build -> Lighting Info -> Lightmaps Resolution Adjustment. Under the hood this effectively calculates the surface area of the mesh and estimate the closest possible lightmap resolution for that object, within allowed values.

    https://www.screencast.com/t/8piIw6Da


    Here are my findings:

    When objects are extremely small, the resulting light map resolution can hit a minimum possible value. In my case, my extremely tiny teapot ended up with a lightmap resolution of 4, which is still considered dense given the object size. However, although it displays as "red/dense", that is still a resolution of 4, so its not big of a deal.

    https://www.screencast.com/t/2EpCIBYWu9sq.

    To exclude them from lightmap computation, you could maybe set them to movable by filtering by bounding box:

    https://www.screencast.com/t/35USWNYp


    Pierre-Felix Breton

    Sr Technical Product Manager AEC, Unreal Engine Enterprise
    Epic Games - LinkedIn

    Comment


      #3
      Thank you for the testing, but I really want to actually input an exact lightmap texture size for each object, like I can with the Statistics window.

      For example, we have very large, smooth, plastic hulls with no additional textures on them. Those we want to have a 2k-4k lightmap texture on.

      (The non-dataprep Datasmith import dialogue allows you to limit the generated lightmap texture size, but ideally we'd like more control through Dataprep.)
      Last edited by roberteker; 01-07-2020, 06:53 AM.

      Comment


        #4
        Thanks for the explanation.. That makes sense. We will see what we can do.
        Pierre-Felix Breton

        Sr Technical Product Manager AEC, Unreal Engine Enterprise
        Epic Games - LinkedIn

        Comment

        Working...
        X