[Smtk-developers] Possible new way of dealing with color
Bob Obara
bob.obara at kitware.com
Sun Feb 26 15:39:08 EST 2017
Hey David,
You raised some good points - see below.
Bob
Robert M. O'Bara, MEng.
Assistant Director of Scientific Computing
Kitware Inc.
28 Corporate Drive
Suite 101
Clifton Park, NY 12065
Phone: (518) 881- 4931
> On Feb 25, 2017, at 6:53 PMEST, David Thompson <david.thompson at kitware.com> wrote:
>
>> ...
>> • 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.
>
I was thinking of the Exodus Session - what do you think of having the Exodus Session create faces for each side set and a volume for each element block? This way the session looks like all the other ones? In the future we could create an operator that would create proper partitioned model faces (as well as creating model edges and vertices) What do you think?
> 3. It is a fast and simple change once we actually have the icons.
>
If we did stick with icons then we should provide the ability for a workflow to be able to swap them out - for example in Hydrology the edge symbol could be made to look like a coast line. The one thing is that they should be B/W images)
>> • 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.
My suggestion above would address this.
>
> 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).
I think that the default colors should be stored in the model’s SMTK file - the application would have a preference for what the application would set the default colors would be for new models being created. I guess we could have in the future a per session set of default colors.
>
> David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20170226/11946863/attachment.html>
More information about the Smtk-developers
mailing list