Rendering issues

All of my previous tests included my own assets and I didn’t have any issues.

Now I am using Infinity Blade assets and they render all black on the device:
1d4bf1b3d804068e5d150a5bdfee0816639cd5c5.jpeg
Full: https://s32.postimg.org/h4drr984j/com_Company_Gear_VR_test3_411v5_20160626_002815.jpg

Also please notice the sand - it’s all pixelated as if either filtering is messed up, or material setup is not compatible with mobile :confused:

Here is texture:
ue4_sand_texture.png
Full: https://s31.postimg.org/ahaxszscp/ue4_sand_texture.png

Material (diffuse):
ue4_sand_diffuse_mat.png
Full: https://s31.postimg.org/5ekf6bjm3/ue4_sand_diffuse_mat.png

and how it looks in the Editor with ES2 preview.
ue4_sand_editor.png
Full: https://s32.postimg.org/iq5uxoz6b/ue4_sand_editor.png

Can someone please tell me why Infinity Blade assets render black ?? (I use basically the same original material with added fog effect - same as on the sand)

Why sand is so pixelated to a point of extreme pixelation?

Thanks

P.S. Those Infinity Blade rocks are HISMs

I’m using the asset now and I have no issues like that ( using the S7 Edge )

Are you able to run one of the maps at 60fps constant? I’m experimenting with the Elven Ruins and creating my own little room using the asset from Infinity Blade, but I notice that, even modifying all the materials and leave there just the diffuse ( no normals or roughness ) I’m still unable to achieve 60fps ( running around 30fps ) and I’m not sure what is the issue ( shader complexity is green everywhere and I’m way under 100k polys )…

Are you also having some fps issues with this asset?

@motorsep: I guess we need more details about the rock materials. Are they lit or unlit? Is your project with mobile HDR on or off?
Are you tiling the sand material or is it just stretched all the way over a huge mesh? (that would make it look pixelated)

@Enter reality: What about your draw calls? How many are you at? You can get the number of draw calls from the bottom of the table of: stat SceneRendering
gearvr devices have a pretty hard limit and once you hit it performance goes way down. Note 4 and S6 were around 100 however I was able to go higher with the S7 and still hit 60FPS - but I’m unsure the S7 limit but would not imagine it being much more than 200.

Thanks for the reply, and sorry @motorsep for hacking his thread :smiley:

Anyway there are roughly 30 draw calls so I’m 100% sure that draw calls are not the issue…unfortunately I don’t have custom made ( low poly ) content to build an entire scene and the Infinity Blade asset for me is a kind of learning tool for level design and mobile practice, but I have to say that the asset ( even using 6-7 different meshes ) is way too heavy for the phonem to manage, and that is quite strange…

Rock material is the same as what Infinity Blade comes with. I simply removed roughness from it to make it even more simple. It’s the same material as sand, lit and all that. HDR is off.

As you can see from the material layout I provided, material is tiling across the terrain mesh :slight_smile: It’s tiling in SM5 preview, ES2 preview, but not on the device. Perhaps I should use custom UVs for tiling instead of tiling texture sample, but I don’t really know how (since currently diffuse is tiling, but normal map has to fit UV space, e.g.)

I also just noticed this warning: Warning SM_Plains_LargeRock02_HISM_108 The total lightmap size for this InstancedStaticMeshComponent is large, consider reducing the component’s lightmap resolution or number of mesh instances in this component

Obviously instances were designed to contain **** load of meshes, so I don’t see why wouldn’t Epic design HISMs to work with static lighting :confused: Hopefully someone from Epic will look into this next week.

I could never run UE4 on my S6 with 60 fps. Even if it’s totally empty scene, it runs at 58 fps. Epic basically saying “no idea, it runs at 60 fps on our test hardware”. So, it could be something is wrong with my phone. I am only concerned about it due to certification process for Oculus. To me it feels butter smooth when testing my 58 fps projects.

As you can see from my screenshot, I still have 58 fps in that scene.

