Procedural Geometry

From The Foundry MODO SDK wiki
Revision as of 21:41, 16 June 2016 by Mattcox (Talk | contribs)

Jump to: navigation, search

MODO 10.1 introduces a new procedural geometry system. This procedural system allows geometry to be dynamically created and modified over time. There are three extensible components to the procedural system; Mesh Operations, Tool Operations and Selection Operations.

Mesh Operations

Mesh Operations are the core building blocks of the procedural system. The mesh operations are placed into a stack, and a procedural mesh is passed from one operation to another to result in a final modified mesh. They can perform any kind of edit to the mesh they want, such as creating new geometry or modifying existing geometry.

There are usually three components to a mesh operation; the item, the ILxMeshOperation object and a modifier that writes the ILxMeshOperation object to one of the items channels. These components can either be created manually, by implementing each server, or for simple mesh operations that only rely on some basic inputs, an automated approach is provided that reduces the amount of boilerplate code that is required.

Overview
Provides an overview of the mesh operation interface and item type.

Automatic Implementation
This provides an example in both Python and C++ of how to create an extremely simple mesh operation. This mesh operation takes an ILxMeshOperation interface and generates an associated item type and modifier.

Manual Implementation
In some rare cases, full control of the mesh operation implementation is required. In these cases, you will need to implement an item type, a modifier and an ILxMeshOperation interface. This example in Python and C++ demonstrates the implementation of a Mesh Operation from scratch.

Tool Operations

Tool Operations are a sub-type of the Mesh Operation. They provide a simple way to wrap a new or existing direct modelling tool in a mesh operation, so that it can be evaluated by the procedural system. The tool operation provides many behaviours that are available to direct modelling tools, including user interface such as tool handles, as well as access to tool packets for modifying tool behaviour. Tool Operations can also be used to extend the functionality of direct modelling tools, outside of the procedural system.

Similar to Mesh Operations, Tool Operations can either be created automatically from an existing tool server, or can be created manually by implementing various servers.

Overview
Provides an overview of the tool operation interface and item type.

Virtual Undo
Explains how tool operations can be used to extend the functionality of direct modelling tools.

Automatic Implementation
This provides an example in both Python and C++ of how to create an extremely simple tool operation. This tool operation takes an ILxTool interface and an ILxToolOperation interface and generates an associated item type and modifier.

Manual Implementation
In some rare cases, full control of the tool operation implementation is required. In these cases, you will need to implement an item type, a modifier, an ILxTool interface and an ILxToolOperation interface. This example in Python and C++ demonstrates the implementation of a Tool Operation from scratch.

Selection Operations

Selection Operations control which elements on a procedural mesh are modified by a mesh operation or tool operation. At the start of the procedural evaluation, each mesh element is tested against a selection operation to see if it should be modified or not. The selection can use any rules to determine whether an element is selected, such as the element position, index, area, normal...etc.

Similar to the Mesh Operation and Tool Operation, Selection Operations can either be implemented manually or automatically generated.

Overview
Provides an overview of the selection operation interface and item type.

Automatic Implementation
This provides an example in both Python and C++ of how to create an extremely simple selection operation. This takes an ILxSelectionOperation interface and generates an associated item type and modifier.

Manual Implementation
In some rare cases, full control of the selection operation implementation is required. In these cases, you will need to implement an item type, a modifier and an ILxSelectionOperation interface. This example in Python and C++ demonstrates the implementation of a Selection Operation from scratch.