i have the following background and the following main camera , here is the main camera : http://img15.hostingpics.net/pics/681386Untitled1.png
the preview is looks like this : http://img15.hostingpics.net/pics/479945Untitled2.png
i don't get the background and the player in the main camera
please help me solving this problem
Thanks in advance
Your camera's position's Z value is 0, which means your gameobject and camera is on the same plane, so camera can not view it. Change it with some negative value (try -10).
I recently answered a camera problem here so I would check to see if this helps...
Game Object Appears in Scene View but not in Game View
If not, I can see a few warnings occurring at the bottom of the screen shot you posted in Unity, it might be worth addressing those problems first (regarding HDR and rendering paths).
Not sure if this will fix the issue as there isn't a huge amount of info available on your post so it could be a whole range of problems.
Hope this helps :)
Related
Previously, I've been developed a library to facilitates the usage of Camera API: The Camerakit. I'm recently developing a new project with this library and I want to perform animations on the top of camera preview(which extends SurfaceView),I found when I added such as the following code to my application, the animations of the view is not performed properly with camera preview, but performed well when without camera preview.
// MainActivity.class
capture.animate().yBy(2000).setDuration(10000).start();
Is there a way to solve this problem?
I got this problem when i code android with Unity.Then I solved this problem by setting SurfaceView's level on the Z axis direction. As we all know,SurfaceView is a view which drew above the shell.Maybe you can got the SurfaceView's instance,then set it under the view.like this:((SurfaceView)child).setZOrderOnTop(false);
So,in fact,the animation has already run.It just be covered by SurfaceView.
Playing around with animating camera controls over a custom camera activity and I too ran into this problem. My camera controls would get cut off at an almost random point in their animation over the camera view. After playing around for a few hours as well as trying out Z ordering, the thing that worked for me was adding a full size child view with a background color (transparent works fine!). Not sure if the ordering of the view matters (I placed it right before/above the view I wanted to animate).
I finally figured it out. By changing the preview component which is SurfaceView to TextureView solve this issue. Now I can overlay any animation on my camera preview.
I also updated my code on Github.
This commit reproduces the issue. And this one solved it.
if you have to use surfaceview, there is a solution, put a no-TRANSPARENT view between surfaceview and your target view.
I have a problem on Google VR, as you can see on the screen shot, on the right eye camera, the UI is double. I didn't do anything in the code, I just created another cam for the UI and culling mask is set only to UI, then this is what happened.
What can I do? Please help!
I am looking for logic to show various location markers based on area visible through camera view of a device on android.
Something similar to attached image.
I know following things
Get location
I have all locations to be marked
I know how to create an overlay on camera view
You can check my tutorial: https://www.netguru.co/blog/augmented-reality-mobile-android
I've described step by step what you need to do to achieve similar outcome but very simplified. If you have any questions I'm ready to help.
Each location need to have it own REAL position. For example you need a database of GPS location of each point.
Than you analyze frames from your camera. In each analyzed frame you're checking the azimuth on which you are currently looking. Let say you`re looking straight north, azimuth 0 degrees. If we assume that your camera has 90 degree field of view (FOV) than you know that your FOV is from <45, 0) to <0, 315> (in terms of azimuths)
Now you need to check which of your points are on such azimuth and if one of them is you just display them
Augmented reality is helpful for your problem.
After searching a lot found following things
An SDK which is open
https://artoolkit.org/documentation/doku.php?id=1_Getting_Started:about_installing
and these examples
https://github.com/tvbarthel/ChaseWhisplyProject
https://code.tutsplus.com/tutorials/android-sdk-augmented-reality-location-distance--mobile-8004
Hope this helps someone else as well.
Check this framework https://www.layar.com/. Theres 2 ways to plot your images on view. The first one is, through GPS pre-marked; another one is through image recognition (you can use a simple QRcode cards, I guess it's the most simple. But if your motivated to create a awesome solution, do a grateful solution).
Regards.
I want to develop customize camera application like Snap chat!, with out using Surface view.
First i used surface view to develop the app,but i am unable get quality image and also i am unable to get all features what default camera app is providing, like Zoom, focus,face reorganization etc. Please provide me any solution to achieve this
sorry for my english
github/xplodwild/android_packages_apps_Focal
github/almalence/OpenCamera
github/troop/FreeDCam
github/rexstjohn/UltimateAndroidCameraGuide
maybe one those might help
I need to get the area of a known object inside a scene to get the distance from that. The problem is rectifying it so that the area is independent from the angle.
I'm using opencv (on Android) with some java code that is equivalent to this:
http://docs.opencv.org/doc/tutorials/features2d/feature_homography/feature_homography.html#feature-homography
In other words: how do i get the area of the object observed perpendicularly from that distance given the H matrix.
Thank you in advance and sorry for my poor english... :)
You can call cvCalibrateCamera, but am not sure if it works with one image only. The algorithm it is based upon can cope with the one image case, see section 3.1. where it says "if n=1...". So in a pinch you can re-implement it.