Using 3D Models in ZapWorks Studio

Hi ZapWorks Community,

Our next technical demo will demonstrate one of our most popular features: 3D models and animations. This guide will provide a run-down of how to prepare your 3D assets, import them into studio, and play animations with user interaction.

In addition to this tech demo, we have plenty of documentation on using 3D models in studio which can be found here.


Adding your Models to Studio

Please note that ZapWorks Studio only supports 3D models that are formatted as GLTF, GLB, FBX, OBJ, and POD. Find out more on our supported formats here.

  1. Source your Assets. We have a library of 3D assets in our library, as well as an integration with Sketchfab, which allows you to import models into studio directly from their library. If you wish to use your own 3D model, please check out this guide on exporting your 3D models for Studio. This guide focuses on Maya, 3DS Max, and Blender, but you can use similar settings in your software of choice.

  2. Import your model into Studio. If you are using your own GLTF, GLB, FBX, POD, or OBJ model, then you will need to drag your 3D model files into the media library. If you are importing a 3D model from SketchFab, then you can do this by pressing the plus (+) symbol in the top right of the media library.

Import%203D

  1. Apply your textures and materials. This can be done by dragging your textures into their respective boxes in the pop-up. If you have multiple textures to apply to your model, you can select them all in your file explorer and drag them onto the ‘Drop All Textures’ box.

Textures%203D

  1. Once imported, your model will appear as a subymbol in the Symbol Definitions panel. Drag your 3D model subsymbol into the root node of your hierarchy. If you are using a lighting material, you will also need to add a light into your Hierarchy.

Add%203D%20to%20Root


Editing your 3D model in Studio

  1. You can edit the properties of your model by heading into the 3D model subsymbol. You can do this by double clicking on your 3D model in the Symbol definitions panel.

3d%20subsymbol

  1. To edit the properties of your model, select it’s node in the hierarchy. This will bring up the properties for the model in the properties panel. If you scroll through this, you will find settings such as appearance, transforms, and the model’s materials. Any changes you make to this sub symbol will be reflected in any instance of your model within the project.

Adding animations

  1. Create a new Controller and within that create a new Timeline.

%20Timeline

  1. Select your Timeline from the Controller, and add your animation by pressing plus (+) on the 3D model’s animation property. You will now need to change the length of the timeline to match the animation - your 3D model animation length can be found in the subsymbol. Once the length has been changed, press the skip to end button on both the timeline and animation property.

%20Include%20timeline

  1. Click and drag to select the last two keyframes in the timeline, then right click and select Make Link > With left value.

%20Make%20link


Creating interaction on your 3D model

3D models themselves don’t fire events, so you cannot tap on them directly to activate an Action or a PointerDown event. Instead, you must use an invisible plane overlaying the model, to ‘fake’ the interaction. The following steps show how to play the 3D model animation when the model is ‘tapped’.

  1. To play the animation you just added, you can add some user interaction to your experience using an invisible plane. First, you must drag a plane into the hierarchy, and change the visible property to make the plane invisible.

%20Add%20Plane

  1. Right click on your plane, and select New > Script > pointerdown.

%20Pointerdown

  1. Drag the animation timeline into the pointerdown script from the controllers tab.

%20Pointerdown%202

  1. In the animation play function, you can set the speed of the animation (as an integer) and if you want the animation to loop (as a boolean). In this instance, we have made the animation loop at normal speed by adding play(1, true)

%20Loop


I hope this helps!

Please let us know on this thread if you have any issues using 3D models in ZapWorks Studio, we’ll be more than happy to help.

Adam

3 Likes

Hi,

I have many problem with importation of 3d model in Zapworks studio from Blender.
Many of my mesh are broken like this:


Whatever the format I am using, 80% of them appear broken in Zapworks Studio. I am using GLtf 2.0 format, but also tried .obj, .fbx
Same models works well in all other software, I also checked that the file is valid here.
Also, models looks ok in Zapworks designer. So, I guess the importer is buggy in Studio.

Thanks for your help.

It looks like there is a maximum of faces number within a .glb model mesh before the model breaks with the importer in studio only. Lowering the faces number for that specific mesh in the model fixed the issue.

If it is, It’s worth to document this limitation somewhere to avoid other users having the same problem, or better, fix this issue that did not occurs in Zapworks Designer beta and other software.

1 Like

Hi @MRPropre,

We have thorough documentation about 3D models and ZapWorks Studio here. In particular, the Supported Formats and Requirements article explains the generally compatible geometry limit.

I’d also consider looking at the Rigs and Animations section of this page if your model has animations.

All the best,
Francesca :blush: