Download

Hierarhical Instanced Static Mesh LOD display problem

Hi
I have a problem with LOD display using BP that creates HISM.
It shows LOD0 ok but when it goes to LOD1 then it displays LOD1 and LOD0 (w/o shading) in the same time.

LOD1 is just a billboard and I have set its material to RED COLOR to make it more noticeable,
But when engine switches LODs from 0 to 1 still the LOD0 is visible w/o shadows (light green color).

How to fix it ?

Below links to screen captures:

https://www.dropbox.com/s/2x3ngmlnz2…ionBP.JPG?dl=0

EDIT:
I use full RTX feature for this scene + DLSS
Funny thing is that in LOD preview in Viewport for the LOD1 it shows only LOD1 as it should be.
But in normal view it shows this strange mix of LODs for LOD1.

Your code looks OK.

How does the static mesh look?
maybe the size options for the LODs are incorrect on it?

Only when it have to be instanced by HISM Component then this LOD1 problem appears.
LOD1 works perfectly fine when object is in the scene as a static mesh or generated bunch of static meshes (with this script as above using Add Static Mesh Component logic instead Add HISM Component logic).
But then I cannot have performance benefits caused by instances because created objects are just copies.
It does not matter what ScreenSize is set for the LOD1.

LOD1 in SM works perfectly fine but in HISM shows up with LOD0 visible.
As I said before in the LOD preview Mode in editor I see that there is no LOD1 problem when using HISM.
Maybe this problems is somehow related with Raytracing ?

I use UE4.26.1

AFAIK,
ISMC (non hierarchical) does this by design, no LODs supported.
Whereas HISMC is supposed to allow for LODs

this vid shows you the setup for the LODs.

Of note, the LODS behave slightly different size wise compared to the same object placed in scene as a mesh.
I just tested my light pole instance in .26, the LODs on it work Ok. I’m not on raytrace though.

Thanks!
I have to say that I know this tutorial. It was a first one that I have been learm HISM from :slight_smile:
Problem is why the LOD0 still is visible when HISM switched the mesh already to the LOD1 and causes that both LODs are visible on the same time ?
Maybe some bug or lack of my knowledge ?

Only thing I could think of is if several instances are added one over the other. Either by mistake during the script or by having several actors with the hism component.

run a test in an empty scene with just lighting. That should start to pint you in the right direction…