Objects

The puzzles from this category perform various operations with objects.

Visual programming blocks to work with 3D objects

Contents

Puzzles Reference

show

Makes a specified object, that was initially or previously hidden, visible. Also works for a list of objects, a group (or a list of groups) or with the all objects puzzle. If there is no such object(s) present in the scene, or an object is already visible, does nothing.

Show 3D object visual programming block

hide

Makes a specified object invisible. Also works for a list of objects, a group (or a list of groups) or with the all objects puzzle. If there is no such object(s) present in the scene, or an object is already invisible, does nothing.

Hide 3D object visual programming block

is visible

Checks if an object (or any of objects in a list) is currently visible. If it so, returns the logical value true, otherwise returns false. If there is no such object(s) present in the scene, returns false.

Visual programming block to check 3D object visibility

clone

Makes an object copy, generates a unique name for the new object and immediately adds it to the scene. Outputs the new object. Does not work with lists, groups or the all objects puzzle.

Clone 3D object with visual programming

For usage example, check out the Clone Object demo (source files available in the Asset Store).

create object

Creates and adds a new object to the scene. This puzzles creates objects without the need in a 3D editor, and as such is useful for learning Puzzles as well as designing primitive visuals by users with no or minimal 3D modelling skills.

Visual programming block to create various 3D objects

For geometry objects, such as boxes or teapots, this puzzle also creates white-colored dielectric glTF-compliant PBR material (with roughness value set to 1 and metalness set to 0). Use the set color and set value puzzles to tweak that material.

For plane with texture objects, this puzzle assigns a dummy checker texture to the model. Use the replace texture puzzle to change this texture.

remove object

Removes a specified object from the scene. Also works for a list of objects, a group (or a list of groups) or with the all objects puzzle. If there is no such object(s) present in the scene, does nothing.

Remove object visual scripting block

set transform

Moves, rotates or scales an object according to specified transform data. The "offset" checkbox enables moving/rotating/scaling an object relatively to the original position/rotation/scale. Any of the axis inputs can be left blank. Also works for a list of objects, a group (or a list of groups) or with the all objects puzzle.

Set 3D transformation with visual coding

Sometimes you need to input a vector (which consists of the given X, Y, Z coordinates). In this case, you can modify the puzzle by clicking on the gear icon and setting on checkbox use vector. The "world space" checkbox enables transformations in world space (does euler rotation in XYZ order), otherwise does transformations in object's space.

get transform

Retrieves the position, rotation or scale data of an object. To retrieve transformations in world space click on the gear icon and set on checkbox "world space" (retrieve euler rotation in XYZ order). Does not work with lists, groups or the all objects puzzle.

Visual programming block to get 3D object transform

change local transform

Moves, rotates or scales an object according to specified transform data in its local space. Any of the axis inputs can be left blank. Also works for a list of objects, a group (or a list of groups) or with the all objects puzzle. Sometimes you need to input a vector (which consists of the given X, Y, Z coordinates). In this case, you can modify the puzzle by clicking on the gear icon and setting on checkbox use vector.

Visual programming block to change object local transform

snap to object

Moves an object to the position of another object by copying its transform data. Also copies rotation and scale. Does not work with lists, groups or the all objects puzzle.

Snap to object visual programming block

parent

Creates a parent relation between objects, so that the first object follows position/rotation/scale of the second one. Does not work with lists, groups or the all objects puzzle.

Create object parent with visual scripting

Specify <none> as the second value to unparent the object.

Remove object parent with visual scripting

set object direction

Set an object's direction to the point/vector with X, Y, Z coordinates. The point checkbox specifies whether the X, Y, Z coordinates belong to some point in 3D space or represent a direction vector. The lock up checkbox locks the up-down axis of the object so it remains perpendicular to the horizontal surface.

Set object direction visual logic block

get object direction

Returns an object's direction vector or numeric X, Y, Z vector components.

Get object direction visual logic block

get objects from

This universal puzzle allows you to:

Get object from... visual programming block

By using the dropdown you can also filter off objects of a kind (e.g. cameras, lamps, annotations, etc).

get morph factor

Returns an object's morph target factor.

You can set a morph target by passing the name as a text. In this case, you need to modify the puzzle by clicking on the gear icon and setting on the checkbox flexible target input.

Visual programming block to get morph factor

set morph factor

Sets an object's morph target factor.

You can set a morph target by passing the name as a text. In this case, you need to modify the puzzle by clicking on the gear icon and setting on the checkbox flexible target input.

Visual programming block to set morph factor

Example:

Controlling object morphing with visual programming

