x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

IHeadMountedDisplay Not Working On Mobile

Hello,

I am implementing the IHeadMountedDisplay and IStereoRendering interface classes available inside the engine, but it doesn't want to respond in the mobile Android build. It works on Window builds. Secondly. I have implemented the code similarly to how the Oculus has there's setup inside a plugin but wont work with Android either.

Am I missing something here to make things mobile compatible?

Product Version: Not Selected
Tags:
more ▼

asked Jun 30 '14 at 09:29 PM in C++ Programming

avatar image

pal
31 7 11 16

avatar image L&S Sep 11 '14 at 10:33 AM

Hi Pal,

I'm also interrested in the creation of a stereo plugin. I've began to build one from the base of the Oculus' plugin .. but if you could send me or post you code, you'll be an angel !!

Moreover, have you succeed to run your plugin on Android with stereo ?

Thanks / Gil

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I will need some more info as to the actual issues you are having.

For the second one, make sure that you have the proper platforms Whitelisted in your .uplugin file (if you just copy and renamed the Oculus one, you may have missed it).

And make sure to add the plugin to the list in BaseEngine.ini

Josh

more ▼

answered Jun 30 '14 at 09:43 PM

avatar image

joshbadams STAFF
1.3k 19 7 46

avatar image pal Jul 02 '14 at 03:48 PM

Thanks for the response. Seems like the plugin magically started working today on mobile without modifications.

The .uplugin written like this:

"Modules" : [{ "Name" : "PluginName", "Type" : "Runtime", "WhitelistPlatforms" : [ "Win64", "Win32", "Android" ] }]

And .ini file written like this:

[Plugins] +EnabledPlugins="PluginName"

As for the IHeadMountedDisplay, it just doesn't work for mobile, but works fine for Windows. I set EHMDDeviceType::DT_OculusRift as the enum type so that the shaders get initialized in the postprocess classes. I might suspect that maybe it's the values I am setting inside GetHMDMonitorInfo(MonitorInfo& MonitorDesc). Wrote something like this:

MonitorDesc.MonitorName = "MonitorName"; MonitorDesc.MonitorId = (long)1; MonitorDesc.DesktopX = 0; MonitorDesc.DesktopY = 0; MonitorDesc.ResolutionX = 1080; MonitorDesc.ResolutionY = 720;

I set the mobile preview screen resolution to 1080x720. Attached screencaps below to show standalone and mobile previews.

Another issue is that stereo seems to be glitchy (both viewports are rendered on right side of split screeen) when HRD rending is enabled. Transparent window shaders seem to only render on one side.

alt text

alt text

standalone2.png (169.5 kB)
mobile2.png (298.2 kB)
avatar image pal Jul 02 '14 at 03:51 PM

The scene rendered with HRD rendering for mobile

alt text

mobilehdr2.png (122.5 kB)
avatar image pal Jul 02 '14 at 05:07 PM

I have just learned that the shaders called from PostProcessHMD are not being called in mobile builds, so IHeadMountedDisplay class is not being initiated from the start. Anyone have solution to this issue, or can point me to the right direction?

avatar image JJ Hoesing STAFF Jul 02 '14 at 08:29 PM

The postprocess issues have a temporary workaround in this github commit:

https://github.com/EpicGames/UnrealEngine/commit/90a9af94c5fd47dd285c2c20d3ff8132a89f043a

Another commit that you might be interested in is this one, which correctly handles GetHMDMonitorInfo() returning false, which probably isn't the case with your HMD code, but just in case:

https://github.com/EpicGames/UnrealEngine/commit/fea791d32a04f01834c5f586ccf9e5b655c4b5ea

Plug-ins also weren't working on mobile until a month or so ago, but if you've made it this far, it seems likely that you already have the fix for that issue.

avatar image pal Jul 04 '14 at 07:15 PM

The temporary workaround works for the transparent materials for HDRmobile enabled. Is there a workaround for non HRDmobile? My IHeadMountedDisplay issues are yet to be resolved on mobile. Anywhere in the source where I could make possible modifications to make it work properly?

avatar image pal Jul 03 '14 at 03:35 PM

Thanks for the links JJ. I am currently compiling the source for 4.2.1 and will make these changes to see how it goes. Still very confused to why the IHeadMountedDisplay is not being initiated, since IsHMDEnabled() is being passes true and the code runs correctly for Windows.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question