Skip to main content

One post tagged with "verge3d"

View All Tags

Tutorial - Custom viewer based on Verge3D

ยท 3 min read
Johannes Heesterman
Lead Software Engineer @ Elfsquad

Quick overview#

Verge3D is a 3D viewer that can be used to bring your Blender, 3ds Max or Maya scene to life in the browser. For more information on how to use it, please refer to the Verge3D documentation.

Using the Elfsquad Verge3D blocks, you can easily create interactions between the Showroom and your 3D scene. An overview of the available blocks and other examples can be found on GitHub.

Installing the Elfsquad Verge3D blocks#

Plugins can be installed by unzipping the zip file inside Verge3D's puzzles/plugins directory. The default location for the plugins should be: %USERPROFILE%\verge3d_blender\puzzles\plugins.

Download the latest version here.

A list of all releases can be found here.

Setting the example scene in Verge3D#

The Elfsquad Verge3D plugin provides sample scenes for the Showroom. These can be found in the Examples directory.

If you would like to use this example scene you must setup the External application directory in the Verge3D App Manager: Verge3D App Manager

This should add a new entry to your Verge3D App Manager: Parametric Models. This is a modified version of the original Parameteric Models sample scene, that interacts with the Showroom, using the newly added Elfsquad Verge3D blocks.

A block has been added to listen to configuration updates and update the configuration model accordingly:

On configuration update sample

Update requirement actions have been added to the UI buttons to tell the configurator to update the configuration model:

On update sample

A JavasScript block has been added to trigger the On configuration update event when the scene is fully loaded:

On scene load sample

Available puzzle blocks#

As you can see in the examples, the Elfsquad Verge3D plugin provides several puzzle blocks that can be used to interact with the configurator.

Events#

On configuration update#

On configuration update block

This block is called when the configuration is updated.

Actions#

Get value by code#

Get value by code block

This block can be used to retrieve the value of a feature by its feature code.

Get value by name#

Get value by name block

This block can be used to retrieve the value of a feature by its feature name.

Update requirement by code#

Update requirement by code block

This block can be used to update the requirement of a feature by its feature code.

Setting up the Showroom#

Configuration model#

In order to fully interact with the sample Verge3D scene, we need to setup a configuration model that has 3 features: Height, Thickness, and Corners. It is important to use the same names and codes as the sample model:

Sample model

Third party visualization step#

Now we can add a step to the configuration model to display our Verge3D scene, using the following settings:

  • Type: Third party visualization
  • Third party visualization url: http://localhost:8668/ext/Examples/parametric_models/index.html
  • Send data on 'configurationUpdate': checked

Step editor

Result#

With the setup done we can open the example model in the showroom and should see the following result:

Result