[Gear VR] Instanced Static Meshes are broken on Gear VR and streaming levels

Finally sorted out various hiccups with my project and 4.13 and deployed it to Gear VR (ES2).

Instanced Static Meshes are broken - either render pitch black or have some instances not being rendered:

Black tiles in the sand before stairs are 2 instances; black columns are instances - should be 8, but 2 instances on the facade were not rendered (missing).

Note that neither tiles nor columns should be black.

UPDATE: So I haven’t given up on this and finally found a way to reproduce the issue. Basically the issue manifests itself if I have ISM actors made with construction script in streaming levels. If I move ISM actor into Persistent level, it renders fine. Note that it only manifests itself on the device (Gear VR) as in PIE / Editor ISM actors appear fine, even with ES2 preview mode.

Here is a test case project (for 4.13.0):

Open it, deploy it to Android ECT2. When you are on the main level, you’ll see ISM made without script on the left side; static meshes ahead of you; ISM made with construction script on the right side (appears black for me).

If you select ISM that was made with script and move it to persistent level, re-build, deploy and test, you will see that actors rendering properly on Gear VR.

Although I think it’s a bug, please let me know if I am missing something in my setup, which maybe prevents ISM rendering properly.

On the side note there is something going on with that sky rendering on Gear VR. My main project has a simple sky sphere and I don’t see any artifacts. If you want me to file a separate bug report, I can.

Double checked you’ve got “use with instanced static mesh” ticked in the material properties? Without that ticked the material will not render on your instanced static mesh and they will just show up black.

Yep, I have that checkbox checked on my master material.

Fun fact - loaded project to check that option before heading to work and discovered that instances are missing in the Editor, just like in the video (on the device). Totally odd. Same stuff worked fine in 4.12.5

Strange - did you also try ticking the ‘use with static lighting’ checkbox? I had a problem with a material going to 4.13 without that but was unsure why. Anyway I can only say the materials on my static instanced meshes are displayed correctly in 4.13 for my project.

Yep, that one is checked too.

I had the same issue in 4.11.2 (except no instances were missing). Issue was gone in 4.12.5 and now it’s back with 4.13.0

Just to clarify is the mesh itself there just with a black material? Or is the mesh itself missing? Was not 100% clear to me from the vid.

This is how I created instanced: https://answers.unrealengine.com/questions/486485/issues-with-actors-tags-in-bp.html

Basically I have 8 static meshes (columns/pillars) I manually placed on the level. They have material instance where master material has all the goodies you mentioned above checked.

Once I am satisfied with how everything looks, I drop in my ISM BP actor, which creates 8 instances of the columns with the same transforms as original meshes. I place that BP into 0 0 0 of the level so that instances match location exactly with original meshes. Then I click “hide original” option on my ISM BP and original meshes get hidden.

After that I rebuild lighting and deploy. When running on the device, 6 out of 8 instances appear pitch black. 2 out of 8 instances are missing. That’s what is shown on the video.

I’ve actually just finished testing this on the GearVR that I have and in a non-GearVR project with ETC2 without any issue in 4.12 or 4.13. I tried with a static mesh, instanced static meshes, and hierarchical static meshes without immediate issue that I could see.

  • Red = static mesh
  • Orange = instanced static mesh
  • Green = Hierarchical Instanced Static Mesh

At this point, I think it would be good for you to create a new blank project and see if you can reproduce the issue there using just simple assets and your setup for instanced static meshes.

If you cannot reproduce the issue you’ll want to investigate within your project to see what is happening:

  • Try removing the material setup that you have an use a basic color material
  • Try seeing if the instanced mesh bp works in a new level within your project without issue.
  • Try seeing if the instances are only not appearing in GearVR vs a non-GearVR build.

Posted on the forum, but also posting here.

The ones that are black are instances created with my construction script (which worked fine in 4.12.5) which is outlined here: https://answers.unrealengine.com/que...ags-in-bp.html

The ones properly lit and with textures (and not missing any pieces) are made same way you made yours.

What am I doing wrong with construction script that causes instances disappear and not receive lighting ?

@Tim Hobson

I edited subject line to reflect the issue properly. Also added to the description and provided test case.

Whatever you have going on on your device doesn’t appear to be something that I can replicate here on any that I’ve tested.

The screenshot here was taken from the S6 (SM-G920F). Also tested on the Note4 that I have with and without GearVR enabled on both.

All results I get for ET2 is what you see in the screenshot. Everything is properly lit as expected.

Bizarre o.O I have this issue on ES2 preview and on the device. I don’t understand how this is possible with testing the same project and same version of UE 4 :frowning:

Well, I guess this report can be closed :frowning: I’ll just merge actors instead of using ISMs for the time being.

Thanks for looking into this.

Btw, forgot to ask - do I need to have World Composition on when having streaming levels ?

Also, was this tested with Gear VR or Cardboard ?

In the editor everything looked good on my end as well. So I’m not sure. :confused:

World Composition is if you’re using tiled landscapes. If you’re just loading and unloading levels with static meshes level streaming is fine and doesn’t need to have WC enabled.

Only tested with GearVR. GoogleVR was disabled in the project you attached.

Just wanted to pipe in since we are also heavily dependent on ISM in our GearVR game and are currently doing feasibility tests to switch to 4.13. So far we don’t experience any problems with ISM, I even downloaded your demo project, at first the left columns were all black like in your screens but after light rebuild everything worked like it should.

That is quite interesting development. I don’t know what to make of it, since we all use the same version of UE4, same project and the only difference is hardware we work on. I would be surprised if swarm/lightmass produce different results depending on hardware/OS version :confused:

I actually did some testing with merging actors and I found that merged meshes yield much higher performance than ISMs. So I ditched ISMs for merged meshes.