[Plugin] Android Camera

Has anyone been able to get this to work on Unreal 4.14.1

Hi, everybody, I just update the full project for 4.14.1 enjoy

Quick question, I have set up a cube exactly the way you have. Everything seems to be in order but my camera doesnā€™t seem to be triggering at all?

edit After posting this I noticed something very odd.

If I tab out of my packaged android project using the same set-up you have, and tab back into the app, for less than a second (only sometimes), the camera works and then defaults back to the basic cube material. Unplugging my usb cable and plugging it back in also flickers the camera activation momentarily for some reason.

Any ideas?
note: Iā€™ve chosen to use sdk 21. Is this wise for my HTC One M8?

Great work it will be very usefull!

The sample projects that are shipped with the plugin donā€™t have a material chosen in CreateDynamicMaterialInstance node od the CameraCUBE blueprint. So in order for this sample projects to work you have to select Cube_mat as SourceMaterial for CreateDynamicMaterialInstance node.

Also, in UE 4.14 it doesnā€™t work when launched from the Project Launcher in editor, but only when itā€™s packaged. When trying to launch it with the Project Launcher, it starts te game on the smartphone, but it gets stuck on the splash screen with this in the error log:

[2017.01.04-16.01.40:840] 0]LogCook:Display: Mobile HDR setting 1
[2017.01.04-16.01.40:964] 0]LogCook:Display: Done creating registry. It took 0.11s.
[2017.01.04-16.01.42:960] 0]LogCook:Display: Sandbox cleanup took 1.986 seconds
[2017.01.04-16.01.42:993] 0]LogCook:Display: Generated asset registry size is 848.62kb
[2017.01.04-16.01.43:122] 0]LogFileServer:Warning: Unreal Network File Server starting upā€¦
[2017.01.04-16.01.43:141] 0]LogInit: WinSock: I am DESKTOP-2B2O56V (192.168.56.1:0)
[2017.01.04-16.01.43:154] 0]LogFileServer:Display: Unreal Network File Server is ready for client connections on 0.0.0.0:41899!
[2017.01.04-16.01.43:164] 0]LogCookCommandlet:Display: GCā€¦
<>c__DisplayClass62_0.<RunClientWithServer>b__0: Waiting for server to startā€¦
<>c__DisplayClass62_0.<RunClientWithServer>b__0: Waiting for server to startā€¦
<>c__DisplayClass62_0.<RunClientWithServer>b__0: Waiting for server to startā€¦
<>c__DisplayClass62_0.<RunClientWithServer>b__0: Waiting for server to startā€¦
<>c__DisplayClass62_0.<RunClientWithServer>b__0: Waiting for server to startā€¦
<>c__DisplayClass62_0.<RunClientWithServer>b__0: Waiting for server to startā€¦

Any clues why it doesnā€™t work?

;645938]
Quick question, I have set up a cube exactly the way you have. Everything seems to be in order but my camera doesnā€™t seem to be triggering at all?

edit After posting this I noticed something very odd.

If I tab out of my packaged android project using the same set-up you have, and tab back into the app, for less than a second (only sometimes), the camera works and then defaults back to the basic cube material. Unplugging my usb cable and plugging it back in also flickers the camera activation momentarily for some reason.

Any ideas?
note: Iā€™ve chosen to use sdk 21. Is this wise for my HTC One M8?
[/QUOTE]

that sound weird, you are not turn it off and on? for some reason?, give me some log, otherwise is difficult know what is happen

Not material in place indeed, to create the instance is choosing the first index material, in this case the unique material attached to the cube, and Let me see that error from the launcher, I never tried before jaja, just for package

@xmak and @ you are right guys, and your problem was the same, for some reason UE RHI system is messing with the color per pixel convertion, that make the texture unhappy, and it was causing the flickering in launch mode, please download the new version and test again, I changed my update method, must be work now

Cheers

Fantastic, Iā€™ll let you know if the updated 4.14.1 fix indeed fixes things. I too noticed the missing source material input on the node in your example and on the project. I tried entering the cube material and tried without it so I knew it was getting the correct stuff regardless.
Guess it must just have been he ā€œpixel conversionā€ youā€™ve mentioned.

Update soon!

I have tried it (in UE 4.14.2) and it doesnā€™t solve the problem, the deployment still gets stuck on ā€œWaiting for server to startā€¦ā€ :frowning:

Do you have Android SDK installed?

All is working now! :slight_smile:
I was also able to edit the android.h file and up the resolution scale and set the fps to 60. Looks great now!
I have implemented this into VR cardboard and now I have a android camera background with a floating UMG UI that says the time and sways in-reaction to the cameras gyroscope. Augmented V-reality! Fun stuff :stuck_out_tongue:

;646304]
Do you have Android SDK installed?
[/QUOTE]

Yes I do and I donā€™t think this is an issue. Everything works fine when I package the project (File->Package-Androidā€¦) but the described problem occurs when I try to launch the game from the Project Launcher (Window-> Project Launcher).

hi xmak
When you are lauching the game is just for debug the current open map in the editor, that might be the cause of your problem, or you are doing something else in you project, your log is talking about server connection, which is diferent topic from the plugin,

either way try to run my simple alone and see if is work

I found the solution to my problem, it was not related to this plugin, but the problem was in my antivirus firewall which was blocking the port on which Unreal File Server was running.

I have disabled the firewall and now everything works.

hi karmakun,
this plugin is working great for me in 4.14.2, thanks again for you hard work. my camera texture looks really blurry, i tried to find androidcamera.h as you recommend but it just has a couple of lines about startup and shutdown. is it possible you changed the location of these variables when you released the latest version? i even searched for some variables like height and width but could not find setting them except in AndroidCamera_APL.xml. Do I just change it in there every time it says 320, 240 in that xml file?

also, does the resolution of the bitmap in the material that is assigned to the geometry also limit the available resolution of the output? Iā€™d think it would, just checking.

cheers,
o

Hi ZkarmaKun,

Thank you so much! Btw I would like to know a license of your plugin, because I would like to commit your plugin into my github repository to add iOS camera support. So I would like to distribute this plugin through github to anyone who wants to support a camera in their games.

Thanks!

Hello! I build your project and everything is working fine. But despite the 30fps int the .h file the real fps is something about 10. My devise is samsung s6 edge. Oh, also i tested in VR mode. What could be the reason of such a small fps?

Hello! I build your project and everything is working fine. But despite the 30fps int the .h file the real fps is something about 10. My devise is samsung s6 edge. Oh, also i tested in VR mode. What could be the reason of such a small fps?

Hi @WoojooGames yes you can!!!, for develop or shipping, I will glad to have an IOS camera support, I have my own, but for legal reasons with a former job I canā€™t publish it, but if you can publish yours that will be fine!

hi @anonymous_user_61df53a0 are you doing something else in your app? I have a s6 edge either, perhaps is the VR mode, I never tested that, the 30fps is just a clamp for camera refresh rate

Hi I donĀ“t know why but itĀ“s not working. Everything is set like in your project but still not working. My phone without problems open app but no camera just default view like in editor. Could it be becouse of the UE 4.15? Or could it be couse of my phone I am using HTC oneX tegra 3. Btw when the app running and i try turn on camera outside app Phone doesnĀ“t have access to itā€¦ So I think the app actually using the camera, but not showing the image for some reason. Do you have some advice?