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!


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

In dataprep I am using this simple setup:

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.

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.


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

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.)

Thanks for the explanation… That makes sense. We will see what we can do.

@pf_breton It’s been two years now. Has there been any improvements in this area?

We’re not game developers (I work in industrial design) and when you import untextured CAD data and want to have very accurate shadows for VR, there’s still confusingly many settings, details panels, menus and steps you have to go through to get very high resolution lightmaps.