👈 Go Back
CYBERDOOF

Space Building Reference

Getting started with MagicaVoxel

MagicaVoxel is a free 3D pixel art creation tool that can run on Windows and Mac (or under Wine on Linux). It is currently the only way to build content for Cyberdoof.

Building at correct scale

Cyberdoof uses a fixed scale of 10 voxels (volumetric pixel or vx) per meter. This means that a single voxel in your build will be equivalent to 10cm world size.

The maximum build size supported by MagicaVoxel is 2048vx wide by 2048vx deep by 1024vx high. Cyberdoof also supports up to this size, however depending on build density, you may encounter performance issues on builds this size. Please email hello@cyberdoof.com to report any such issues.

Adding video screens and audio sources

To create a screen:

Adding an audio source is very similar:

Lighting and atmosphere

Cyberdoof tries to match the sky, sun position and lighting of your MagicaVoxel scene as much as possible. However, since they use very different rendering systems, there will be a number of differences that will require experimentation to get just right.

The following environment and scene options are supported:

Emissive materials cast light much like they do in MagicaVoxels and you can set the brightness of the light source using Emission option. However there are some major differences:

If you want to add a little extra atmosphere, you can use the Haze object. Add an empty object to your scene, name starting with haze: (e.g. haze:foggy area) and position/size the object to your desired area.

On the other hand, if an area is getting too much sunlight, you can add a density volume to reduce the amount of sunlight an area receives. Add an empty object to your scene, name starting with volume/density: (e.g. volume/density:foggy area) and position/size the object to your desired area.

Controlling exposure

You can override the default exposure global brightness (of 1) by creating an empty object exposure=EXPOSURE_VALUE: where EXPOSURE_VALUE is your desired brightness multiplier. Crank it up for a dreamy bloom effect. This can also be added inside state groups to allow exposure to be controlled from states.

Overriding sun and ambient light colors

It's possible to attach the sun/sky color to a specific palette color (including palette cycle animations). These can also be set from inside states to control the skybox lighting dynamically.

Controlling where avatars spawn

By default avatars will spawn in a random location near the center of your space. However if you prefer, you can use special objects to set locations for avatars to spawn.

Making interactive and wearable items

Turning an object into an item is much like adding other types of special objects:

Add a /type option to customize the item behavior:

Items default to 0.5 size, however you can set any scale you want using =SCALE option

Adding animations

You can also control palette cycle animations from state groups. This allows you to override any property of the cycle including its mode and color ids.

Space Interactivity with Object States

You can create states that can be toggled by avatars in your space by clicking specified objects. All objects in a specially named group will show/hide depending on if the state is active.

If you want a state to be active by default, you can add an empty object named default/state=on:STATE_NAME.

You can control whether or not the space has ground in a state by adding a ground/solid:, ground/water:, or ground/none: empty object inside a state group.

Set the default of a state to on using default/state=on:STATE_NAME.

Conditional buttons based on held items

If you want to allow a state to only be unlocked when specific items are held, you can use unlock buttons and items. These work the same as normal buttons (with all the same sub types like on, off, toggle etc) except they can only be activated when specific item types are held. The item is removed from the space when the button is triggered.

Grouping state changes together with actions

It's also possible to have buttons trigger actions instead of just toggling states.

You can also make actions that cycle through a set of states turning them on one at a time each time the action is called:

Actions can be inside of other states to make them only trigger when another state is active.

State transitions

You can add one or more effects to make state transitions more interesting. Add any of these inside of the state group:

Emoji emitters

Add emoji emitters to your space, create an empty object named emitter=EMOJI_NAME:NAME where EMOJI_NAME is the shortcode of the emoji.

You can use emitters in combination with Object States (see above) for momentary effects when a state is toggled on or off.

If the emoji aren't travelling the way you want, rotate the object and the emitter direction should follow.

Models: More control over object scaling

By default, all objects in your space will display with a 10 voxels per meter. Some special objects such as entities and items default to half that but that can be overridden using the scale parameter.

However, if you want to add higher resolution objects that are not entities or items, you can use model and instance objects to fit things exactly to a specific size.

Create a model:OBJECT_NAME object with your full resolution object, then use an instance=OBJECT_NAME: object to reference the model. Your instance object can be any size, and the model will be shrunk to fit inside the bounding box.

If you want your instance to be solid or emit light, you'll need to add voxels to the instance object. These will not be visible in the world, but their effects will be. This means you can have a high res object that still can be climbed on and emit light.

Using models to customize the skybox

You can also use model objects with the skybox object.

Entities

Entities are animatable objects in your space. They can represent characters or vehicles, animals, whatever you want. They can include movement speed, and animation frames. They're a lot like items except they can't be picked up. Instead, their positions are animated by changing states.

You can create an entity in your space by creating a group with the name entity:YOUR_ENTITY_NAME containing the following objects:

As an alternative to creating animation and frame objects, you can also just group many objects together and name the group animation:ANIMATION_NAME. Make sure that the frames do not have any name specified.

For more advanced use, you can tweak the scale of the entity by adding =SCALE_VALUE to the entity group name. e.g. entity=0.5:cool_guy for an entity that is rendered at half size.

Positioning and setting animations

Position your entities in world using target=YOUR_ENTITY_NAME:NAME_OF_TARGET objects. Position and rotate these objects where you want the entities to be.

If placed inside a state group, then toggling those states on and off will update the position of the entities. You can also set the animation to something other than default by specifying the animation name as a second value e.g. target=YOUR_ENTITY_NAME,ANIMATION_NAME:NAME_OF_TARGET, or add a third value representing an animation to play when entity is moving e.g. target=ENTITY_NAME,MOVEMENT_ANIMATION,TARGET_ANIMATION:.

By default target will also set the position and rotation, but if you just want to set the animation of an already positioned entity inside of a given state, you can use target/animation=ENTITY_NAME,ANIMATION_NAME:

Entity behaviors

You can customize the way the entity behaves by adding named behaviors. These can be added directly inside the entity group as empty objects named behavior:BEHAVIOR_NAME e.g. behavior:billboard to always face the camera.

Here are a list of the currently supported behaviors:

If you want a behavior to only be active for a specific animation, you can use the animation group and add specific behaviors inside the group.

Linking an entity to a performer

It's possible to link an entity directly to a performer so that the performer can chat and control the entity from the Performer View. This is done when adding the performer and selecting "Link To Entity" option.

When this is enabled (and the performer is live), all of the entity's animations will be listed in the Performer View and can be switched at will.

It's also possible to expose other states to be toggled directly by the performer by adding any number of performer-state:STATE_NAME empty object directly inside of the entity group (where STATE_NAME is the name of the state group you want to allow the performer to toggle). These will then also show up as checkboxes in the Performer View.

Optimizing your space

And then you can create portal zones to join multiple zones together:

Customize collisions, climbable surfaces and other special object types

You can also do some more advanced stuff with zones

Make an empty object to cover the area where you want to affect. then name it zone/

You can also put these zones inside state groups to allow them to be turned off and on.