Notice that the light object is a pointlight with no possibility to change any of its lightning parameters. The parameter is the object type - one of: world, poly, group and light. The end of the object section must be a 'kids' line which indicates how many children objects (may be zero) follow.
The parameter is an integer which specifies the number of characters (starting on the next line) to be read, newlines can be used also. Usually contains an description or notes about a material. The materials are usually all specified at the start of the file, immediately after the header. The first "MAT" in the file will be indexed as zero. These are referenced by the "mat" token of a surface. MAT (name) rgb %f %f %f amb %f %f %f emis %f %f %f spec %f %f %f shi %d trans %f data %d lines of data ENDMAT The first "MATERIAL" in the file will be indexed as zero. MATERIAL (name) rgb %f %f %f amb %f %f %f emis %f %f %f spec %f %f %f shi %d trans %f Rgb - diffuse color amb - ambient color emis - emissive color spec - specular spot color shi - specular spot size (higher number means smaller spot) trans - transparency Materials are defined differently in AC3Db and AC3Dc. MATERIAL %s rgb %f %f %f amb %f %f %f emis %f %f %f spec %f %f %f shi %d trans %f (used in AC3Db) MAT %s (this block used in AC3Dc) rgb %f %f %f amb %f %f %f emis %f %f %f spec %f %f %f shi %d trans %f data %d lines of data ENDMAT OBJECT %s *name %s *data %d *data lines of %s *texture %s *texrep %f %f *texoff %f %f *subdiv %d *crease %f *rot %f %f %f %f %f %f %f %f %f *loc %f %f %f *url %s *hidden *locked *folded *numvert %d numvert lines of %f %f %f *numsurf %d *SURF %d *mat %d refs %d refs lines of %d %f %f kids %d The indentation is used to show the structure of the file - a real AC3D file has no indentation.
Lines beginning with a '*' indicate an optional section. %f indicates a floating point value, %d an integer and %s a string (must be surrounded by quotes " if it contains spaces). Read the header (AC3Dx) while not end of file To parse an AC3D file you need something like this:
#AC3D FILE CODE#
As new versions of the AC3D file format evolve, this number is used to make the loading code backwards compatible. If the version is later than the program knows about then it may refuse to load it. The first four characters are always 'AC3D' the next hex number following immediately defines the internal version of the file (0xb = 11). (HEADER) (Materials - the palette) (objects)Īn AC3D file always starts with a header line e.g.: AC3D filenames usually have a '.ac' suffix. Some simple examples are included at the end. This document describes the structure of AC3D files. It's also very easy to generate AC3D files from your own data. The AC3D file format is ascii text and is very simple to parse.
DWG files may not include material data.The unofficial guide to the complete Inivis AC3D fileformat specification (This document last updated 13th March 2017).SKP imports from SketchUp will include colors and models only, and exclude materials.Types with an asterisk (*) have additional notes below. The following file types are supported for import into Augment3d.