nglviewer / ngl

WebGL protein viewer
http://nglviewer.org/ngl/
MIT License
664 stars 169 forks source link

Change visualization parameters? #968

Closed spadavec closed 1 year ago

spadavec commented 1 year ago

Hello all--

I'm curious if there is a way to change some visualization parameters within the viewer? I'm primarily interested in:

1) Changing the lighting settings (e.g. ambient occlusion, light source count, light source positioning, etc) 2) Changing the cartoon representation (e.g. ribbon width, ribbon "material", etc)

Is there any information on this? I've dug around and cant seem to find anything.

Best

ppillot commented 1 year ago

Hi, Yes, there are some capabilities for changing the scene lighting and the cartoon representations. You can play around with the demo web application http://nglviewer.org/ngl/ You can change the lights using the cog wheels icon. Cartoon representations parameters are available from the hamburger menu next to the representation name.

Screenshot 2023-02-20 at 18 05 27

Ambient occlusion is not available. I don't know if you can add more light sources through the NGL API. But bear in mind that Three.js is used to generate the scenes so if you are familiar with this library there is always the possibility to leverage it. Also, contributions to NGL are more than welcome!