Write an article about
Share
Posted by Sean Kirmani, Software Engineering Intern,
Tango
Augmented reality scenes, where a virtual object is placed in an actual
environment, can surprise and delight people whether or not they’re twiddling with
dominoes or attempting to catch monsters. But without support for environmental
lighting, these virtual objects can stick out moderately than mix in with their
environments. Ambient lighting should bleed onto an object, real objects should
be seen in reflective surfaces, and shade should darken a virtual object.
Tango-enabled devices can see the
world like we do, and so they’re designed to bring mobile augmented reality closer
to real reality. To help bring virtual objects to life, we’ve updated the Tango
Unity SDK to enable developers so as to add environmental lighting to their Tango
apps. Here’s the right way to start:
Before we start, you’ll must download the Tango Unity SDK. Then you may
follow the steps below to make your reality a little bit brighter.
Step 1: Create a brand new Unity project and import the Tango SDK
package into the project.
Step 2: Create a brand new scene. If you would like help with this, check
out the solar
system tutorial from a previous post. Then you’ll add Tango Manager and
Tango AR Camera prefabs to your scene and take away the default Main Camera game
object. Also remove the factitious directional light. We won’t need that
anymore. After doing this, it is best to see the scene hierarchy like this:
Step 3: In the Tango Manager game object, you’ll want to examine
Enable Video Overlay and set the tactic to Texture
and
Raw Bytes.
Step 4: Under Tango AR Camera, look
for the
Tango Environmental Lighting component. Make that the the
Enable Environmental Lighting checkbox is checked.
Step 5: Add your game object that you just’d wish to be
environmental lit to the scene. In our example, we’ll be using a pool ball. So
let’s add a brand new Sphere.
Step 6: Let’s create a brand new material for our sphere. Go to
Create > Material. We’ll be using our environmental lighting
shader on this object. Under Shader, select Tango
>
Environmental Lighting > Standard.
Step 7: Let’s add a texture to our pool ball and tweak our
smoothness parameter. The higher the smoothness, the more reflective our object
becomes. Rougher objects have more of a diffuse lighting that’s softer and
spreads over the surface of the item. You can download the pool_ball_texture
and import it into your project.
Step 8: Add your recent material to your sphere, so you’ve gotten a
nicer looking pool ball.
Step 9: Compile and run the applying again. You should able
see environment lit pool ball now!
You may follow our
previous post and give you the chance to position your pool ball on surfaces. You don’t
must worry about your sphere rolling off your surface. Here are some
comparison pictures of the pool ball with a static artificial light (left) and
with environment lighting (right).
We hope you enjoyed this tutorial combining the enjoyment of environmental lighting
with the magic of AR. Stay tuned to this blog for more AR updates and tutorials!
You’ve just created a more realistically light pool ball that live in AR. That’s
an amazing start, but there’s lots more you may do to make a high performance
smartphone AR application. Check out our Unity example code
on Github (especially the Augmented
Reality example) to learn more about constructing smartphone AR
application.
make it easy to read for teens.Organize the content with appropriate headings and subheadings (h1, h2, h3, h4, h5, h6) and made content unique. Include conclusion section and don’t include the title. it must return only article i dont want any extra information or introductory text with article e.g: ” Here is rewritten article:” or “Here is the rewritten content:”