Avogadro Transparent Rendering and Engine Updates
When I initially implemented the transparent VdW engine for Avogadro I had the problem that any rendering of transparent objects must be done after the internal opaque objects have been rendered. So at the time I just implemented a ball and stick engine inside the VdW engine that was basically a copy of the ball and stick engine. I also mentioned that if we could set render order that would allow me to use any other engine if there was a way to ensure this engine was called after the others. The need for this had already been mentioned with respect to label rendering too.

Yesterday we discussed the engine rendering order needs on IRC and hashed out some ideas. Then my IRC connection went crazy (I think it was Freenode or the server I was connected to at least). Donald made some commits late last night (my time at least) and implemented flags for the engines to declare their roles and their transparency depth to order within particular roles. We now have a renderOpaque and renderTransparent function in each engine which should improve transparency rendering when combined with the rendering order enhancements.
The above image shows a rendered functionalised C60 molecule (one I worked with during my PhD research) using the transparent VdW engine with the stick engine rendering its backbone. It has allowed me to simplify the VdW engine whilst making it far more powerful as it can now use the ball and sick, stick or wire frame engine to render the structure inside the VdW surface. As we add more engines they can also be used with no further modification to this engine.
I am really pleased with the result and this particular visualisation shows the structure of the molecule very well. Lots more to do but I thought it would be nice to show how this display engine had progressed. Back to coding now - next challenge is getting to grips with threads!
Comments
Display comments as Linear | Threaded
Benoit Jacob on :
Marcus D. Hanwell on :
Benoit Jacob on :
Marcus D. Hanwell on :
Troy Unrau on :
Marcus D. Hanwell on :
Benoit Jacob on :
Kassie Trenton on :
Jos on :
Jospoortvliet on :
Lovely work, Marcus... I can only hope you enjoy working on this as much as many of us like to see the results
Marcus D. Hanwell on :
Glad you like the snapshots I have been providing of my progress. It is great to receive feedback on what I am doing. If it doesn't get done over the summer I will still be working on this project in my spare time once the Google Summer of Code (TM) is over
Marcus D. Hanwell on :
Avogadro is very modular, each visualisation is a self contained engine loaded as a plugin at runtime making Avogadro very easy to extend. It is the same for tools and extensions. I am certainly open to suggestions of what people feel would be most useful.
Geoff Hutchison on :
You can also already draw a freehand crystal and add crystallographic unit cell data to the record. That much was easy. You can also alter unit cell information (e.g., change a, b, c, alpha, beta, gamma) if you wish.
As Marcus mentioned, we don't yet have a builder to add atoms at specific unit cell coordinates. It's a goal -- but I'm not sure when I'll have time to do it this summer. (It's not part of Marcus's SoC proposal and he'll have his hands full with other things.)
Anonymous on :