How to show a text instead of 3d object in unity5 and vuforia? - image-recognition

Hope there's a response. :( What I want to is: Object recognition. Using Unity and Vuforia. Is it possible to make a text or a toast that will pop out or show in the camera when the objects is detected, instead of a 3d object? For example. If I detected ace of heart card. It will a show a text "ACE OF HEART"

yes it is possible, use UI component and put it under Image target, I think its very enough and If it is not then let me know I will put the entire content here, but belive me it is very simple try it just once.

Yes Its Possible.
You Just Have to Add Unity UI (You Just Could Use a Image with the text, in that case add an Image or you just could use a Text, so just add a Text, it's your choice) To that Object and set the Canvas in WorldSpace Mode.
And just that should do the trick.

Related

How to create a slider without an outline?

I want to create a slider without an outline.
Like this one:
Note rounded edges.
I assume I need to create a sprite for that. Unfortunately, I can't find any good tutorials on sprites for sliders. I think the easiest way would be to edit the built-in one but I don't know how to get it for editing.
This is how the original slider from my Unity looks like:
Note the outline.
So, surprising solution that should be available to all of us.
Put the default slider in and go to the Source Image for both the Background and Handle. Instead of using what is there, change it to another Unity Standard sprite called TouchpadSprite. This should do the trick. Not sure if the fact that this is called 'touchpad'sprite will cause a problem when make a PC game, but I doubt it. FYI the TouchpadSprite is from the "Standard Assets (for Unity 2017.3)" that is available for free in the Unity Asset Store. Feel free to only import the sprite itself. The Asset Pack itself is pretty large, but there is a lot of good/useful stuff in there.
Also, you will have to increase the Pixels Per Unit Multiplier value. My picture shows what I had to increase it to. This will allow you to choose the rounding of your edges as well. Play with it and let me know if it works.
Hope this helps!

Unity 3D text disappears when I rotate the camera

New to Unity.
I think it's quite weird. What I was trying to do is to make the words on the newspaper flow like water. I created a plane for the newspaper, and I added a 3D Text object.
It worked well at first but when I rotate the camera(not the camera in the scene, but the camera with which you do all the editing), the text simply disappeared at some angles (particularly from below). The main camera had the same problem. It saw the text at some angle and couldn't at some other. I am sure that the texts are positioned right in the viewing frustum.
Some screenshots:
The text can be seem from here
And it cannot be seen when the camera moves a little bit down
Or from another angle, the text is selected
It is in the viewing frustum. But the main camera does not see it
It seems like your text and background are on the exact same coordinates (for example 1,1,1). By doing so, you let Unity decide which is more important to show on the foreground, which makes it dissapear sometimes.
Try to move your text a little forward (for example 1,1,1.001), so it seems to rest on, instead of in the newspaper. Most of the time, that should fix the problem.
Is there some kind of transparency on the object?
Try to set it to opaque to check if this is the problem

How to detect color live using camera on android in unity

i want to make a live color detection using camera on android in unity. apps that i want is like "color grab" on playstore.
anyone can help me how it works? or how to make it on unity?
Well SO isn't a script providing service: always try to provide what you have tried already before asking a question. If you don't have any script, at least expose you way you want to do it, the steps you think are needed, ...
Anyway, I'd advise you to take a look at Unity Texture2D.ReadPixels() method:
display what you need on screen
when the user touch a place, call for ReadPixels()
then retrieve the color of the desire location on the texture using Texture2D.GetPixel()
If you want to search for a larger area (not a single pixel), you can look for all the pixels around the wanted location and then get the average color found.
Hope this helps,

How to change the Canvas Render Camera via C#

I have two camera. One which is the main camera and another that follow an object.
The main camera is attached to a canvas with HUD and other GUI Text stuff. When I change the camera to the object that need to be followed, I loose the canvas. I clearly need to change the Render Camera inside the Canvas component.
I've tought that something like this would exist
canvas.GetComponent<Canvas>().renderCamera...
but it's not. So how can I change the render camera via script?
I think it's this one:
https://docs.unity3d.com/ScriptReference/Canvas-worldCamera.html
canvas.worldCamera = someOtherCamera;
Assign to the Canvas.worldCamera
Doesn't make sense but that's the way it is!

Black 3D Models - Unity3D

I just recently started using Unity3D, and have imported this object from Sketchfab. When I imported it, it provided all the necessary textures and meshes, but it's all black as shown in the images below. It's the same case for any other object I try to add from the asset store. I've tried to fiddle with the light source, but that doesn't seem to work. Thank you in advance.
Edit: This is what my mesh properties looks like. I have selected "pearl_body" and it's still all black.
You need to expand your model in the Hierarchy(left panel) view untill you will see Mesh Renderer component in the Inspector(right panel). Then you will be able to set the material. Probably you will need replace lambert45G in the material view with BaseTexture.
That should fix the problem.
You can read more about materials here, and about mesh renderers.
I had the same problem and found a solution. Not sure if it will work in your particular case, but here it goes:
I had a model that worked fine in unity until I rigged it, then it looked black. What caused this was that I applied a Smooth modifier after the Skin modifier. I solved it by:
Saving the Skin modifier info by clicking on "Save" at the Advanced tab.
Reset Xform / convert to editable poly / smooth modifier (needed in my case as I forgot to use it when the model was finished, before rigging)
Convert to edit poly again.
Apply skin and load the previously saved skin file.
That's all. Cheers!