:orphan:

###########
VRML Reader
###########

.. rst-class:: format-title-block

+----------------------------------------------------------------------+
|                        **VRML**                                      |
+-----------------------------------------+----------------------------+
| **File Extension**                      | WRL, VRML                  |
+-----------------------------------------+----------------------------+
| **Supported Versions**                  | 1.0 and 2.0                |
+-----------------------------------------+----------------------------+
| **Platforms**                           | |wy| |ly| |my| |an| |in|   | 
+-----------------------------------------+----------------------------+
| :ref:`vrml_rd_tessellation`             | |t_green| Supported        | 
+-----------------------------------------+----------------------------+
| :ref:`vrml_rd_brep`                     | |c_grey| N/A               | 
+-----------------------------------------+----------------------------+
| :ref:`vrml_rd_pmi`                      | |c_grey| N/A               | 
+-----------------------------------------+----------------------------+

VRML (Virtual Reality Modeling Language) is a file format used to create 3D interactive scenes and objects for the web. It was developed in the 1990s to represent virtual reality environments in a standard format that could be easily shared and viewed over the internet. VRML files contain information about the geometry, appearance, and behavior of 3D objects and can include textures, colors, animations, and interactivity.

VRML files are plain text files with a *.wrl* extension. They use a hierarchical tree structure of objects (nodes) to describe a 3D scene.

The VRML Reader provides full access to the assembly, view, PMI data stored within a VRML file. The file extensions of VRML files that you can expect are:

* .VMRL
* .WRL

HOOPS Exchange geometry access for VRML includes:

* **Tessellation:** Mesh or polygonal geometry is imported directly.
* **B-rep:** Not present in this format - HOOPS Exchange treats it as tessellation only.


How to Import From VRML 
=======================

If you are new to reading models with HOOPS Exchange, see the :doc:`basic load workflow </guide/basic_operations/load_model`>` section of the Programming Guide.

To load a VRML, use :cpp:func:`A3DAsmModelFileLoadFromFile`.

Below, the ``A3DParamsLoadData`` structure is used to customize the loading behavior. See our :cpp:struct:`API reference manual <A3DParamsLoadData>` for more information about this important data type.

.. code-block:: c

   A3DAsmModelFile* pModelFile = 0;

   A3DRWParamsLoadData sReadParam = A3D_MAKE_DATA(A3DRWParamsLoadData);
   sReadParam.m_sGeneral.m_bReadSolids = true;

   // ... set other A3DRWParamsLoadData fields as necessary

   A3DAsmModelFileLoadFromFile("path/to/file.vrml", &sReadParam, &pModelFile);

See :doc:`/guide/basic_operations/load_model` for general information about loading model files.

.. _vrml_rd_tessellation: 


Tessellation
============

The triangle information along with the RGBA coloring and texture information is parsed and provided via HOOPS Exchange.

.. _vrml_rd_brep: 


B-Rep
=====

This concept is not supported by VRML.

.. _vrml_rd_pmi: 


PMI
===

This concept is not supported by VRML.


Assembly
========

This concept is not supported by VRML. However, many VRML files may contain multiple components or objects. Once loaded, HOOPS Exchange represents these as a model tree that you can traverse using the standard structure APIs.

To learn more about how HOOPS Exchange handles assemblies, see our tutorial about :doc:`assembly traversal </tutorials/c/print-assembly-structure>`.


Views
=====

This concept is not supported by VRML.

Miscellaneous
=============

Advanced Publish
****************

Advanced Publish is an authoring SDK within HOOPS Exchange that enables creation and export of rich engineering data using the PRC data model. 
It supports generating output for several supported formats, such as VRML, through file import or API-based authoring.

For more information about using Advanced Publish with this file format, refer to the Advanced Publish section of the Programming Guide :doc:`here </guide/publish/overview>`.