[x3d-public] aopt options for SRC conversions

Don Brutzman brutzman at nps.edu
Fri Oct 13 09:17:29 PDT 2017


@Web3dConsortium had an inquiry via Twitter regarding aopt converter, in response to

	" Thomas Paviot briefs @pythonocc to #X3D CAD Working Group #X3DOM documentation, aopt/SRC binary, compare performance https://threejs.org "
	https://twitter.com/Web3DConsortium/status/817047832016220160

momo @Momo_LeCousin asked "hi i want to have info about the aopt/SRC binary could you help me just want to use aopt to export in SRC ... i don't find the right command"

Initial responses:

1.aopt online at http://doc.instantreality.org/tools/x3d_encoding_converter

2. Executable binary is included in InstantReality distribution. Under windows, "aopt.exe" on command line for help

============================================================
============================================================
C:\Program Files\Instant Reality\bin> aopt

LOG     Avalon   Init: 24/449, V2.8.0 build: R-36098 Jul 27 2016 Windows x86_64
License has no 'hub/aopt' feature!
WARNING Avalon   Unable to acquire license for feature hub/aopt
===============================================================================
  ! Unlicensed Version: limited functionality and only for non-commercial use !
===============================================================================

Command Line: C:\Program Files\Instant Reality\bin\aopt.exe
Name:        aopt (avalon optimizer; www.instantreality.org)
SYNOPSIS:    aopt [OPTION] [PARAMS] ...
DESCRIPTION: Command line tool to optimize and convert
              vrml/x3d/avalon files with different encodings
              (e.g. classic/xml/binary with/without compression)
ERROR:       Returns 0 on succes and <0 on error
              (-1: NO_PARAM, -2: INVALID_SUBCALL: -3: INVALID_DATA)
USAGE:
   -A: convert Interpolators and Routes to TimedAnimationContainer
   -B: inlines image files as data URLs into the scene
   -C: create a node in DEFed parent or (if no parent found) in all nodes of this type
   -D: Collect all leafs into a remote selection group
   -E: create a DEFS for the given types
   -F: create flatten and merged tree
   -G: Transform PrimitiveSet to BinaryGeometry, [binPath]:[gen params]:[bbox]
   -H: print osg GraphOpSeq usage
   -I: read/write backend image; input:output
   -J: print mesh statistics on full scene, optional filename for HTML output file
   -K: Transform PrimitiveSet to POPGeometry, [binPath]:[gen params]:[bbox]
   -L: print hostID to use for license
   -M: writes data to given xhtml filename for X3DOM, can be '-' for stdout
   -N: writes data to given html filename[:serverBase] for X3DOM, can be '-' for stdout
   -O: add a prefix to all node names for making them unique
   -P: deletes all PROTOs without a body
   -Q: set global parameters for following operations
   -R: runs a given script on the scene
   -S: read/write backend scene; input:output[:GraphOpSeq]
   -T: texture export path and suffix
   -U: write output without any USE
   -V: creates a viewall viewpoint
   -W: writes data to given HSI folder
   -X: defines the number of max elem per field for XML-attrib-encoding
   -Y: Externalize data to SRC files, [binPath]
   -a: set tree state to live and sync
   -b: writes data to given binary X3D filename, can be '-' for stdout
   -c: create a 'Toggler' Controller for every TimeSensor
   -d: deletes all node[s] by DEF-Name or Type[:Field:Value/[]] or [ParentType:]Type
   -e: exports the backend tree to the given fileName[:GraphOpSeq]
   -f: set Type:Field:Value for all objects
   -g: Transform PrimitiveSet to ImageGeometry, [texPath]:[gen params]:[bbox]
   -h: print usage
   -i: input url, can be '-' for stdin
   -j: Exports all url resources to a local folder
   -k: copies all textures with relative filesystem URLs into folder aopt is called from
   -l: removes leafs of the given types
   -m: attach TextureCoordinateGenerator with mode/ params
   -n: removes invalid (negative) scale from Transform nodes
   -o: deletes every extra link to the same parent
   -p: print all node types and opt count
   -q: resolves Inline nodes and merges subgraphs into scenegraph directly
   -r: create a reverse TimeSensor/ScalarInterpolator pair for every TS
   -s: Transform IndexedFaceSets to IndexedTriangleStripSets
   -t: Transform PrimitiveSet to single index IndexedTriangleSet
   -u: removes all equal (with equal field values) nodes; creates DEF/USE
   -v: writes the data to the given VRML filename, can be '-' for stdout
   -w: Replaces all matrix transform in the scene with standard transforms
   -x: writes data to given X3D filename, can be '-' for stdout
   -y: removes all TextureCoordinates if no Texture defined
   -z: write output with gzip compression
Unused Opt:
EXAMPLE:
   1) Print some information about the scene and quit
      #aopt -i foo.x3d -p
   2) Convert a vrml file to a x3d-xml file:
      #aopt -i foo.wrl -x foo.x3d
   3) Convert a x3d-xml file to a x3d-binary with compression
      #aopt -i foo.x3d -z -b foo.x3db
   4) Delete all Switch Nodes, create DEF/USE and write binary
      #aopt -i foo.wrl -d Switch -u -b foo.x3db
   5) Read a file; switch all light off; and write the file
      #aopt -i foo.x3d -f Light:on:FALSE -x foo.x3d
   6) Read/Write from pipes; create tri-strips
      #cat foo.x3d | aopt -i -:model/x3d -s -b - > foo.x3db

Error: no parameters.
============================================================
============================================================

Seems to have broad value, further responses welcome.

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list