Alright, I resolved sand tiling issue by using customized UV. The problem with that is that my material has 2 normal maps - one global, baked off entire terrain; and one local, for sand, which should be tiling. It seems that when using customized UVs I can’t have that. Please correct me is I am wrong.

I think I messed with static mesh from Infinity Blade. IB assets have both Source and Destination Lightmap index set to 1, while any static mesh I make and bring to UE4 has Source set to 0 and Dest. set to 1 (those are default settings). My meshes have 2 UV maps, just like IB assets do - UV0 is for texture, UV1 is for lightmaps.

However, I think it might be a bug with rendering HISMs on mobile (or in VR). I added non-instanced static mesh into the scene, set source and dest. lightmap index back to 1 (default IB assets settings) and re-baked lighting. While non-instanced static mesh now looks as it suppose to look, HISMs still look pitch black :confused:


Full: https://s32.postimg.org/5igmmubg3/com_Company_Gear_VR_test3_411v5_20160626_124831.jpg

P.S. Tried everything - nothing works :confused: I am going to try fully dynamic lighting, just to confirm it’s either just baked lighting issue or general HISM issue with VR

Care to detail to landscape material fix?

Sure, this is it Customized UVs in Unreal Engine Materials | Unreal Engine 5.3 Documentation

Oh I see… well thank ya I guess… now how does it all work… or is that all ya want to share?

That’s all there is. There is nothing more to it. Add 1 customized UV, and do exactly how it’s in the docs (for customized UV0). Increasing that constant you multiplying texture coordinates by will scale tiling uniformly.

Allrighty… thank ya.

@WilliamHooper: Sure thing, np.

@Epic: filed bug report here: [Gear VR] HISMs don't receive any lighting (neither baked nor dynamic) - Rendering - Unreal Engine Forums

I saw somewhere that HISMs don’t work with lightmaps :confused: You could just put it into the docs or something if that’s the case o.O Either way, neither dynamic nor static lighting work on my side :confused:

Then for sure it’s the material for the meshes you’re using. Change it to unlit and you’ll get your 60FPS (or 58 close enough Oculus won’t complain about that :wink: ). I would not recommend using default lit materials unless you really have to and only then use it sparingly (for example in We Come In Peace… only the gun has a directional light on it - everything else is unlit). You can use tricks such as the unlit example in: Moving light sources on mobile? - Mobile - Epic Developer Community Forums and fresnels and “Additive” unlit materials for fake ‘light’ effects.

Thanks for the tips, I’m going to test everything later today and see if I’m able to have a decent framerate :slight_smile:

I also notice that on Escape Velocity they used a cool trick, which is the box around the player for post process

Since there are almost zero tutorials about developing for GearVR, and since you developed “We Come In Peace” ( with BP, no C++ really? awesome! ), I would gladly pay 30$/50$ ( or setup a paypal account for donation ) for a well made tutorial with project setup, good practice, explanation of the critical parts for mobile development, tips and tricks and so on :wink:

It appears that Oculus already asked Epic to fix HISM for VR (including Gear VR) :confused:

Can this be fixed in 4.12.4 or at least in 4.13 ?

It is me or GearVR support/feature-development with UE4 is going super-slow?

There’s more discussion here then on the Oculus forum which is astonishing…I perfectly understand that the GearVR is a “minor” VR device, but I want to do more then watch 360° videos, and I would appreciate if the Epic “VR guys” could make some scenes available in order to improve and learn some tricks.

It’s not you

It’s a catch-22 - not whole a lot of people use UE4 for Gear VR, thus Epic/Oculus don’t put more effort into support for Gear VR in UE4, but then since there is not whole a lot of support for Gear VR in UE4 than in Unity, less people use UE4.

The worst part is that core features are not working or half-working. I’d understand if UE4 supported all the same kind of stuff Unity does, and even then less people would use it, then Epic/Oculus would be right to say that since UE4 isn’t that popular they can’t support it as actively as they could.

Hopefully by 4.13 HISMCs and foliage will be working. Then UE4 would be on par with Unity (which has batching of static and dynamic meshes plus GPU skeletal and GPU particles on mobile since like 4.6 or even earlier versions) as far as core features go.