cancel
Showing results for 
Search instead for 
Did you mean: 

[Gear VR] Instanced Static Mesh component question

motorsep
Rising Star
So I am still battling UE 4.13 and ISM.

Regardless what Epic staff states, I don't believe ISM is supported in Gear VR.

I used ISM actor with 8 instances of one of the Infinity Blade columns and I also simply duplicated those columns and merged meshes using Merge Actor tool.

I put those 2 actors side by side (in a way that when one actor is fully in the view, close up, the other one is outside the FOV so it could be culled) and tested performance in-game on the device. When ISM actor is in the view, fps drops to 20 (that's besides the fact that ISM actor renders black on the device). When merged actor is in the view - no fps drop at all (and it gets rendered perfectly fine).

@vrdaveb any idea if ISM is supported at all when doing VR rendering with ES2 path ? While ISM is more convenient than merged actors, I don't want to waste more time trying getting it to work on Gear VR.

Thanks
11 REPLIES 11

motorsep
Rising Star
Bump?! 

rpalandri
Expert Protege
Looking at it now.
When you say that the ISM actor renders black on the device, does that mean nothing changes, or that you see the outline of the meshes, but they're black? What material do you have on those infinityblade instances?

motorsep
Rising Star

rpalandri said:

Looking at it now.
When you say that the ISM actor renders black on the device, does that mean nothing changes, or that you see the outline of the meshes, but they're black? What material do you have on those infinityblade instances?


Here is the video showing the issue:

https://www.youtube.com/watch?v=zmkQJUwZlh8

On the left side ISM actor with 8 instanced added through its Details panel (and then I manually, in the actor's viewport, moved them around) .

On the right, the black ones, ISM actor with construction script (I get all actors of Static Mesh class, filter them by actor's tags, use static meshes' transforms and create instances with those transforms).

Both ISM actors show up fine in SM5/ES2 preview in the editor. However, in Gear VR, ISM actor with construction script is pitch black and the one with no construction script looks properly.

Both have the same material - material instanced derived from modified original Infinity Blade material.

rpalandri
Expert Protege
So ISM actually works (from what we see on the left side), but the construction script seems to have an issue porting the material, if I follow this correctly? 

motorsep
Rising Star
And this is my ISM construction script:


Full: https://s17.postimg.org/5frgmbj4t/ue4_ISM_BP.png

Btw, everything is static in the scene, lights, actors, ISMs.

The actors that are replaced with ISM have actor tags ("big_rock" for example or, as in this case, "SM_Plains_Column_Mid").

motorsep
Rising Star

rpalandri said:

So ISM actually works (from what we see on the left side), but the construction script seems to have an issue porting the material, if I follow this correctly? 


I don't really see how, since materials and meshes are specified in the details panel.

My script just grabs transforms and number of instances, and simply creates them using that data.

rpalandri
Expert Protege
I'll look into multiple ISMs, including some generated on-the-fly by blueprint code 🙂

When you're rendering this scene on your GearVR, does the left ISM (the 8 columns on the left of the camera in your video) render correctly? If yes, would that mean ISM is supported on GearVR, but that we have issues with blueprint ISM generation?

motorsep
Rising Star

rpalandri said:

I'll look into multiple ISMs, including some generated on-the-fly by blueprint code 🙂

When you're rendering this scene on your GearVR, does the left ISM (the 8 columns on the left of the camera in your video) render correctly? If yes, would that mean ISM is supported on GearVR, but that we have issues with blueprint ISM generation?


Alright, I am onto something here. Just recorded this video:

https://www.youtube.com/watch?v=z4yV6adsrjs

I have Persistent level and 2 streaming levels inside of it. Originally all geometry (including ISM actors), except lights and sky, was in the streaming levels. That's when ISMs rendered black.

Now in this last test, I moved ISMs into Persistent level and they are all render fine (8 columns on the right is ISM with my script I posted above; diagonally placed cubes is ISM with simpler construction script, just basic ForLoop; and ISM with 5 cubes located linearly is ISM with no script).

I am gonna move a few ISMs back into a streaming level and see if they render black again. If they do, then I found a bug in UE4.

There is another issue with ISMs as you can see from the last video - performance drop. Somewhere in the middle of the video I look at ISM with 8 columns. Fps counter is like 20-something, yellow. At the end of the video, I look at another 8 columns, but that's not ISM - it's a merged actor (using Merge Tool). So the question is why use ISM if they bog down performance?! Is it a bug or is it lack of support for proper batching/instancing on mobile VR ? (on Epic's side I mean)


rpalandri
Expert Protege
Ok 🙂

On my side I've done some testing with ISMs on GearVR, and they seem to work as expected (even with custom materials, which seems to have been a previous source of issues on the forums ). Maybe blueprint-generated ISMs have issues with streaming levels though (race condition in the material generation maybe? I'll look it up), that I haven't investigated. 

The performance issue is concerning, I'll try to repro.