Achievement not logged from development build
I´m adding achievements for my game and on a build on OculusGo it doesn´t seem to log achievement yet to dev panel. Is there some condition to be met to try it out on a build. I already have platformSDK running in the back fetching player name. here´s the code that unlocks: using System.Collections; using System.Collections.Generic; using UnityEngine; using Oculus.Platform; using Oculus.Platform.Models; public class Unlocker : MonoBehaviour { public string id; // Use this for initialization void Start () { Oculus.Platform.Achievements.Unlock(id); } } Any idea?1.7KViews1like5CommentsVulkan debug layer support
I can't get debug layers to work on Quest. vkEnumerateDeviceLayerProperties and vkEnumerateInstanceLayerProperties both return 0 results. Are validation layers not supported or am I doing something wrong (e.g loading the wrong .so)? See code below I notice the Vulkan Cubeworld sample refers to VK_LAYER_LUNARG_api_dump but it seems it's compiled out, which is why it presumably doesn't fail in vkCreateInstance() mVulkanLoader = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL); assert(mVulkanLoader != NULL); vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr)dlsym(mVulkanLoader, "vkGetInstanceProcAddr"); vkEnumerateInstanceLayerProperties = (PFN_vkEnumerateInstanceLayerProperties)dlsym(mVulkanLoader, "vkEnumerateInstanceLayerProperties"); vkEnumerateInstanceExtensionProperties = (PFN_vkEnumerateInstanceExtensionProperties)dlsym(mVulkanLoader, "vkEnumerateInstanceExtensionProperties"); vkCreateInstance = (PFN_vkCreateInstance)dlsym(mVulkanLoader, "vkCreateInstance"); uint32_t layerCount; vkEnumerateInstanceLayerProperties(&layerCount, nullptr); std::vector<VkLayerProperties> availableLayers(layerCount); vkEnumerateInstanceLayerProperties(&layerCount, availableLayers.data()); VkLayerProperties* layerProps = availableLayers.data();1.4KViews1like1CommentOculus browser changed to desktop mode by default
Hi, in latest browser updates default mode was changed to desktop. As said: "...Oculus Browser now loads desktop sites by default. This mode is better for the large browser windows in VR and desktop sites let you get more done. You can change the current site you’re on back to mobile mode by clicking a button in the address bar....." My question is, how we can switch to mobile mode programmatically using Javascript from the loaded page. Is there any API method for that?3.3KViews0likes0CommentsHow did I port PC|Rift version of my game to mobile VR using UE4. tips and opt tricks to hit 60fps.
Hello guys, below I wrote my journey on how did I port my PC Rift/Vive version of "StardustVR" to mobile, it wasn't an easy job but hopefully below tips will be useful for your guys too. UE4 never meant for mobile, its really heavy since most of the feature enabled by default so you will have to disable them, I run an empty level on my Galaxy S7 and I was getting 30 fps, this made me think on what kind of sorcery devs used to make their UE4 game run 60 fps on Gearvr/Go/Quest. I didn't know it will be this long ::smile: , maybe that's why I'm getting stuck on my games, I thought it will be 5 lines of tips. so grab a coffee before start reading. it might be helpful for you guys so you don't fall into the same mistake I did. since most of the fixes i found after trial and error for hours or even days. Porting your game into mobile is a sword with 2 edges. It's really cool to see your game runs on your pocket mobile that needed Core i7 CPU with GTX 1080Ti before. but at the same time if you are so attached to your game it will break your heart (literally) which is the main point that might stop you if you ask me, since you spent months on one of the feature/particle effect/ material but when you port it into mobile you will have to cut it down, if you do it you will able to port your game with 60 fps, if you don't then forget about finding another way to hit 60 fps without a sacrifice. Synopsis to reach 60 fps: -Enable forward render (don't ask). -Reduce drawcall to below 100 and poly below 100K, -Reduce all of your texture size to 128 ~ 512 except skysphere. -Make your game unlit. I don't know if its possible to use phyiscal material with UE4 and hit 60 fps. -Make all of your particles effect's material unlit, lower the texture resolution of it, lower its components and complexity and lower its lifetime. -Change audio SFX from the original sample rate 44100hz to 22050hz for all of your sounds. -Disable HDR/postprocess. -Lower number of components on your character. -Simple material. -Use ASTC which works on all GearVR and its fastest with low size. - No AA -Lower everything :) ----- Here is the detail: 1-You have to sacrifice and let your ego to hit that 60 fps. its the hardest part, believe me, I had to disable a lot of things and mainly I have to disable bloom effect (HDR) in my game and my game is only about the environment and the beauty of the graphic, it doesn't have much of gameplay, so disabling my blood (HDR) increased my fps from 40 to 60 but the game looked really dull and no more light shining and glowing effect on my creatures or my levels. - To hit 60 fps on Gearvr/Go you will have to keep under the limitation of 100 drawcall and 100K poly. and believe me its really hard to keep 100 drawcall. *in case you don't know, drawcall in simple term is the number of separate static mesh x the number of materials on that static mesh. My gunfire alone had more than 10 drawcall so if I fire fast on the empty scene and I have 10 bullets on my scene that reach 100 drawcall LOL 2-Get a phone with snapdragon and not Mali GPU, for some reason, UE4 profile or oculus profile doesn't support Mali GPU and probably Unity too, even official Mali GPU profile didn't help me to show a simple utilization percentage. so I was looking for my fps problem like a blind man, Oculus Go has a snapdragon but I think its harder to profile as you will have to put it on your head every time you want to check unlike galaxy phone which let you run your game on flat screen without Oculus GearVR once you enable GearVR dev mode on your phone. 3-Oculus Go almost have the same spec as Galaxy S7. so if your able to run your game on Go then the only GearVR you will lose is S6 and note 4 maybe which is a small part of the market now, but if your game runs 60 fps on S7/Go then you can make it run 60 fps on S6 by simply lowering the res a bit. 4- Mobile phones is unlike PC you can set mobile CPU and GPU clock any time with simple commands (there is 4 level of CPU and GPU. 1 is the lowest clock and 4 is the highest clock) available with Oculus SDK. mobile CPU and GPU is really powerful but looks like you can't set it to "level 4" all the time and if you did then your phone will get the high temp in 10 min and reach the thermal limit and once it does that, Oculus will force the phone to run on low performance 30 fps and you will not able to pass oculus store performance test. The best number works is CPU at "level 2" and "GPU at level 3" this is the default with UE4 and it runs fine on my galaxy s7 for 30 min without a problem and it passed the oculus performance test. so keep this on your mind. --------------- Threads.... If you remember I mentioned before about game thread: Snapdragon has 4 cores. exynos device (Mali GPU) has 8 cores but it doesn't matter since the phone only uses 4 of them at the time and the rest 4 during low power mode etc... *$-Engine has access to 3 cores of Oculus Quest (4th one reserved for TimeWarp), as for Oculus Go it has access to 2 cores and I believe it's the same with GearVR. I don't know how below threads distribute on cores (since we have more threads than cores) so if you know please comment about it as I looked everywhere. From what I experienced, the game based on UE4 uses 3 main CPU thread: -CPU Game thread (your game logic) -CPU Render thread (drawcall) -CPU audio thread. All of these thread runs separately so if one of them takes more time than 16 ms (60 fps) you will have a problem with your fps, at the same time if you try to optimize your game thread lower to 14 ms (by simplifying your game logic) but your render thread is 18 ms you will get final fps of 18 ms, in short words you will have to optimize each thread separately and once its lower than 16 ms then leave it and move on to the next one since optimizing one thread more than other won't benefit you. The reason I detail explained this is because you will face drawcall problem like me :) and fixing other issues won't fix that bottleneck. *Try to learn CPU profiling provided on UE4 engine it's really easy, you will have to capture the data from your mobile with commands and bring the file back to your engine and open it and analyze the bottleneck. there is no other way, the good thing its simple and it will only take a few mins to learn. read and watch below 2 links. https://www.unrealengine.com/en-US/blog/how-to-improve-game-thread-cpu-performance?sessionInvalidated=true https://www.youtube.com/watch?v=GaRLNcdmU4U&t=10s As for GPU optimization, you will have to test with "vr.PixelDensity" like "vr.PixelDensity 0.5" if you get some boost on fps then you are GPU bound. you will have to optimize your shaders. since my game was unlit and I deleted all the fog and fancy shaders and disabled all post process I didn't face much problem later. if you do then learn on how to optimize your GPU side. -----Now------- -How to optimize drawcall (CPU Render thread) So getting back to the main issue which is the limit of drawcall and poly. it wasn't hard for me regarding poly since my game is already using low poly meshes so I only shrank few of high poly inside the engine (one of the UE4 engine features to decrease poly). As for drawcall, here is the thing will help you to lower it: 1- Merge all the actors to one big mesh. 2-Instanced Stereo Rendering/Multi-view for VR. this will cure your drawcall by 50% 3- Reduce the number of materials. For me, since my game is standing in one place and all of my views is almost the same, I merged my level all to one mesh that had 10 materials (after decreasing my materials) so I got 10 drawcall for my level. before it was more than 300 mesh and each with ~4 material. - How to optimize (CPU Game thread), I found out moving components is very toxic on mobile, so I tried to lower it as much as possible by removing all the extra collision boxes and spheres and merge some static mesh into one. my game was already optimized not much of events run peer tick/fps. since UE4 have a problem with GPU particle (its bug in the engine of 4.21 I tested I believe its not fixed yet, I already opened a ticket with Oculus team, hopfully they will fix it or its fixed on 4.22 which I haven't tested it yet) this really hearted my project so I had to convert all the particle effects into CPU type and optimize my particles by reducing its component and lowering its texture resolution. and lower its lifetime. And since I merged all of my actor into one big mesh I didn't had the need for Occlusion Culling, so i disabled Occlusion Culling which was taking some of my fps. (~2 ms probably) -How to optimize CPU audio thread wasn't that much hard, I tried to convert most of my SFX from original sample rate 44100hz to 22050hz and this reduced the size a lot and fixed the time needed to read this sfx from the slow memory of mobile that was causing spike during running this sfx. ----- Regarding GPU optimization, I didn't have many problems and I was able to run my game with 124% Res since my game already using unlit materials with simple material instructions and full rough material. but I used ES2 and HDR Off (which disabled all of my post-processes) otherwise it was impossible to run empty level with HDR on gearvr. Here is the links that helped me, some of them are unity and others are UE4 but all are the same principle: * https://developer.oculus.com/blog/squeezing-performance-out-of-your-unity-gear-vr-game/ * https://developer.oculus.com/blog/squeezing-performance-out-of-your-unity-gear-vr-game-continued/ * https://developer.oculus.com/blog/tech-note-profiling-optimizing-on-mobile-devices/ * https://developer.oculus.com/documentation/mobilesdk/0.5/concepts/mobile-power-overview/#mobile-power-overview * pdf and youtube talk with the name "How to scale down and not get caught" * https://developer.oculus.com/documentation/unreal/latest/concepts/unreal-debug-gearvr/ * https://docs.unrealengine.com/en-us/Platforms/Mobile/Performance?fbclid=IwAR213O6tEh_rU6cM1TUmxvRvVcoBqvCV4r42-m4SjZKr8IbHVep87z7q4n4 These are few videos I still haven't checked them but going to drop it here so I get back to it later: https://www.youtube.com/watch?v=belVA1C013A&list=PLL2xVXGs1SP450I0CPTIyIYX3yHCY9GQs&index=11 https://www.youtube.com/watch?v=I7dokp76hhE&list=PLL2xVXGs1SP7RjXUBwur43flR7tRcbYLD&index=8 https://www.youtube.com/watch?v=-uDqC6SIB2A&feature=youtu.be&list=PLL2xVXGs1SP450I0CPTIyIYX3yHCY9GQs&t=1751 https://www.youtube.com/watch?v=BZhOUGG45_o&list=PLL2xVXGs1SP450I0CPTIyIYX3yHCY9GQs&index=23 https://www.youtube.com/watch?v=-uDqC6SIB2A&feature=youtu.be&list=PLL2xVXGs1SP450I0CPTIyIYX3yHCY9GQs&t=1751 https://www.youtube.com/watch?v=hcxetY8g_fs https://developers.google.com/vr/develop/ https://software.intel.com/en-us/articles/vr-developer-tutorial-testing-and-profiling-the-premium-vr-game As you can see, there is a lot of good resources found on Oculus sites, and I'm thankful for all the devs who shared their optimization tricks on Oculus forums and blogs, without them I wouldn't able to publish my game. I will past my DefaultEngine.ini setting regarding rendering setting on the 1st comment section. *$ Source https://developer.oculus.com/blog/down-the-rabbit-hole-w-oculus-quest-the-hardware-software/3.1KViews0likes1CommentWhen we upload mobile build using ovr-platform-util its shows update date as 01/01/1970.
When we upload mobile build using ovr-platform-util its shows update date as 01/01/1970. the version of ovr is - Oculus Platform Command Line Utility - 1.35.0.000001 (Built on Wed Jan 23 2019)723Views0likes0CommentsMobile VR + Speech recognition - short freeze
Hi all, I have a problem with speech recognition in Mobile VR (Gear VR) When using in Mobile VR, the speech recognition is doing lag for 1 - 2 seconds, but it is killing whole VR experience. See video here: https://www.youtube.com/watch?v=bF9ayeKSn2A&feature=youtu.be - seconds 7 - 12. My idea is because of audio encoding. Deep profiling is not very helpful. I am using Frossweep plugin from Asset store. Is here someone, who has successfuly implemented speech recognitin in mobile VR?432Views0likes0CommentsUnity Linear Fog on Mobile
Hi all :-) Have tried just about everything I can think of to get Unity's default linear fog (or exp) to work in my scenes on the Oculus GO. Some people say that it works, others that it doesn't. Any clues on what I could be doing wrong or have missed - an export setting perhaps or maybe something not added to the camera/cameras? Forward rendering camera, perspective, single pass. Any help greatly appreciated :-) EDIT: RESOLVED Turned out to be an additive issue in that if scenes are loaded additively and the original scene didn't have fog enabled then the new scene's fog settings aren't applied cause it's assumed you don't want them. :-)1.4KViews0likes0CommentsOculus Utilities for Unity 5.x Mobile Documentation outdated. How do I start?
I am trying to get started with developing for the VR Gear using Unity 5 and the Oculus mobile SDK 1.0. Following the Oculus Documentation doesn't help because it says: Project Settings (mobile only) The mobile Utilities package includes a Project Settings folder which provides default settings for a VR mobile application. You may manually copy these files to your [Project]/Assets/ProjectSettings folder. However, there is no such thing as "mobile Utilities package" under the Downloads, there is only Utilities for Unity 5. And this doesn't contain a ProjectSettings folder, and has many mobile specific assets missing (eg. the signature file placeholder 'assets' within Android). I assume the documentation is outdated and refers to earlier package versions. What is the current way to get started with mobile VR development or get some samples work for Unity 5? What I've tried: After importing Utilities, I've tried importing any of the existing example versions. 1. importing the VRsamples located in the OVR mobile SDK, but this gives a Unity 4.6 required error. 2. importing the currently separately downloaded Utilities for Unity 5 - SDK examples, but when I replace the Project Settings manually as described in the manual, this results in 'could not load ovrp symbol ... symbol not found' errors. Is this a Mac-related error (I'm on Osx Yosemite, I've installed Oculus Runtime for OSX too)? Or is there some other package I'm missing? Thanks3KViews0likes10Comments