Table of Contents

IG.GFX Archetypes

IG.GFX Archetypes is a concept to reduce the effort for the creation of complex, parametric 3D objects, by using domain-specific patterns, so-called Archtetypes. Archetypes are processed by the IG.GFX.Factory, which can be understood as a pre-processor.

Not only that Archetypes reduce the creation effort, they also improve the quality of the data (by avoiding errors), and drastically reduce lifecycle changes, such as every product gets a new leg type, etc.

Archetypes Catalog

General

Upholstery

The Factory File

The Factory File contains

Both, the global section and the includes may contain

See below for the definition of these entities.

At run-time, a global state is created by processing the Includes in the sequence as defined in the Factory file, followed by the Global section. In case of Parameters, the data will be merged. In case of all other data, later data replace earlier ones.

Domain Settings

Domain Settings are

and define the workspace the data should be sent to. It's 1:1 what you need to enter in the IG.Creator, too.

State

Another optional setting is State. If set (and valid) it will update the State of each processed Product in the IG.Creator Product Index. Allowed State values are New, Editing, Testing, WIP and Done. (Factory 1.3.1)

Note, State Done is required for external import jobs. Otherwise, the Product will be ignored.

State is only implemented on Factory file level, thus no product level, no includes.

The Products

The Products dictionary defines a set of products. The key is the product id/name to appear in the IG.Creator, e.g. Product Index.

Basic Settings

The basic entries for each key are

Parameters

The parameters parameterize the Archetype. The final set of parameters is compiled from the included parameters, the global parameters and the product's parameters, where compilation means that all parameters will be collected, but later parameters override existing ones that have the same key.

The parameters are defined in the Archetype sheets. There're optional and required parameters.

Properties

For each product, a set of properties can be provided. There is no inheritance or compilation of Properties, as for Parameters, etc., but you can define a Master product and provide some properties there, which are then shared with all Products.

More on this can be found in the IG.Creator Wiki: Mapping of Commercial Properties.

Interactors

Interactors define interaction behaviors on components of the product. Each interactor entry key is a component path, however references are allowed. The interactor parameters are defined by the corresponding interactor type. Additionally the parameter Type must provide the fully-scoped interactor type name.

There can only be one set of interactors for a Product. So previous interactor definitions will be replaced but not merged as Parameters.

Evaluators

Evaluators define construction scripts on components of the product. Each evaluator entry key is a component path, however references are allowed. The evaluator parameters are defined by the corresponding evaluator type. Additionally the parameter Type must provide the fully-scoped evaluator type name.

There can only be one set of evaluator for a Product. Before Factory 1.3.1, previous evaluator definitions will be replaced but not merged as Parameters. Since version 1.3.1 Evaluators will be merged in the same way as Parameters (see above).

Attachment Points

Optional array of attachment points according to IG.GFX attachment point definition.

Modifications

Modifications (Mods) have been introduced with Factory, Version 1.3.

Imagine you’re a happy with an Archetype but only by 99.95% - meaning there’s one damned little detail you want to modify - such as a Leg that rotates depending on n’borship relation - or whatever…

Without Mods you can of course change this in the IG.Creator after processing the Archetypes with the Factory. However, the next processing would override your changes, so they’re lost!

With Mods you can add this to your input JSON file and they will be generated each time during the processing.

Misc

Numbers

Float numbers can be provided directly or in expressions, in any case scientific notation must be used. Expressions must be embedded with curly brackets and also double quotation marks (to make it valid JSON syntax). In contrast to this, in the IG.Creator, e.g. Products/Graphical/Structure, expressions don't get quotation!

Examples:

References

Using the geometry attribute # you can setup a symbolic reference to the component path that is created in the Factory then. This symbolic name may then be used in interactor definitions, for instance. Note, when interactor parameters start with # it's also tried to substitute them with a component path. This is useful for object references. So, if there's a valid reference for an interactor parameter starting with #, it will be replaced by the corresponding component path. Otherwise, it will be passed 1:1 to the database, including the # sign.

The references of upholstery Legs are created automatically! It's either #Leg-LF, LB, RF, RB or #Leg-<No> where No starts at 1. The Leg reference is added to the component description for easy access.

Parent

Using the optional geometry attribute Parent you can assign attributes, for instance the # reference, to intermediate components that are normally not accessible. However, only for the first geometry in a geometry list the Parent attribute is considered!

Auto Dimensions

Sometimes it may be useful that parts are stretched automatically. To implement this, the Parameters of Geometry entities define the optional parameter Width.

Width must be a real numeric value and must specify the real width of the geometry file.

If width is provided and there is a nominal width for this part - either directly or computed - then the X Scaling will be computed automatically by nominal_width / real_width and override a potentially existing explicit X Scaling.

Sounds pretty helpful but be careful! Roundings will be stretched inhomogeneously (rule of thumb: 10/15 % +- or mostly okay), same for texture coordinates!

Maybe, we’ll add more auto-dimensions such as Depth and Height.

Commercial Short Cut: _Com-Default_

For advanced Evaluators, as used in the context of complex Beds, for instance, it often happens that Evaluator parameter and virtual property match 1:1. To ease your pain and also avoid typos you can use the short cut _Com-Default_ in the context of Archetypes:

“Length”: “_Com-Default_” will be expanded then to “Length”: “{ComLength}”, and so on.

For one line this does not look super impressive but imagine a dozen or even more…