#8995 closed enhancement (fixed)
Remove vertex colors when saving gltf of single color objects
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Input/Output | Version: | |
Keywords: | Cc: | Elaine Meng, pett | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
All "monochrome" and the "volume" presets are intended to represent "no color". Blue was a stylistic decision that was made in 3DPX. The small molecules are all being output with vertex color, while the surface models are coming out with a material applied. We would prefer that the monochrome outputs had a consistent method of coloration, and the preferred method would be to not use vertex color. Vertex color isn't visible in the viewport nor renderable by default in many commercial 3D packages, including Blender, and can therefore create some unexpected results for the naïve user. Please let us know if this is doable or we can make the adjustments on our end when processing the files into other formats. Thanks! Kristen Kristen Browne, MSc, MscBMC Contractor - MSC, Inc. | A Guidehouse Company 3D Modeling and Biovisualization Specialist Bioinformatics and Computational Biosciences Branch (BCBB)<https://www.niaid.nih.gov/research/bioinformatics-computational-biosciences-branch> OCICB/OSMO/OD/NIAID/NIH 5601 Fishers Lane, Room 4A60 Rockville, MD 20852 Office 202-253-5228
Change History (5)
comment:1 by , 2 years ago
Cc: | added |
---|---|
Component: | Unassigned → Input/Output |
Owner: | set to |
Platform: | → all |
Project: | → ChimeraX |
Status: | new → accepted |
comment:2 by , 2 years ago
comment:3 by , 2 years ago
Cc: | added; removed |
---|---|
Owner: | changed from | to
Status: | accepted → assigned |
Summary: | Consistent usage of materials vs vertex color in no-color outputs from presets → Remove vertex colors when saving gltf of single color objects |
Type: | defect → enhancement |
Fixed.
I made saving GLTF remove vertex colors from all objects that are a single color. Instead it uses just the material color. This reduces the use of vertex colors in gltf files which many gltf viewers cannot handle.
In the rare case that you would like to preserve vertex colors in the saved gltf for single color objects use the new save gltf option "pruneVertexColors false".
comment:4 by , 2 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 by , 2 years ago
Specifically if all ribbon residues of a structure are the same color then the ribbons object in the gltf will not have vertex colors. Likewise if all atoms of a structure are the same color then the atoms object will have no vertex colors.
And if all bonds of the same structure are the same color then the bonds object will not have vertex colors. This rule applies to any object including surfaces, and volumes, or any geometry where the vertices may have vertex colors.
I think atoms and bonds use per-vertex colors in GLTF output because they are instanced objects (spheres and cylinders), and also ribbons use per-vertex colors always. But surfaces use a single color or per-vertex colors depending on whether the surface was multi-colored or not. The GLTF save code can probably be improved so that if these objects are one color then a single material color is used instead of vertex colors.