Final Adjustments

Our model is in our scene and does appear in Snapchat if want to test now, but there are a few issues. The model is currently halfway below Y axis, the Touch Collision Area is way to big, and the model does not cast a shadow on the ground. These are all easy to fix so lets go!

Because the model is halfway below the “ground”, it won’t quite look like its sitting on an object, ruining the AR illusion we are creating. To fix the Y models axis just select your model in the Scene View, or the Objects view, and use the move tool with the green arrow, or Y axis position value in the inspector to raise the model so its bottom is resting on the Y axis. You may need to rotate your Scene View and zoom in and out to get this right, you can refer to the Scene View section in the first part if you have forgotten or need a refresher on how to move in the Scene View.

Corrected Y Axis for Model

We haven’t talked about the Touch Collision Area, so we will here. In the template the Touch Collision object defines where the user can interact with the scene through touch. If you look in the WorldObjectController you will see it has a script called Touch, and a component called Manipulate, these two items allow you to move the object around your view, scale, and rotate it.

WorldObjectController Inspector View

You can test this in the Preview by clicking and dragging your model.

Model moved in Preview

Select the TouchCollision object in the Objects panel so you know what we are working with.

Selected TouchCollision object

It should highlight blue.

Highlighted Touch Collision Area

You want the Touch Collision Area to match where you want the user to be able to interact with your Lens. Right now because it’s still set for the trophy’s size it doesn’t match our new model.

We need to use the scale tool to match the TouchCollision object to our new model. Use the scale tool and the handles on the axis to resize it to match your model, you may also need to use the move tool to make sure it stays where it needs to be. At the end your TouchCollision object should closely match your model.

Resized TouchCollision object

Now in the Preview you should only be able to move your model if you are selecting close to it.

The last thing before we are ready to send it to the phone is we need to add a shadow to our model. By having a shadow projected on the ground you pull off the illusion that the object is really there even better.

To add the shadow select the mesh visual of your model, this is not the model object, but the geometry within. It should have a icon like mine. You may also have more than one, in which you will need to repeat these steps for each.

Selected mesh visual

Now in the inspector you want to find where it says Shadow mode and change it to Caster, then change the Shadow density to a lower number, I like 0.40.

Shadows enabled on mesh

You can now check if it worked by looking at the preview and you should see a shadow under the base of your model that matches your models shape! Repeat these steps for each mesh visual in your model.

Shadow under model

Sending it to your Device

If you have a device with Snapchat you will be able to test this, but we need to do two quick things first. The first thing is we need to give this Lens a name. Click on the Project Info button in the top left corner and change the Lens name to whatever you want to call your Lens, I am calling mine Tennis Ball.

Project Info panel

Hit apply and then save your project by hitting either File->Save or Ctrl/Cmd->S

Now to send it to your device you will need to use the button in the top right corner. If you haven’t paired it will tell you how, other wise you can just click it and your Lens will be sent to your device.

You should see a message in the Logger letting you know it was completed.

Logger message

And you will get a notification on your device.

Snapchat notification

You can now use your Lens like any other lens made by Snapchat! Have fun and make sure to check for the next tutorial where we will go over interaction and sound!

Completed Lens

Part 2 Coming Soon!