Select Page

2 Axis Animation Controller

Search

2 Axis Animation Controller

The 2 Axis Animation Component enables you to controll the motion of an object by swiping sideways and up and down.

Animation

First of all you’ll need an Object that has animations. You can create these animation in your 3D application (e.g. 3ds Max, Maya, Cinema4D, etc.) or within Unity. The two motions you want to control with the X and Y axis of the touch input need to be created as separate motions. So for an example, by swiping left and right you want to control the rotation of you object and by swiping up and down you want to move your object up and down. You will need to separate those two motion in the rotation part and the moving part. Those two motions are mixed by the component while viewing the model.

Importsettings

Lets say you have your model animated in an external software and you have imported into Unity. Select your object from the Assets folder and click on “Rig” in the Import Settings in the Inspector tab.

Set the Animation Type to Legacy and Generation to Store in Root (New) as shown in the screenshot above. Next click on the “Animation” tab. On this tab you can setup the two clips (animation parts) for the 2 Axis Animation component. In this demo case I have created the rotation from frame 0 to 30 and the upwards motion from frame 35 to 65.

You can add a new clip to your animaiton by clicking on the little + icon. Select the clip from the list, give it a proper name and setup the start and end frame by inputing the frame in the text fields below the timeline.

Component Setup

After you dragged you 3D object into an empty scene, you should have an “Animation” component on your object. Add a new Vuframe Scene object and make your 3d object a child of that Vuframe Scene object. Select the object with the Animation component, click on Add Component and search for “2-Axis Animation” hit enter or click on the component to add it to your object. Mow you can add the names of your animation clips, in my case “Rotate” and “Move”, To Axis 1 and Axis 2 State Id fields. Your Setup should look like in the screenshot blow. Run the scene by pressing the play button and depending on your movement while pressing the left mouse button the animations should be controlled as described. You can also tweak the speed of the two motions by increasing or decreasing the values in the Interaction Speed fields.

Was this helpful for you?

Material Setup in Unity

Search

Material Setup in Unity

When creating materials there are some perks and some limitations to know. You can use the Unity Standard Shaders and some special Shaders we made especially for the use with augmented and virtual reality. Custom shaders, downloaded from the Unity Asset Store are not supported yet.

1. Unity Standard Shaders

In Unity 5.6.5 the Standard Material has two different kinds of material setups, the Standard Setup and the Specular Setup. While the Standard setup has values for Metallic and Smoothness the Specular Setup has a color field for Specular and Smoothness. Also both shaders have 4 Render Modes for displaying opaque and transparent materials. For a better understanding of the Unity material system, please refer to the Unity Documentation ›

As well as the Standard and Standard Specular Shader you can use the Shaders you marked as Legacy shader.

There is a limitation, some of the Slots in the standard shader materials will not have any impact on the look of your object on device. The material-slots, not affecting the look of the materials are:

  • Heightmap
  • Detail-Mask Emissive and
  • Secondary Normal map

2. Vuframe Shaders

Packaged in the Vuframe PlugIn there are also two non-standard shaders. Lightmap and the Occluder Shader. While the Lightmap Shader creates an alpha channel from a baked light-map the Occluder Shader hides everything that is behind or inside an object with this shader.

When used on a Plane, Quad or any other mesh-object the Lightmap Shader can be used to create a shadow of an object on the floor or a wall. In our image example below, the cube is below the plane and the Standford Bunny with the Lightmap Shader assigned, the dark shadow is clearly visible, everything else is transparent.

The Occluder Shader can be used to hide parts of a model. For instance you want to hide the parts of a building  that are below the ground when displaying the building in AR you can do so by adding a cube to the scene, assign the Occluder Shader and scale and transform it into place so the lower part of the building is not visible anymore. You can also create a custom object in your 3D or CAD software and assign the shader to it. The Cube in the image example below has the Occluder Shader assigned and hides the parts of the bunny that are inside or behind it, so the sky map is visible.

Was this helpful for you?

Mesh Import Settings

Search

Mesh Import Settings

How 3D meshes should be imported into Unity to use them with the Vuframe Unity PlugIn. Covering scaling for LifeSize AR, settings for lightmapping, animation import from your 3D application. After importing the your 3D scene into Unity for the first time, you should always check those settings to make sure everything is set up correctly. To access the import settings select the mesh in your project. To save your changes on the import setting you need to click in the Apply button.

Scale Settings

To display the your product oder model in the correct scale it can be necessary to set the import scale correctly. You avoid to scale the model in the scene in Unity by scaling up or down since this can cause problems when exporting and publishing the model to the cloud, later on. Start by dragging and dropping your 3D model into an empty scene and adding a standard cube (Menubar: GameObject / 3D Object / Cube) to your scene right next to your model as a size reference. By default the Cube is 1 x 1 x 1 meter big. You also increase or decrease the size of the cube depending how big or small your model is. So for the size of 10 by 10cm the cube should be scaled to 0.1. If your 3D package uses metric units you can scale your model by multiplying by tenths (e.g. 100, 10, 1, 0.1, 0,01 0.001) If your 3D software uses inches instead of metric unity you can not simply scale the model by tenths (0.1, 0.01 etc) but you have to convert it from Inch to Centimeters by using a multiplier of 0.393. so depending on the model scale 0.393, 0.039 or 0.03.   

Lightmap UV Settings

If you want to use Unitys lighting system you need to check on the “Generate Lightmap UVs” option and click on the Apply button. This option, by default, is set to off. After checking the option to on and applying your settings Unity will reimport the and create a second set of texture coordinates only for the lighting. Note that this import process will take longer than the import without those coordinates (especially if there are objects in your 3D file that have more than 10.000 polygons).

Animation Settings

It is also possible to import animations from your 3D software with some limitations. At the moment it is only possible to use parametric keyframe animations, such as transform, scale and rotation. To import animations, set the Animation Type to “Legacy” and Generation as “Store in Root”.

Was this helpful for you?