This section contains the documentation of all import and export
modules of Ayam. Except for RIB export, all import and export
modules are plugins that need to be loaded into Ayam manually via
"File/Load Plugin"
, on application startup via a script,
or automatically via "File/Open"
or "File/Save as"
before possible usage.
Since Ayam 1.13 import or export plugins may also be loaded
implicitly. This means one can simply use the main menu entries
"File/Open"
and "File/Save as"
(or the corresponding
keyboard shortcuts) and specify a filename with the appropriate
extension. Ayam will automatically load the matching plugin and
open the import (or export) options dialog with the "FileName"
option already set to the filename choosen before.
Not all features of Ayam are supported in the various export options. The following table gives an overview of the supported features per file format.
Feature | RIB | OBJ | 3DMF(Apple) | DXF | 3DM(Rhino) | X3D |
Quadrics | Yes | No1 | Some4 | No2 | Some4 | Some4 |
Trimmed NURBS | Yes | Yes | Yes | No2 | Yes | Yes3 |
Parametrics | No1 | No1 | No1 | No2 | No1 | Some5 |
Curves | No | Yes | Yes | Yes | Yes | Yes |
Transformations | Yes | No | Yes | No | No | Yes |
Hierarchy | Yes | No | Yes | No | No | Yes |
Instances | Yes | No | No | No | No | Yes |
CSG | Yes | No | No | No | No | No |
Ayam Features Supported by Various Export Formats
Note that a successful export of a 3D scene to a different application
not only depends on Ayam but also on the quality of the importing
application. For instance, many applications claim to read files in the
Wavefront OBJ format but only import polygonal data or, even worse, only
triangles from such files. By default, Ayam tries to preserve as much
information as possible in the respective export format leading to the
use of NURBS in OBJ files.
Consequently, in some cases you may need to convert the NURBS objects in
the Ayam scene to polygonal geometry before export. There is a script
provided that helps you doing this ("topoly.tcl"
, see also section
Convert Everything to Polygons).
Ayam is not perfect either, as in most import options material and animation data is completely ignored.
The following table gives an overview of the file format versions supported by the various import and export plugins. Import of files from a different version should be considered unsupported.
Format | RIB | OBJ | 3DMF(Apple) | DXF | 3DM(Rhino) | X3D |
Version | 3.0 | 3.0 | 1.0 | 14 | 3.0 | 3.1 |
Supported File Format Versions Overview
The next sections document the various import and export plugins in detail.
Using the RRIB (Read RIB) plugin you may import RenderMan Interface
Bytestreams of version 3.0 into Ayam.
Start importing a RIB using the menu entry
"File/Import/RenderMan RIB"
(if this menu entry is not available, you have to load the
"rrib"
plugin using the menu entry
"File/Load Plugin"
first).
The RRIB plugin supports import of the following geometric primitives:
Furthermore, the plugin supports reading of CSG, object-instances, archives, light sources (including area-lights), arbitrary linear transformations (except shear transformations!), arbitrary RiOptions and RiAttributes, shaders (except transformation shaders and without array arguments!), (since Ayam 1.7) arbitrary primitive variables (e.g. varying or vertex), and (since Ayam 1.9) procedural objects and delayed read archives.
The RRIB plugin does not support reading of curves, implicit surfaces (blobby models) and other calls to the RenderMan Interface that are not so much useful for a RIB import like e.g. RiMakeTexture. Unsupported geometric primitives and other calls to the RenderMan Interface are silently ignored.
The RIB import may be controlled via different options:
"ScaleFactor"
, determines a global scale factor to be applied
to all imported objects."ReadFrame"
, specifies the number of the frame in the RIB
to read. A value of -1 means, all frames are to be read. If you specify
a frame number and this frame does not show up in the RIB as
"FrameBegin <yournumber>"
nothing will be
imported!"ReadCamera"
: if this is switched on, a Camera object will
be created when the RIB plugin encounters a "WorldBegin"
. You may drag
this camera object onto a perspective View object in Ayam after import
to see through the camera of the imported RIB."ReadOptions"
, controls, whether RiOptions are
to be imported from the RIB to the scene. Note that those
RiOptions will overwrite the current global settings in the Ayam scene."ReadLights"
, if this is enabled the lights from the
RIB will be imported."ReadMaterial"
, controls, whether material objects
are to be created for the imported objects. All material objects
are created in a special level named "Materials"
in the top level
of the scene. The plugin tries to keep the number of generated
material objects as low as possible by comparing with already
existing materials in this level. This also works with material
objects that exist before the RRIB plugin is invoked (as long as
they reside in this special level)."ReadPartial"
, this option is useful if you want to
import partial RIBs (e.g. archives) that do not
contain a "WorldBegin"
.
Be careful with this option (i.e. use it only if reading of a RIB fails),
as it switches reading of all types of objects on, regardless of
the RIB structure."ReadSTrim"
if switched off, no simple trims (trims that only
run along the border of a NURBS patch) will be imported."RescaleKnots"
allows to rescale the knot vectors of
NURBS patches and trim curves so that the distances between different
knots are not smaller than the given value. Using a value of 1.0e-04 leads
to NURBS that may be safely drawn using GLU. The default value 0.0 means
no scaling."ErrorLevel"
, this option controls how many error messages
should be printed to the Ayam console while reading the RIB. Available
values are: "Silence"
no output except for severe errors,
"Errors"
all error messages should be printed,
"Warnings"
, all error and warning messages should be printed,
and finally "All"
all messages, even informative,
should be printed.
Note that in the case of serious syntactic errors of the RIB file
more informative error messages are printed to the stderr channel
of Ayam (which is not redirected to the Ayam console).Note that for NURBS patches and bicubic patch meshes, points of type "P" will be promoted to "Pw". Trimming of NURBS patches by clamping the knot ranges is not supported (however, since Ayam 1.9 UMM/VMM tags will be created, that contain the new knot minimum and maximum values).
Furthermore, objects of type (general) polygon and polygon mesh will be promoted to general polygon meshes.
Object-instances are resolved to normal objects while importing. Instances may be easily created again using Automatic Instancing (see section Automatic Instancing).
Procedural objects will not be evaluated, instead, RiProc objects will be created, that carry all arguments and create the same sequence of RIB requests upon export as was read upon import.
RenderMan Interface Bytestream (RIB) export is the most important export module of Ayam and in fact justifies its existence. All features of the Ayam object and scene structure are supported (hierarchy, CSG, instances, materials, lights). Furthermore, Ayam also supports direct rendering from view windows, rendering in multiple passes for shadow maps, and permanent previews (where a RenderMan renderer is directly coupled to an Ayam view window).
The documentation on RIB export is spread over the Ayam documentation, this section gives some general information and otherwise just points to the real documentation sections.
RIB export is always available, it does not need a plugin to be loaded.
The corresponding main menu entry is "File/Export/RenderMan RIB"
and the corresponding keyboard shortcut is <Ctrl+E>
.
To control the RIB export and rendering, many options exist that are
documented in section
RIB export preferences.
There are also some special ways to export RIBs available in the
main menu: "Special/RIB-Export"
; this is documented in
section
Special Menu.
Ayam can not only export scenes as RIB but also call various RenderMan renderers to directly render the exported RIB files to the screen or to an image file. Documentation on how to export/render directly from a view window can be found in section The View Menu.
RIB export is also possible using the scripting interface, see section The Tcl Scripting Interface.
In older versions of Ayam, Mops scenes could be imported using the main
menu entry: "File/Import Mops"
. Since Ayam 1.13 Mops import is
a plugin named "mopsi"
. After loading the plugin, Mops scenes
may be imported using the main menu entry "File/Import/Mops"
.
Ayam is able to import most elements of a Mops scene except for
RiAttributes attached to arbitrary geometric objects,
because attributes and shaders are managed by material objects in Ayam.
However, if a Mops object has a surface or displacement shader,
a material object with the shaders from the Mops object
and its RiAttributes will be automatically created and linked with
the geometric object while importing. Only Mops objects
with surface or displacement shaders are considered because
otherwise a material object would have to be created for every
imported Mops object.
The material objects are named "mat0"
, "mat1"
and so on.
Make sure, that the current scene in Ayam does not contain material
objects with those names, otherwise Mops import will not be able to
create material objects for the scene to import.
The import options "ResetDM"
and "ResetST"
control,
whether GLU display mode and tolerance settings (see sections
NCurveAttr,
and
NPatchAttr
for more information about display mode and tolerance) of NURBS primitives
should be reset to using global preference values (the default in Ayam)
instead of using the values from the Mops scene file.
The "dxfio"
plugin allows to import AutoCAD DXF (drawing exchange
format) files into Ayam with the help of the Dime library (from Systems in
Motion, Kongsberg SIM AS, Norway).
Start importing a DXF file using the main menu entry
"File/Import/AutoCAD DXF"
(if this menu entry is not available, you have to load the
"dxfio"
plugin using the menu entry
"File/Load Plugin"
first).
Note that the entire DXF file is read into memory before any geometry is created.
The DXF import supports reading of the following DXF entities: 3DFACE, ARC, CIRCLE, ELLIPSE, LINE, SOLID, TRACE, BLOCK, INSERT, POLYLINE, LWPOLYLINE, and SPLINE. Entities not listed here will be silently ignored.
3DFACE entities are imported as PolyMesh objects if either only the first three points are unique (the entity describes a triangle) or the face is planar else as BPatch objects.
ARC, CIRCLE, and ELLIPSE entities will be read as NCircle objects with
corresponding "TMin"
, "TMax"
parameters (for arcs and ellipses)
and scale transformation values (for ellipses) set.
POLYLINE entities are completely supported:
LINE, LWPOLYLINE, and SPLINE entities will be imported as NURBCurve objects.
SOLID and TRACE entities are imported as BPatch objects.
BLOCK and INSERT entities will be converted to appropriate master (referenced) and instance objects (references).
Bulges and extrusions are not supported.
The DXF import may be controlled via different options:
"FileName"
is the path and name of the DXF file to import."ReadCurves"
if this is disabled, no freeform curves will
be imported."ScaleFactor"
allows to apply a scaling factor to all
imported objects."ReadLayers"
:
By default, all entities from all layers will be imported.
Using the "ReadLayers"
import option, a single layer or a range
of layers may be selected for import."RescaleKnots"
allows to rescale the knot vectors of imported
NURBS curves so that the distances between different knots are not smaller
than the given value. Using a value of 1.0e-04 leads to NURBS that may be
safely drawn using GLU. The default value 0.0 means no scaling."ErrorLevel"
: controls how many messages will be printed
to the Ayam console while importing. Available
values are: "Silence"
no output except for severe errors,
"Errors"
all error messages should be printed,
"Warnings"
, all error and warning messages should be printed,
and finally "All"
all messages, even informative,
should be printed."Progress"
: displays the progress of the import;
from 0 to 50 percent, Dime is reading the DXF file; from 50 to 100 percent,
the dxfio plugin is converting the DXF entities to Ayam objects.The "dxfio"
plugin allows to export Ayam scenes to AutoCAD DXF
(drawing exchange format) files with the help of the Dime library
(from Systems in Motion, Kongsberg SIM AS, Norway).
Start exporting to a DXF file using the main menu entry
"File/Export/AutoCAD DXF"
(if this menu entry is not available, you have to load the
"dxfio"
plugin using the menu entry
"File/Load Plugin"
first).
Note that the entire Ayam scene is converted to a corresponding DXF model in memory before it is written to the DXF file.
Ayam only creates entities of type POLYLINE and SPLINE and misses very much information that could be saved to other formats (e.g. normals and texture coordinates). Therefore, the DXF export format should be avoided if possible.
The export functionality of the dxfio plugin currently covers
export of all boxes, quadrics, NURBS, PolyMeshes, instances, clones, script
objects (of type "Create"
or "Modify"
), and objects that
may be converted to NURBS curves or surfaces or to PolyMeshes.
However, all boxes and quadrics will always be converted to NURBS surfaces
and NURBS surfaces will be tesselated to PolyMeshes for export.
The scene hierarchy and CSG operations are fully ignored, all objects will be written as if combined by the union operator.
All transformations will be applied to the control points of the exported objects.
PolyMesh objects will be exported to POLYLINE (subtype PolyFaceMesh) entities. If a PolyMesh object contains faces with holes or with more than four points, it will be tesselated for export. Eventually existing normals will not be exported.
NURBS curves will be exported as SPLINE entities.
Instance objects are resolved for export.
Light sources, as well as Cameras, Views, and Materials are not exported.
Clamping the knot ranges of NURBS curves or surfaces via UMM/VMM tags is not supported. Texture coordinates will not be exported.
The DXF export may be controlled via different options:
"FileName"
is the path and name of the DXF file to export to."ScaleFactor"
allows to apply a scaling factor to all
exported objects."WriteSelected"
: exports only the selected objects. "ObeyNoExport"
: ignores all objects with "NoExport"
tags. "IgnoreHidden"
: ignores all hidden objects."WriteCurves"
if this is disabled, no freeform curves will
be exported."TopLevelLayers"
controls whether the top level Level
objects in the Ayam scene to be exported should be interpreted as layers.
If this option is enabled, all objects in these levels will be placed on
the respective layer. Objects that are not in one of those levels
will be written to the default layer. Furthermore, top level object names
will become layer names."Progress"
: displays the progress of the export;
from 0 to 50 percent, the dxfio plugin is converting the Ayam objects
to DXF entities; from 50 to 100 percent, Dime is writing the DXF file.Since Ayam 1.8.3 a Wavefront OBJ (version 3.0) import facility is available
and since Ayam 1.13 it is a plugin (objio) that needs to be loaded
before import.
The corresponding main menu entry is "File/Import/Wavefront OBJ"
(if this menu entry is not available, you have to load the "objio"
plugin using the menu entry "File/Load Plugin"
first).
Wavefront OBJ import supports reading of polygonal faces with vertex normals and texture coordinates (the latter are read as primitive variable tags) and freeform curves and surfaces (NURBS) with trim curves and with texture coordinates (again read as primitive variable tags).
Freeform curves and surfaces of basis type bmatrix, cardinal and taylor are currently not supported. Also, import of special curves and points (e.g. curve on surface) is currently not supported. Furthermore, trimming of freeform curves and surfaces by clamping their knot ranges is not supported (however, since Ayam 1.9, UMM/VMM tags will be created, that contain the new knot minimum and maximum values). No material and grouping information will be imported. Unsupported statements will be silently ignored.
Wavefront OBJ import expects the file to be syntactically correct. The plugin is not very good in detecting and reporting errors. If the import fails, use third party tools first (e.g. a demo version of Okino Graphics PolyTrans(R)), to check whether the Wavefront OBJ file is valid at all.
Furthermore, note that the objio plugin supports Wavefront version 3.0 syntax only, files that use older syntax will not be imported correctly.
The following options control the Wavefront OBJ import process:
"FileName"
is the name of the Wavefront OBJ file (version 3.0)"MergeFaces"
controls, whether consecutive polygonal
faces should be merged into a single PolyMesh object for import."MergePVTags"
controls, whether the PV tags of PolyMesh
objects should be merged as well if they are subject to automatic
merging (see above)."ReadCurves"
if this is disabled, no freeform curves will
be imported. This option does not influence reading of trim curves!"ReadSTrim"
if switched off, no simple trims (trims that only
run along the border of a NURBS patch) will be imported."RescaleKnots"
allows to rescale the knot vectors of
NURBS curves, patches, and trim curves so that the distances between different
knots are not smaller than the given value. Using a value of 1.0e-04 leads
to NURBS that may be safely drawn using GLU. The default value 0.0 means
no scaling."ScaleFactor"
allows to apply a scaling factor to all
imported objects."STagName"
controls the name of the PV tag to be used
for the s component of the texture coordinates, and"TTagName"
controls the name of the PV tag to be used
for the t component of the texture coordinates (see also section
PV (Primitive Variable) Tag)."Progress"
: displays the progress of the import;
from 0 to 100 percent, the objio plugin is reading lines from the
Wavefront OBJ file and creating Ayam objects.Since Ayam 1.7, it is possible to export scenes or objects to the Wavefront
OBJ format (version 3.0). Since Ayam 1.13, Wavefront OBJ export is a plugin
(objio) that needs to be loaded before export.
The corresponding main menu entry is "File/Export/Wavefront OBJ"
(if this menu entry is not available, you have to load the "objio"
plugin using the menu entry "File/Load Plugin"
first).
The Wavefront export currently supports the following objects:
Since the Wavefront OBJ format does not support separate transformation attributes, all transformation attributes will be used to transform the coordinate values (the control points) of the exported objects. The hierarchy of the Ayam scene will be squashed. CSG operations are fully ignored, all objects will be written as if combined by the union operator.
The Wavefront OBJ export, currently, ignores all material information. Only the pure geometry information is written to the OBJ file. Since Ayam 1.8.3, however, texture coordinates from primitive variable tags can be exported. Since Ayam 1.9, UMM/VMM tags are used to trim the knot vectors of exported NURBS objects.
The following parameters control the Wavefront OBJ export:
"FileName"
is the filename of the Wavefront OBJ file;"WriteSelected"
exports only the currently selected object(s);"TessPoMesh"
automatically tesselates all PolyMesh objects
to triangles for export;"WriteCurves"
toggles writing of NURBS curves and NURBS
curve providing objects to the exported file (This option does
not influence the export of trim curves.);"ScaleFactor"
allows to apply a scaling factor to all
exported objects;"STagName"
controls the name of the PV tag to be used
for the s component of the texture coordinates, and"TTagName"
controls the name of the PV tag to be used
for the t component of the texture coordinates (see also section
PV (Primitive Variable) Tag)."Progress"
: displays the progress of the export;
from 0 to 100 percent, the objio plugin is writing the Ayam objects
to the Wavefront OBJ file.Using the MFIO plugin you may import scenes from the 3DMF format
(QuickDraw 3D Metafile)
from Apple with the help of a free 3DMF parser created
by Duet Development Corp. and distributed by Apple.
Start importing a 3DMF file using the menu entry
"File/Import/Apple 3DMF"
(if this menu entry is not available,
you have to load the "mfio"
plugin using the menu entry
"File/Load Plugin"
first).
The MFIO plugin only supports the 3DMF version 1.0!
The MFIO plugin supports the following geometric primitives:
The following transformations are supported:
The following parameters, additionally, control the 3DMF import:
"FileName"
is the filename of the 3DMF file to import;"ScaleFactor"
:
The "ScaleFactor"
option allows to apply a scaling factor to all
imported objects."ReadCurves"
:
If the "ReadCurves"
import option is switched off, no curves will be
imported. This option does not influence the import of trim curves."ReadSTrim"
if switched off, no simple trims (trims that only
run along the border of a NURBS patch) will be imported."RescaleKnots"
allows to rescale the knot vectors of
NURBS curves, patches, and trim curves so that the distances between different
knots are not smaller than the given value. Using a value of 1.0e-04 leads
to NURBS that may be safely drawn using GLU. The default value 0.0 means
no scaling.Using the MFIO plugin you may export scenes to the 3DMF format
(QuickDraw 3D Metafile)
from Apple with the help of a free 3DMF parser created by Duet
Development Corp. and distributed by Apple. Start exporting to a
3DMF file using the menu entry "File/Export/Apple 3DMF"
(if this menu entry is not available, you have to load the "mfio"
plugin using the menu entry "File/Load Plugin"
first).
The MFIO plugin only supports the 3DMF version 1.0!
The MFIO export supports the following geometric objects:
Objects of types not listed here will be converted to NURBS (if possible) or to PolyMesh objects automatically for export.
All transformations are supported and will be written as Translate, Rotate, and Scale transformations, respectively.
All Instance objects will be resolved for export. Level objects (regardless of type) will be written as Container objects.
If an object has a material, the color and opacity of the material will be written as DiffuseColor and TransparencyColor, if the respective red color component has a value different from -1.
Support for export of lights, camera attributes as well as material attributes other than material color and opacity is currently not available.
The following parameters, additionally, control the 3DMF export:
"FileName"
is the filename of the 3DMF file to export;"WriteBinary"
: This option controls whether the text version
or the binary version of the 3DMF file format should be used for export."ScaleFactor"
:
The "ScaleFactor"
option allows to apply a scaling factor to all
exported objects."WriteSelected"
: exports only the selected objects."WriteCurves"
: If the "WriteCurves"
option is disabled,
no curves will be written to the exported Rhino file. This option does
not influence the export of trim curves.Since version 1.8.2 Ayam contains a plugin named onio that may import scenes from the Rhino 3DM file format using the OpenNURBS toolkit (hence the name of the plugin onio - OpenNURBS IO) by Robert McNeel & Associates.
Start importing from a Rhino 3DM file using the menu entry
"File/Import/Rhino 3DM"
(if this menu entry is not available, you have to load the
"onio"
plugin using the menu entry
"File/Load Plugin"
first).
The import functionality of the onio plugin currently covers import of all NURBS and BRep objects and objects that may be converted to NURBS using the OpenNURBS toolkit (those are: PolylineCurve, PolyCurve, LineCurve, ArcCurve, CurveOnSurface, RevSurface, SumSurface, and PlaneSurface). References will be resolved. Names will be imported, but converted to an ASCII representation. Since Ayam 1.8.3 Mesh objects will be imported to PolyMesh objects, texture coordinates will be read and appropriate PV tags will be created for them.
The onio plugin only supports import of 3DM files of version 3.0 and earlier.
The 3DM import process is controlled by the following options:
"ScaleFactor"
:
The "ScaleFactor"
option allows to apply a scaling factor to all
imported objects."Accuracy"
:
The "Accuracy"
import option controls the tolerance
of OpenNURBS internal operations, in this case the value is
mostly used for conversion operations to the NURBS form."ReadCurves"
:
If the "ReadCurves"
import option is switched off, no curves will be
imported. This option does not influence the import of trim curves."ReadLayers"
:
By default, all objects from all layers will be imported.
Using the "ReadLayers"
import option, a single layer or a range
of layers may be selected for import."ReadSTrim"
:
Another import option is "ReadSTrim"
. This useful to
ignore simple bounding trim loops of NURBS surfaces if they are the
only trim loop for that surface.
Importing this single bounding trim loop would just make the Ayam scene
more complex than needed in many cases.
This option replaces the "IgnoreFirstTrim"
import option
available before Ayam 1.13 with slightly different semantics."RescaleKnots"
allows to rescale the knot vectors of
NURBS curves, patches, and trim curves so that the distances between different
knots are not smaller than the given value. Using a value of 1.0e-04 leads
to NURBS that may be safely drawn using GLU. The default value 0.0 means
no scaling. Since Ayam 1.13 trim curves will be scaled properly to
the new knot ranges of NURBS patches."STagName"
controls the name of the PV tag to be used
for the s component of the texture coordinates, and"TTagName"
controls the name of the PV tag to be used
for the t component of the texture coordinates (see also section
PV (Primitive Variable) Tag)."Progress"
: displays the progress of the import;
from 0 to 50 percent, OpenNURBS is reading the 3DM file into memory;
from 50 to 100 percent, the onio plugin is converting the 3DM objects
to Ayam objects.Since version 1.8.2 Ayam contains a plugin named onio that may export scenes to the Rhino 3DM file format using the OpenNURBS toolkit (hence the name of the plugin onio - OpenNURBS IO) by Robert McNeel & Associates.
Start exporting to a Rhino 3DM file using the menu entry
"File/Export/Rhino 3DM"
(if this menu entry is not available, you have to load the
"onio"
plugin using the menu entry
"File/Load Plugin"
first).
The export functionality of the onio plugin currently covers
export of all boxes, quadrics, NURBS, instances, clones, script
objects (of type "Create"
or "Modify"
) and objects that
may be converted to NURBS curves or surfaces.
Even though export of planar cap surfaces of various
tool objects is supported, the export of general trimmed NURBS
patches is not well supported. This is because of a missing feature
(pushing up 2D trim curves to 3D curves for arbitrary NURBS
surfaces) in the OpenNURBS toolkit. Since Ayam 1.9, a coarse
polygonal 3D representation of the 2D trim curves will be
created automatically, so that now general trimmed NURBS patches
may be exported, albeit with lower quality and bigger file size
as would be necessary.
Since Ayam 1.9, UMM/VMM tags are used to trim the knot vectors of
exported NURBS objects.
Since Ayam 1.8.3, also PolyMesh objects may be exported.
Since the Rhino 3DM file format does not support hierarchy and
transformation attributes per object, the hierarchy of the Ayam scene
will be squashed and all transformation attributes will be applied to
the control points of the objects for export. CSG operations are fully
ignored, all objects will be written as if combined by the union operator.
Furthermore, all instance objects will be resolved to normal objects. All
objects will be written to the first layer, the default layer (unless the
"TopLevelLayers"
option is used). Object names will be written
as well. Names of level objects will be prepended to the names of their
child objects. The object hierarchy:
+-Arm(Level) | MySphere(Sphere) \ MyCylinder(Cylinder)
"Arm/MySphere"
and "Arm/MyCylinder"
.
The 3DM export process is controlled by the following options:
"ScaleFactor"
:
The "ScaleFactor"
option allows to apply a scaling factor to all
exported objects."Accuracy"
:
The "Accuracy"
option controls the tolerance of internal
OpenNURBS operations (currently those are:
pushing up 2D trim curves to 3D curves and
checking NURBS surfaces for planarity)."WriteSelected"
: exports only the selected objects. "ObeyNoExport"
: ignores all objects with "NoExport"
tags. "IgnoreHidden"
: ignores all hidden objects."WriteCurves"
: If the "WriteCurves"
option is disabled,
no curves will be written to the exported Rhino file. This option does
not influence the export of trim curves."QuadAsBRep"
: If the "QuadAsBRep"
option is enabled
spheres, cylinders, cones, and torii will not be exported as collection
of NURBS surfaces (as converted by Ayam) but as BRep objects (as converted
by the OpenNURBS toolkit).
However, not all features of the quadric objects will be translated in
this case:
The BRep sphere does not support ZMin, ZMax, and ThetaMax.
The BRep cylinder does not support ThetaMax (base caps will
be created if the cylinder is closed).
The BRep cone does not support ThetaMax (a base cap will be
created, if the cone is closed).
The BRep torus does not support PhiMin, PhiMax, and ThetaMax.
The "QuadAsBRep"
option has no effect on the export of disks,
hyperboloids, and paraboloids. Those will always be exported as NURBS
surfaces."TopLevelLayers"
controls whether the top level Level
objects in the Ayam scene to be exported should be interpreted as layers.
If this option is enabled, all objects in these levels will be placed on
the respective layer. Objects that are not in one of those levels
will be written to the default layer. Furthermore, top level object names
will become layer names."STagName"
controls the name of the PV tag to be used
for the s component of the texture coordinates, and"TTagName"
controls the name of the PV tag to be used
for the t component of the texture coordinates (see also section
PV (Primitive Variable) Tag)."Progress"
: displays the progress of the export;
from 0 to 50 percent, the onio plugin is converting the Ayam objects
to 3DM objects; from 50 to 100 percent OpenNURBS is writing the 3DM file.Since version 1.13 Ayam contains a plugin named "x3dio"
that may
import scenes from the XML based X3D file format published by the Web3D
Consortium. The XML parser used in this plugin is based on Expat and SCEW.
Binary and compressed versions of X3D, as well as VRML files are not
supported! Only pure XML files are read by the "x3dio"
plugin.
Start importing from a Web3D X3D file using the menu entry
"File/Import/Web3D X3D"
(if this menu entry is not available, you have to load the
"x3dio"
plugin using the menu entry
"File/Load Plugin"
first).
The import functionality of the "x3dio"
plugin currently covers
import of the following X3D elements:
Cylinders with just one cap are imported as two objects (a Cylinder and
a Disk). In all other cases and also for Cones, the "Closed"
attribute of the Ayam object is set according to the cap information of
the X3D element.
ElevationGrids are imported as bilinear patch meshes.
Arcs and Circles are imported as NCircle objects. Closed arcs and Polylines are imported as NURBS curves. Disks with an inner radius > 0.0 are imported as flat Hyperboloids (otherwise as Disks).
CADLayer objects will be imported as top level level objects. CADAssembly and CADPart objects will be imported as level objects.
The lights will be directly mapped to the standard RenderMan
light sources distant, point, and spot, respectively.
Therefore, the "radius"
and the "attenuation"
attributes
of point and spotlights are not supported. However, point and spotlights
still have a quadratic falloff with distance.
Viewpoint elements will be imported as view objects (with corresponding
view window) or camera objects depending on the "ReadViewports"
import option.
Shear transformations are not supported.
The semantics for inlining are not fully standards compliant.
By default, DEFs in inlined files always live in their own namespace
unless the "MergeInlineDefs"
import option is switched on.
This option completely merges all DEF namespaces into
one big namespace. Beware, this only works correctly, if the DEF
names in all the files are unique.
It is not possible to transfer single definitions from an inlined file
to the inlining file or from the inlined file to the inlining file.
Also note: Inline URLs that do not point to the file system are not supported.
Unsupported X3D elements will be silently ignored. Prototyping and dynamic scenes as well as scripts are not supported.
Shape elements that contain more than one geometric elements as child objects will be imported as level objects with the child objects using the default transformations and the level object using the current transformation attributes.
The "solid"
, "ccw"
, and "convex"
attributes are always ignored.
The "DEF"
and "USE"
attributes are supported for all
elements, however, the corresponding master-instance relationships are
completely resolved upon import.
Instances of objects may be easily created again using Automatic Instancing
(please refer to section
Automatic Instancing).
The "DEF"
attributes may be converted to object names.
The following options further control the X3D import process:
"FileName"
is the name of the X3D file to be imported"ReadCurves"
if this is disabled, no freeform curves will
be imported. This option does not influence reading of trim curves!"ReadViewpoints"
controls whether viewpoints should
be read as view, camera, or not at all."ReadSTrim"
if switched off, no simple trims (trims that only
run along the border of a NURBS patch) will be imported."RescaleKnots"
allows to rescale the knot vectors of
NURBS curves, patches, and trim curves so that the distances between different
knots are not smaller than the given value. Using a value of 1.0e-04 leads
to NURBS that may be safely drawn using GLU. The default value 0.0 means
no scaling."ScaleFactor"
allows to apply a scaling factor to all
imported objects."STagName"
controls the name of the PV tag to be used
for the s component of the texture coordinates, and"TTagName"
controls the name of the PV tag to be used
for the t component of the texture coordinates (see also section
PV (Primitive Variable) Tag)."ErrorLevel"
, this option controls how many error messages
should be printed to the Ayam console while importing. Available
values are: "Silence"
no output except for severe errors,
"Errors"
all error messages should be printed,
"Warnings"
, all error and warning messages should be printed,
and finally "All"
all messages, even informative,
should be printed."Progress"
: displays the progress of the import;
from 0 to 50 percent, the x3dio plugin is reading the XML file,
from 50 to 100 percent the x3dio plugin is creating Ayam objects.Since version 1.13 Ayam contains a plugin named x3dio that may export scenes to the XML based X3D file format published by the Web3D Consortium. The XML parser used in this plugin is based on Expat and SCEW.
Start exporting to a X3D file using the menu entry
"File/Export/Web3D (X3D)"
(if this menu entry is not available, you have to load the
"x3dio"
plugin using the menu entry
"File/Load Plugin"
first).
The export functionality of the x3dio plugin currently covers
export of all boxes, quadrics, NURBS, PolyMeshes, instances, clones, script
objects (of type "Create"
or "Modify"
) and objects that
may be converted to NURBS curves or surfaces or to PolyMeshes.
The scene hierarchy (level objects) will be converted to a
matching transform node hierarchy.
CSG operations are fully ignored, all objects will be written as if combined by the union operator.
Clamping the knot ranges of NURBS via UMM/VMM tags is not supported.
PolyMesh objects will be exported to IndexedFaceSet nodes.
PolyMesh faces with holes are tesselated. PolyMesh faces with more
than three points are tesselated if the export option "TessPoMesh"
is used.
All tesselated faces will be exported to a second IndexedFaceSet
element.
Light sources are exported if they are point, distant, or spot lights.
Cameras and Views are exported as Viewpoint nodes. Note however, that
X3D always assumes a perspective viewing transformation. This means,
views of type "Front"
, "Side"
, or "Top"
will not be
exported properly.
Object names will be converted to DEF attributes.
The following parameters, additionally, control the X3D (Web3D) export:
"FileName"
is the filename of the X3D file;"WriteSelected"
exports only the currently selected object(s);"TessPoMesh"
automatically tesselates all PolyMesh objects
to triangles for export;"WriteCurves"
toggles writing of NURBS curves and
NURBS curve providing objects to the exported file (This option does
not influence the export of trim curves.);"ScaleFactor"
allows to apply a scaling factor to all
exported objects;"STagName"
controls the name of the PV tag to be used
for the s component of the texture coordinates, and"TTagName"
controls the name of the PV tag to be used
for the t component of the texture coordinates (see also section
PV (Primitive Variable) Tag)."Progress"
: displays the progress of the export;
from 0 to 50 percent, the x3dio plugin is creating a XML document
in memory and from 50 to 100 percent this document will be written
to the file.