Clear all

[Sticky] VIDEO TUTORIAL: Tips for Parametric Models  


Joined: 2 years ago
Posts: 143
04/09/2018 8:49 am  

Prep AX models for stamping scene geometry or static prefabs. Take control of Archimatix! Rename and tag child gameobjects on the nodes that generate them, combine meshes that share material nodes, and more! (~ 7 min)

The full text of the video is in the closed captions, and also below...

This topic was modified 2 years ago by wetcircuit

EvaMaria liked
Topic Tags
Joined: 2 years ago
Posts: 143
04/09/2018 9:02 am  

1. Parametric to Static Models

One of Archimatix’s strengths is the ability to generate static geometry from parametric models. A parametric model makes use of relations within the Archimatix graph to dynamically build game objects according to its nodes and settings. 

These models can be preserved as static geometry, either by stamping the mesh directly into the scene or by saving a Unity prefab to be instantiated later. 

Parametric models can be larger and more detailed than run time models, since they are not generated in real time. Archimatix can create secondary UV maps for lightbaking, and they are calculated into scene Navigation. Static geometry can be exported from Unity as OBJ or FBX, to be repainted, occlusion-baked, and edited with external 3D tools. 

These tips will help a static workflow, but this advice will also help streamline runtime models.


2. Stamp vs Prefab (vs an Archimatix runtime prefab)

Use the STAMP button to leave static geometry directly in the Unity scene. 

Use the PREFAB button to save the static model as an independent Prefab.

To save a runtime prefab, drag the Archimatix model from the heirarchy to a folder in your project. This prefab requires that Archimatix is installed to use and edit.


3. Expose control parameters to access them in the Inspector

Exposing any parameter on a node means it will show up in a list in the Inspector, in the order it was exposed. 

Parameters in the inspector can be renamed with an alias, allowing you to create a “control panel” in the Archimatix component.


4. Look at the structure of an AX model. 

A stamped model is exactly the same structure as runtime model. 

Notice how many individual child game objects are created. And, what kind of colliders each has. 

We need a happy-medium between cull-able game objects and single-material geometry. If the model can fit within the camera view, it’s probably better to combine meshes, but if a model is large enough that it can’t all be seen at once, try organizing it into cull-able parts.


5. The main Material and Material Nodes

On each Archimatix model is a material slot on the inspector which loads with the default purple grid. We set our main material here, but each of the mesh construction nodes can launch its own material node. If the input is left blank it will use the main material, and the UV can be scaled and offset, even rotated locally on that node.

If a new material is added to the input on the node, the main material is over-written. This new material can be distributed to other mesh nodes, but be careful! there seems to be a limit of 8 material connections. Archimatix will crash and you could lose any unsaved work. Hit CMD+Z to undo as soon as you experience a problem with the graph.


6. Combine Meshes with the same Material

An Archimatix model can theoretically generate any number of meshes, each with its own material, so don’t think of a graph as 1 big model, it is instead a gameobject with many individual child meshes.

Use common sense. The combined mesh becomes a single object in the scene and will all be culled together as one gameobject. 

It’s also possible to create a convex mesh collider around the combined mesh that is more efficient than individual colliders, but also more accurate than a box collider.

DO NOT combine meshes that use different materials! Archimatix will crash and you could lose any unsaved work. Hit CMD+Z to undo as soon as you see a problem with the graph.

If you want to use a texture atlas, create the atlas material first, and add it to the Main Material slot on the inspector. Use the individual Material nodes to scale and reposition the atlas on each mesh.


7. The name of the node becomes the name of the gameobject in the Heirarchy. 

Now that we’ve combined meshes with the same material, take a moment to re-name the nodes with common-sense labels. 

The Translation and Rotation of these nodes will be applied to the generated object.

Avoid scaling your 3D nodes where possible, since the Scale settings will also end up on the gameobject. Repeater, Grouper, Channeler, Instancer all apply their node transforms to their empty gameobject. 

It’s a good idea to clean up the transforms on the child nodes, to avoid unnecessary corrections on parents.


8. The PrefabInstancer Node generates “clones” of the prefab, 

But they are no longer Unity instances. Since these items are “clones” not references, you lose the prefab’s ability to edit and update across the project. 

Consider using a proxy instead, and adding the prefabs and component scripts later, or dynamically at runtime. The proxies can be tagged to help them be identified by trigger colliders and scripts. 


9. Grouper outputs SizeXYZ of its contents

There’s a useful feature on the Grouper Node that shows the exact dimensions of the object(s) routed through it. Size X,Y,Z. The parameters are read-only, but it’s always helpful to know the exact size of the model you are exporting.

With the Grouper set at all zeros in Transform, Scale* and Rotation (*Scale should be 1, not zero), the encapsulated model is ready to save as a Unity prefab, or to the Achimatix 3D Library where it can be brought into other Archimatix graphs. 


10. Duplicate and Channeler

As parametric models become more sophisticated, they also become more complicated. 

It’s not enough to just move a few parameters.  Eventually entire groups of objects inside the graph will need to be changed together.

Use Duplicate to create self-contained copies of mesh and Grouper nodes, with duplicated 2D shapes feeding them. The duplicated nodes can be edited to create modular variations. Each duplicate set can be fed to a Channeler node and selected with a dropdown list.

Entire instruction chains can be forked through Channelers to provide greater variation in the Archimatix model.

This post was modified 2 years ago by wetcircuit

EvaMaria liked