I created a simple application which is a menu containing 4 scenes.
Scene 1 = using Vuforia, I replace marker with a 3D Object
Scene 2 = you can click on a 3D sphere
Scene 3 = you can click on a 3D cube
Scene 4 = you can click on a 3D pyramid
My main focus is the scene 1 actually.
The problem
When I was testing this scene in Unity, Vuforia would automatically use my webcam as a camera and I could look for marker as you can see on this picture :
Now I got my hands on the Hololens, using Holographic Remoting Player I keep getting this mesh on every scene I created (this picture is from Unity but I see the exact same in the Hololens) :
What I've tried
I looked for element using a Mesh Renderer but if I disable this element, then the virtual element doesn't appear anymore.
I also took a look into the MRTK Camera settings which are the following ones :
But I can't figure out how to remove this black backgrounded mesh that appears on each of my scene.
I figured it out, so for anyone having this issue the solution is to set the MRTK - Spatial Awarness display option to Occlusion
Related
I'm creating a 2D game. It was configured as a 2D game since it was created.
When I selected a GameObject, in the scene their anchor, their size and their pivots were pointed out.
Suddenly this has changed, and it appears like if it were a 3D project, with a circle and all the axis around it, whatever GameObject I select. (Pic below)
How can I configure my Unity Editor to be like before? Maybe is worth it to say that in the top toolbar of Scene window there's still 2D mode selected:
Version: Unity 2018.3.14f1
You've set the Rotation Tool. I think you were using Move Tool before.
It's just a matter of which gizmo you see in the scene.
You may just press "W" on the keyboard.
Or press the Move Tool (first one in the images).
Further info on Unity Tools.
I am creating virtual tour for VR headset in Unity - I create sphere and fill it with panoramic photo as material. For every sphere I create hotspots to switch to another scene after looking at it. I was testing it with Oculus Rift DK2. The sphere was visible, but the hotspots were visible all - for all scenes, but I need to see just hotspot for the current scene [1]. Anyone has idea hot to do it? Maybe something with transparency of spheres, but I saw just hotspots, not other spheres, so I think that sphere transparency is ok.
[https://i.imgur.com/F3S9C8w.png] - here you see also other scenes, in VR headset there are only hotspots, the spheres are not visible. This is right, but about hotspots - I need to see just that one for actual sphere, not all.
I was creating virtual tour according to this tutorial: https://tutorialsforvr.com/creating-virtual-tour-app-in-vr-using-unity/ ; you can see there also script for hotspots.
Thank you for all comments.
Make in your script public GameObject scena1Sphere, scena2Sphere, scena3Sphere;. And connect that game object from hierachy to sript fields. Then you can type:
//for first scene
scena1Sphere.SetActive(true);
scena2Sphere.SetActive(false);
scena3Sphere.SetActive(false);
//then when you switch to scene 2
scena1Sphere.SetActive(false);
scena2Sphere.SetActive(true);
scena3Sphere.SetActive(false);
// and for third scene
scena1Sphere.SetActive(false);
scena2Sphere.SetActive(false);
scena3Sphere.SetActive(true);
I am using Vuforia and Unity to do AR. So far I have gone through the ImageTarget example, and am able to see the teapot using my Samsung Galaxy S4. I've also managed to overlay some UI elements on the screen.
Now, I'm trying to place a persistent 3d object (capsule for example) in the world.
However, when I place a capsule say, next to the teapot, I see only a white screen when I start the android app.
Why is this so? How can I resolve this?
My scene hierachy is like this
ARCamera
Directional Light
ImageTargetChips
ImageTargetStones
Canvas <-- for UI overlay
EventSystem
Capsule <-- adding this into the world causes screen to turn white
Even if I shift Capsule to under ARCamera, I only see white when I start up the app.
Thanks.
You have to learn about the Unity hierarchy. Everything, i.e., 3D objects, image, audio, etc., i.e content associated to specific image target must be Hierarchically child of ImageTarget.
Here, you need to put your 3DObject (Capsule) inside the image target (Stones/Chips).
Like
> +ARCamera
>
> -ImageTargetChips
>
> Teapot
> Capsule
And then adjust the position & Scale of capsule (3D Object)
Your 3D object must be in a camera view:
eg. Position of camera: x:0 y:0 z:0
Position of image target: x:0 y:0 z:-60
Here, Z axis is "Depth"
1) I am a beginner to using Metaio in Unity, so my question is that is it possible to include two cameras on my scene: one is the main for 3D environment, and another camera (metaio camera) to display objects from Unity on the real world that must be fixed on the top wright corner as UI plane of my game. Something like in the picture below:
2) Also, how to display on the metaio camera view on the scene instead of displaying all scene objects as shown in the image below, although I only attached one cube object under metaio tracker:
Any help or answers gratefully received.
Thanks.
you have to attach an script to that plain and add the code bellow to that script:
void Start() {
WebCamTexture webcamTexture = new WebCamTexture();
renderer.material.mainTexture = webcamTexture;
webcamTexture.Play();
}
if you working for android you have to add camera permission to you manifest.
i think you need to work on it, because it doesnt work simply and you have to play with camera positions and to work very well.
this link shows you camera options that you have in unity:
http://docs.unity3d.com/ScriptReference/WebCamTexture.html
I am using Unity3D with extension of Vuforia. I am working on Cylindrical targets. When ARCamera detects the image and starts the augmentation, I want to show my GameObject (.fbx file, imported into the Meshes folder and created a Prefab out of it) on the screen.
I am working in Unity C#.
I attached a script to the GameObject and initialized it DefaultTrackableEventHandler Script. When I run it in Unity and the camera starts, I don't see my object in the Game View. Whereas in Screen View, I see that bottle (Prefab) rotating.
make sure the camera, or the focal point has your object in sight, when i tried vuforia, rotate your card slowly 360° to see if you can see the object, also your object could be far above what you expect, I would recommend very long expanded cubes in the 3 axis, to get the reference in the augmented world, then move from there