Opened 7 years ago
Last modified 7 years ago
#1754 assigned enhancement
ChromaDepth
Reported by: | Tristan Croll | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Graphics | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
I'm in bed with a cold and a little bored, and someone on the CCP4 bulletin board asked about implementations of ChromaDepth (i.e. RGB colouring by distance from the camera). Anyway, just thought I'd share my quick implementation here in case you're interested in adding it. Quite fast, as long as the ribbon isn't displayed (since recoloring triggers a complete ribbon redraw - not sure if there's any way around that?).
Attachments (1)
Change History (6)
by , 7 years ago
Attachment: | chromadepth.py added |
---|
comment:1 by , 7 years ago
comment:2 by , 7 years ago
It does not appear that the ribbon code can color the ribbon without recomputing its shape, which makes it very slow. Conrad wrote that. I'll make a separate ticket for that.
comment:3 by , 7 years ago
I hadn't heard of it either, but apparently it's a thing: https://en.wikipedia.org/wiki/ChromaDepth. Not really worth spending a whole lot of time on, I suppose. I *have* noticed quite a few cases of EM people using a similar coloring style, but based on radial rather than linear depth. Particularly popular with the viral capsid folks. On 2019-03-07 21:32, ChimeraX wrote:
follow-up: 3 comment:4 by , 7 years ago
Yes the radial color for virus maps has some value and both Chimera and ChimeraX support that (command “color radial” in ChimeraX). It becomes less important if ambient occlusion lighting is used, the radial coloring basically compensated for poor lighting giving no sense of radial depth. Still the radial coloring is useful in journal figures, and I guess the depth coloring could be of use for journal figures but I have never seen it used.
follow-up: 4 comment:5 by , 7 years ago
It exists in PyMol (https://pymolwiki.org/index.php/Chromadepth) so I suppose at some point there was some interest in it. Looks like the company that made the glasses for it has gone out of business, though (chromatek.com link is defunct). On 2019-03-07 21:49, ChimeraX wrote:
Is the only difference between this and depth cue coloring that this can use a colormap to set color based on depth, while depth cue only blends the object color with a single depth color?
I don't understand how this would be useful. Usually color of objects conveys lots of information and this wipes that all out and uses color to map to depth, a very unnatural way to perceive. This seems like an idea that only makes sense with 2D graphics rather than 3d graphics.
At any rate, if this is more useful than I think, it would work much better with full interactive speed if done by the GPU, and is really trivial for the GPU to do it since it knows the depth of every pixel. But of course that would involve changing ChimeraX GPU shader code, so it is not really doable as an extension to ChimeraX while your approach does work.
If you want this capability in ChimeraX you should put it on the Toolshed.