[Smtk-developers] Possible new way of dealing with color

David Thompson david.thompson at kitware.com
Sat Feb 25 18:53:34 EST 2017


> ...
> 	• Introduce “default colors” for various model entity types (vertices, edges, faces, volumes, etc..)  - For example being able to say all edges by default are to be blue while all faces should be white
> 	• The ability to specify the color for the specific model entity 
> 	• The ability to tell default color from explicit color
> <NewModelColorPanel.png>
> 
> The Upper Left Image is the current Model Tree Display - the main problems I have with this is the following:
> 	• You can’t tell if the model entities colors are white (or in this case unset) - also the fact that the colors have actually been assigned randomly as their defaults

Agreed.

> 	• The icon is suppose to indicate if its a volume, face, edge, vertex, model, group, etc…  We never did follow through with this patter and as a result the icon doesn’t have a lot of meaning

I would prefer to keep them because

1. I suspect we are about to get icons for the different entity types shortly ("Filter By" feature)

2. Because some sessions (e.g., exodus) present tessellations on groups or other entity types that may not be intuitive, the "Filter By" feature will benefit from tree views where the entity type is shown using the same icon.

3. It is a fast and simple change once we actually have the icons.

> 	• Setting the color of a session or model doesn’t have an effect on rendering the geometry
> 
> ...
> 
> The third option removed the icon and used a simple circle to indicate color.  This is expanded on the right side where Vol 1 is explicitly green and Vol 2 is explicitly yellow.  Vols 3 and 4 are inheriting the default blue color of Element Blocks indicated by the hashed circle.

I like it. However, note that the Exodus reader creates those groups ("Node Sets", "Side Sets", "Element Blocks") explicitly since they are part of the file. The "Topology View" won't always have those same groups. The "Entity List View" will, and it will be easier to attach functions that set color defaults to them compared to the Exodus session groups.

Since I believe CMB defaults to the "Entity List View," this should be fine.

Where did you want the "default" or "inheritable" colors stored? As application settings (which then belong in CMB, not SMTK), per-session settings, per-model settings, per-group settings (which is what you have shown, but we do not currently create default groups and assign entities there)?

If we use the "set entity property" operator to store the default colors (as well as per-entity colors), then it will be easier for the VTK adaptor to assign per-block colors. This would be easiest if we set default colors as properties on the model since CMB currently creates a VTK adaptor per model and groups all entities of the same type into one block of its output multiblock dataset (making it easy to discover the default color given only the VTK dataset).

	David


More information about the Smtk-developers mailing list