Issues (again) with instanced static meshes on 4.13.0

Filed bug report: [Gear VR] Instanced Static Meshes are broken on Gear VR and streaming levels - Asset Creation - Epic Developer Community Forums

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.

Looks fine in PIE with ES2 preview. All lighting is baked, static.

[MENTION=11153]Chris Babcock[/MENTION] and [MENTION=4894]Tim Hobson[/MENTION]

Do you think it could be the way I create instances or is it indeed potential rendering bug?

I had the same issue in 4.11.2, but the issue was gone in 4.12.5. Now it’s back with vengeance (due to missing instances) .

I’m assigned to your Bug report on AH. I’ve actually just finished testing this on the GearVR that I have and in a non-GearVR project with ETC2 without any issue. I tried with a static mesh, instanced static meshes, and heirarchical static meshes without immediate issue that I could see.

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.

Thanks, will do.

Quick question - in the Details panel of the Instanced Static Mesh component in my BP actor, under Instances section, do I need to have fixed number of instances (for example, 8 elements for 8 meshes) or should I keep it at zero ?

How did you create those instances? Did you use merge tool by chance ?

Used the Add Instance button (+) in the details panel of the component. No Event/CS graph used.

[MENTION=4894]Tim Hobson[/MENTION]

The ones that are black are instances created with my construction script (which worked fine in 4.12.5) which is outlined here: Issues with actors' tags filtering in BP - Blueprint - Epic Developer Community Forums

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 ?

Thanks

Do you have a 4.12 recreated sample project that recreates the issue when converted to 4.13? If so, can you send me a copy. If it cannot be reproduced in a blank project you’ll still need to investigate your project further. I’m more concerned about a bug with the editor or regression of behavior in this instance. If it cannot be reproduced, then it’s likely something in your project with the way things are created, type of lighting you’re generating, or something with the CS and the way things are being spawned in perhaps.

Did you try the suggestions I made before and you have not indicated so or shown the results as a comparison?

  • Try removing the material setup that you have and 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.

Not yet (I with there was Gear VR template or if I could make one myself - otherwise it’s royal pita creating and setting up Gear VR project for every test need to make), but I am gonna have to make those. Will keep you posted.

This could be it, but I just don’t understand what I am doing wrong, since the CS does what it needs to do. It’s the baked results that are messed up. Before baking lighting it looks fine. Looks fine with real-time lighting too.

I don’t believe any of these apply, since ISM I created manually (like you did it in your test case) works just fine in my project. It uses the same materials and meshes as the problematic ISM.

The issue appears in PIE and on Gear VR. That last video I posted shows how it looks on Gear VR, but that’s how it looks in PIE and Editor too.

I’ll make test case using FPS template and my CS for 4.12 and 4.13.

I added additional setups to my test level with ISM and HISM BPs that have the meshes placed using the CS and with 8 meshes each with multiple placements.

L-R: Static mesh, ISM with transform offset, HISM with transform offset, ISM with CS transform offset, HISM with CS transform offset

If you’ve already got a question regarding using Actor tags and the CS then you should follow up there. I’m not going to repeat work here if it’s already being looked into with that ticket. I’m only interested in why the meshs are rendering black and if that’s caused by the way you’re setting up the CS then follow up on that question if it’s a regression in behavior. If you’re able to reproduce the issue in a simple project I’m happy to look, but again, I’m only interested in seeing if there is a regression in behavior here and not troubleshooting project specific issues that isn’t potentianlly a bug. This is why we are insistent on reproducing in a new project.

Once you’re able to reproduce the issue in a blank project, I’ll have a look for inconsistencies and issues with 4.12.5 to 4.13 with the lighting for the instanced meshes.

[MENTION=4894]Tim Hobson[/MENTION]

Can you please show you CS script? (I got my Actor tag issue resolved and my CS creates instances as expected and they aren’t black until I bake lighting)

Yes, I will make these projects

Very basic setup

[MENTION=4894]Tim Hobson[/MENTION]

Is static mesh (also instanced mesh inside ISM actor as well as ISM actor itself) in your test case set to Static or something else?

Everything in the image above is set to static, but when i was testing it I had tried them all as movable as well.

Aye, thanks.

[MENTION=4894]Tim Hobson[/MENTION]

I think I finally figured it out (haven’t tried it on Gear VR yet, but ES2 and PIE renders properly).

I have Persistent level and 2 streaming levels, Init and Full. 2 of 8 original pillars are on the Full level, and 6 are on Persistent level. ISM actor is on persistent level too. Same story with tiles.

I moved 6 original meshes to Full level from Persistent level and moved ISM actor to Full level too. Re-built lighting, and everything looked fine. Quit UE4, restarted, reloaded project, switched back to ES2 - still good. Will deploy to Gear VR tomorrow to make sure it indeed works.

Alright, columns are fine in SM5/ES2 preview, but still black on the device. Floor tiles now render properly everywhere. There is no difference between floor tiles ISM and columns ISM. As a matter of fact, I copied column’s ISM, changed its name, changed tag and changed instance model/material. All settings are identical, all actors are in the Full sub-level. Bizarre.

[MENTION=4894]Tim Hobson[/MENTION]

I don’t know what’s with that particular Infinity Blade asset, but I can not make it render on the device at all. ISM actor always comes out black. I made sure static mesh settings are identical with floor tiles (which now render fine), ISM BP is the same, there is no reason for it not to render on the device, especially that in the Editor and PIE with ES2 preview both render fine, with lightmaps.

Alright, I think I am onto something here:

This is the layout of my Levels:

ue4_levels_hierarchy1.png
Full: http://s15.postimg.org/n64y2i4ez/ue4_levels_hierarchy1.png

A black room with initial player spawn is in the InitMap streaming level which is always loaded. Everything else (including ISMs) is in the FullMap streaming level that loads from BP. All light sources, lightmass importance volume, etc. (lighting related stuff) and skysphere are in the Persistent level.

So when I have my ISM with contruction script (and it seems that ISM with simple construction scripts are not affected) in the FullMap level, it renders black on Gear VR (renders fine in the Editor with either SM5 or ES2 preview).

If I move ISM to Persistent level - renders fine (as you can see on the video).

Sounds like a bug, unless there is a trick to make it render properly when located on streaming sub-levels.

[MENTION=4894]Tim Hobson[/MENTION]

Any ideas what’s going on ? (I already used blank project and migrated assets from the project into a blank one - same issue)

Thanks

[MENTION=4894]Tim Hobson[/MENTION]

Finally got the test case for 4.13.0 and updated bug report: [Gear VR] Instanced Static Meshes are broken on Gear VR and streaming levels - Asset Creation - Unreal Engine Forums

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.

Btw, now I see why it “worked” in 4.12.5 - I had ISMs in Persistent level when I tested it.