See the source files of the Parametric Models demo and also this video tutorial explaining the basics of using morph target puzzles.

make object from

Create a new object by applying boolean (also called CSG or constructive solid geometry) operation on two input objects. The input objects are not affected and should be hidden/removed explicitly.

Using visual programming to perform CSG operations

Example:

Performing CSG operations without coding

Limitations:

  1. Both objects should be parented to the same object or have no parent.
  2. Multi-material objects are not supported.
  3. Objects with normal mapped materials are not not supported.

add annotation

Adds a point of interest icon to an object that a user can expand by clicking on it to see some description. Also works for a list of objects, a group (or a list of groups) or with the all objects puzzle.

Add annotation visual programming block

For example, to add an annotation to the "Cube" object with "1" as label and "This is point of interest #1" as description:

Example of HTML annotations created with visual programming

You can assign custom name for the annotation object, instead of default value, equal to the annotation label. For this you need to modify the puzzle by clicking on the gear icon and setting on the checkbox enable "name" option:

Assign object name for the annoation

The add annotation puzzle creates 2 HTML elements (for label and description) which can be styled in App Manager settings or with CSS classes.

You can also style each individual annotation by assigning and accessing its elements' ids:

HTML layout of 3D annotations

By default, an annotation obscured by some geometry is automatically closed and become semi-transparent. This behavior can be disabled by turning off the fade annotations option of the configure application puzzle.

Example of annotation fading

You can use a more low-level alternative, the bind element puzzle, instead but it won't expand upon clicking and won't be obscured by geometry.

remove annotation

Removes a previously added annotation from an object. Also works for a list of objects, a group (or a list of groups) or with the all objects puzzle.

Visual programming block to remove annotations

open annotation

Expands an annotation specified by its label.

Visual programming block to open annotations

close annotation

Closes an annotation specified by its label.

Visual programming block to close annotations

create text object

Generates a new text object according to the specified textual content and parameters.

Creating text objects with visual programming

Basic options:

with text
Generated text.
font
Font used to generate text. The following formats supported: WOFF, TTF, OTF.
size
Rendered text size in engine units (depending on the modelling suite: meters, inches, etc.).
extrude
Amount of extrusion applied to text glyphs.

Advanced options:

segments
Number of segments used to render the text. Less — better performance, more — better quality.
bevel thickness
Thickness of the text bevel.
bevel size
Size of the text bevel.
horizontal align
Horizontal text alignment.
vertical align
Vertical text alignment.

update text object

Updates mesh for a text object according to specified textual content. The text object should be created either by using the create text object puzzle or exported from the modeling suite.

Updating text objects with visual programming

This puzzle also works for a list of objects, a group (or a list of groups) or with the all objects puzzle.

get object dimension

Outputs object dimensions as numberic X, Y, Z components or as XYZ vector in either local coordinate system (with scaling applied) or world coordinate system.

Get object dimension visual programming block

In the world mode, the puzzle also works for a list of objects, a group (or a list of groups) or with the all objects puzzle.

Usage example: drawing a text label which displays current width (in centimeters) for the dynamically scaled object.

Getting object dimension example

The puzzle has some limitations. For morphed objects, it returns maximum dimensions the object can be morphed to. For skinned objects, the puzzle returns the original dimensions for the object.

distance

Outputs the distance between two specified objects. Does not work with lists, groups or the all objects puzzle.

Calculate distance between two objects with visual coding

get custom props

Returns a dictionary with custom properties assigned to an object.

Get custom props visual programming block Get custom props example

Custom properties can be assigned in Blender by using the Custom Properties panel:

Exporting custom properties from Blender

or in 3ds Max by typing properties in the Object Properties dialog:

Exporting custom properties from 3ds Max

or in Maya by using the AttributesAdd Attributes... menu in the attribute editor:

Add attributes menu in Maya Attributes in Maya

In case of Maya you need to assign additional customProperties attribute with the list of space-separated custom property names.

Assigning custom properties in Maya

outline

Applies or removes the outline effect to/from a specified object. Requires enabling the outline effect in Blender, 3ds Max or Maya. Also works for a list of objects, a group (or a list of groups) or with the all objects puzzle.

Outline 3D objects with visual coding

set shadow param

Enable/disable casting/receieving shadows for the given object. Also works for a list of objects, a group (or a list of groups) or with the all objects puzzle.

Visual logic block to set shadow params

update light probe object(s)

Updates/rerenders the reflection cubemap for the given light probe object.

Visual logic block to update light probe objects

Having Troubles with Puzzles?

Seek help on the forums!