Building Lighting for Instanced Static Meshes

UE: 4.5

OS: Win 8.1 Pro

I’m working recently on a BP for quick icicle placement. For better performance I used Instanced Static Mesh Component. Everything works fine and as intended, but I have a problem with building a static light for the results. In the image below you can see a few BPs on the ceiling. Each one has one component and 40 icicles in it as instances. Unfortunately it looks like every component has the same lighting built into it, which creates “islands” of different colours.

I was following tips from the bottom of this documentation page:

It is stated there that “Each individual mesh instance has its own shadow and/or light map generated by Lightmass, and these are tiled together for each precomputed batch”. That makes me believe I’m doing something wrong or it’s a bug.

There is only one icicle mesh used in the image. I deleted LoD for now, to make sure it is not the cause. Material is a simple Subsurface and has “Used with Static Lighting” and “Used with Instanced Static Mesh” turned on. Model has “Light Map Resolution” set to 64 (changing this value even to 1024 had no effect). The huge icicle in the middle of the image is a static mesh put there without BP. Just for reference.

Ok, I definitely should check out the forum more often:

Unreal Engine 4.6 Preview! - Announcements - Unreal Engine Forums!

“Static Lighting on Instanced Static Meshes (including Foliage)” is first on the list. xD Thank you, waiting for new version then. :slight_smile:

I tested this feature in 4.6.1 and it looks like the problem is still present for me. It works perfectly fine with the foliage tool, but with my BP there’s still the same effect as above. I attach new screenshot - tables in the background were placed with the foliage tool (6 clusters of objects) and in the foreground with my BP (each BP creates one Instanced SM Component, but it seems like each is static shadowed with the same colour for every instance). They seem like they don’t cast shadow at all, so that’s probably the case, but I searched for a way to make them so and I can’t find a few nodes related to lightning at all.

I searched for something like “Set Mobility” or “Set Cast Static Shadow” for my Instanced SM Component, but I can’t find such nodes. “Set Cast Shadow” exists, but doesn’t seem to work in my case. Is there anything I can do or this feature isn’t implemented yet?

Bumping this, because I really need this feature to work properly. Any info on that?

For the sake of everyone with the same problem - I finally learned what I was doing wrong. As I stated above I was searching for a node to change mobility of a component created by Add Component node. What I didn’t know is that a component node has it’s every option available in Details tab. Just click on it and there’s everything there. Now it sounds obvious, but I’m using these nodes for a long time already and noticed it just recently.

By default my Instanced SM Components were set to Movable. The result is visible here (the tables in the bottom part of the image, because the ones in the top were placed with the Foliage Tool):

After changing mobility to Static both groups are identical. Original problem is solved - static lighting can be build for instanced meshes placed with BP in UE4.6. My bad, sorry. :slight_smile: Just too bad no one put me right earlier. xD

2 Likes

Thanks Nox. +1 :slight_smile:

Yep thanks Nox

I’m glad this topic helped someone after all. :slight_smile:

thanks for share your answer and solution