How do I export VRML from AVS/Express for use in AVS/Go?

This article will explain how to export your visualizations from AVS/Express using the VRML format and convert them into JSON for viewing online with AVS/Go.

Step 1 - Export VRML from AVS/Express

  1. Create your AVS/Express visualization as usual.

  2. Instance an OutputVRML macro from the Main - Viewers library. Connect its input port to the curr_view output port of your Viewer.

  3. In the UI for OutputVRML, select the “VRML 2” protocol and choose the filename you wish. Press “Write VRML”

Step 2 - Convert VRML to JSON

  1. Visit the online VRML to JSON converter page at: https://www.avs.com/examples/avs-go/convert-vrml-to-json/

  2. Follow the instructions to upload your VRML file from Step 1 and create your JSON file(s).

Step 3 - Display your visualizations using AVS/Go

  1. Upload the JSON file(s) you created in Step 2 to your web server. Note the full URL to the JSON file (or the first file if you created a streamed output).

    https://myserver/mydata/express.json
  2. Edit (or create) the HTML page you wish you display your visualization on. Create an <avs-go-dataviz> Web Component. Populate the ‘url’ property with the full URL to your JSON file from above. Set the ‘url-load-json-file’ property so the Web Component knows you are loading JSON from file(s).

Here is example code which imports the latest version of AVS/Go from unpkg.com:

<html> <head> <script src="https://unpkg.com/avs-go"></script> </head> <body> <avs-go-dataviz url="<full_url_to_json_file>" url-load-json-file renderer="THREEJS"> </avs-go-dataviz> </body> </html>

and here is example code which uses the URL to the file created above:

<html> <head> <script src="https://unpkg.com/avs-go"></script> </head> <body> <avs-go-dataviz url="https://myserver/mydata/express.json" url-load-json-file renderer="THREEJS"> </avs-go-dataviz> </body> </html>

 


Example:

Check out an example here at:

https://www.avs.com/examples/avs-go/interact-with-your-avs-express-visualizations-online-with-avs-go/

@Copyright 1991-2019 Advanced Visual Systems, Inc.