City Dev - Creating a chair with a click-able cushion

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

Overview

This tutorial will walk city developers through the process of creating a click able chair cushion.

File:ExampleChairForCityDevs1 simpleChair.jpg
File:ExampleChairForCityDevs11 testCushionClick.jpg


Preparing Meshes In Modeling Application

File:ExampleChairForCityDevs2 detachCushion.jpgFile:ExampleChairForCityDevs3 renameBase.jpg
Seperate the cushion from the base object if they are part of the same mesh, and rename them for identification.
File:ExampleChairForCityDevs4 importTemplate.jpgFile:ExampleChairForCityDevs5 alignCushion.jpg
Import chair01_template.dae (File:Chair01 Template.zip), and align the top surface of the cushion to the top surface of the template seat. Make sure that the cushion's pivot point is at (0,0,0) and no scaling or rotations have been applied. Then export two COLLADA DAE files- one for the chair base and one for the chair cushion. DO NOT INCLUDE THE CHAIR TEMPLATE IN EITHER OF THE DAE FILES.

Converting and Placing In Level

File:ExampleChairForCityDevs6 convertToCGF.jpg
In the Item Editor, convert both DAE files for the chair into the Blue Mars .cgf format.

Make sure that "Generate auto-proxy shape using bounding box" is checked when converting the seat cushion. Otherwise, the cushion will not react to the mouse when the user hovers over the seat.

File:ExampleChairForCityDevs7 baseInLevel.jpg
With the seat .cgf files generated, open the City or Block Editor, load a level or block, and place the chair base .cgf in the world.
File:ExampleChairForCityDevs8 placeARChair.jpg
Next place an ARChair Entity (RollupBar -> Objects -> Entity -> Items -> AR -> ARChair)
Use Align Selection to quickly align the ARChair to the chair base brush.
File:ExampleChairForCityDevs9 assignCushion.jpg
Make sure the ARChair is selected, and then locate the Model parameter under the Entity Properties for the selected ARChair. Click the folder icon and navigate to the location of the chair cushion .cgf file.
File:ExampleChairForCityDevs9a assignCushion.jpg
The cushion should now be displayed as the ARChair.
File:ExampleChairForCityDevs10 positionARChair.jpg
Now position the ARChair so that the cushion is in the desired location on the base.


File:ExampleChairForCityDevs11 testCushionClick.jpgFile:ExampleChairForCityDevs12 testAvatarSitting.jpg
Switch to Preview Mode in the editor, and test out the cushion.

Example File: File:Chair01 Template.zip

Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools