Hi Jon,

> Another thing is that the results of the contouring are sent out in groups of 
> 3 points which are the vertices of triangles forming the surface. Hence, I 
> orthogonalize them and get three.js to draw them as just that - triangles. My 
> worry is that, since the triangles all have edges in common, nearly all of 
> the contour lines (except the ones at the edges of the map box) get drawn 
> twice, or at least are sent to three.js twice for drawing, which doesn't seem 
> terribly efficient?! Is there a nicer way of doing this?

I was also concerned about it when writing UglyMol. It was ~6 years
ago. Drawing maps as lines was definitely affecting speed, because fps
was lower when the number of lines was huge. So to reduce duplicated
lines I calculated new tables for the marching cubes algorithms - with
lines instead of triangles in the tables. This allowed me to reduce
some (most of?) duplicates. I don't remember the details, but the
script that I used for calculating tables is here:
https://github.com/uglymol/uglymol/blob/master/tools/isolut.py

Then I was disappointed, because it didn't change the fps. I don't
know why. And I don't know how to check where the bottleneck in the
graphics pipeline is (vertex shader, fragment shader or something
else?). I guess optimizing map rendering would require someone with
expertise in 3D graphics rendering.

> Finally, its been asked before, but is there a nice way in CCP4i2 to output 
> maps that cover the coordinates of the structure, rather than the asymmetric 
> unit?

The maps that cover asu are, on average, smaller. They contain the
list of symmetry operators that expand the map to the whole unit cell.
So such maps may actually be better. Or, even better, use MTZ files. I
think UglyMol is still the only web viewer that can show maps from
MTZ, but it works on mobile web browsers (it's not designed for
mobile, but rendering works) and you can re-use parts of it.
https://uglymol.github.io/view/

Best wishes,
Marcin

########################################################################

To unsubscribe from the CCP4BB list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB&A=1

This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/

Reply via email to