# Volumetric Rendering Progress

**URL:** <https://discuss.avogadro.cc/t/volumetric-rendering-progress/6865>\
**Category:** Development\
**Created:** [March 23, 2025, 5:57pm UTC](https://discuss.avogadro.cc/t/volumetric-rendering-progress/6865 "2025-03-23T17:57:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [March 23, 2025, 5:57pm UTC](https://discuss.avogadro.cc/t/volumetric-rendering-progress/6865/1 "2025-03-23T17:57:27Z")

</div>

Just wanted to share some progress from @perminder-17

> <https://github.com/OpenChemistry/avogadrolibs/pull/1979>
>
> Some results which are good. 
> 
> 
> \## When the alpha is low.
> 
> https://github.c…om/user-attachments/assets/d68920a4-e28e-4ba3-8798-12d83139f39b
> 
> 
> \## When the alpha is high.
> https://github.com/user-attachments/assets/160b69bb-1836-4857-a283-9fcee598e399
> 
> 
> You can see I have changed the loop order in the cube, which is still not perfect and will break the flying-edges code so we need to find any workaround for it. Which means (different loop order for flying edges and different loop-order for volumetric rendering). 
> 
> \## With original flying-edges loop order for cube data (BENZENE)
> 
> !\[Screenshot from 2025-03-14 23-31-28\](https://github.com/user-attachments/assets/8914a719-a76a-481d-a030-72b665bc536d)
> 
> \## With updated loop order for cube data (BENZENE)
> 
> !\[Screenshot from 2025-03-14 23-38-39\](https://github.com/user-attachments/assets/b57b6207-5060-4774-abee-5b3a44e56ced)
> 
> 
> \# SOME TODO'S
> 
> 1. Resizing the framebuffers when we resize the screen.
> 2. Updating the cube's data with correct loop order
> 3. Scaling the volumetric mesh compared with the actual molecule rendered on the screen.
> 4. Adding colors support from UI. 
> 5. Adding different sets of colors texture (2 colors, one for positive and one for negetive, @ghutchis will help in this. :) ).
> 6. Cleanup in the code and removing unnecessary code blocks.

Benzene HOMO:

 ![Volumetric rendering of benzene HOMO](https://discuss.avogadro.cc/uploads/default/original/2X/2/264cb290b5cb2a15b13743eceaacf1cd51f73978.jpeg)

Caffeine HOMO:

 ![Voumetric rendering of caffeine HOMO](https://discuss.avogadro.cc/uploads/default/original/2X/6/6b318e6b85fc030b8cf71f7d82e162a36471203b.jpeg)

This should be ready for Windows and Linux soon. (It turns out Mac needs some work because of how Apple handles OpenGL.. but don’t worry – I’ve literally wanted this rendering style on my Mac since we started Avogadro.)

---

<div class="post-metadata">

**Author:** ![perminder-17](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/perminder-17/32/2043_2.png) [@perminder-17](https://discuss.avogadro.cc/u/perminder-17)\
**Post date:** [March 23, 2025, 7:36pm UTC](https://discuss.avogadro.cc/t/volumetric-rendering-progress/6865/2 "2025-03-23T19:36:27Z")

</div>

I’ll love to see the volumetric rendering in the actual software very soon😊.

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [March 25, 2025, 8:09pm UTC](https://discuss.avogadro.cc/t/volumetric-rendering-progress/6865/3 "2025-03-25T20:09:58Z")

</div>

One thing to ask is the interface.

At the moment, there’s a separate “Volumes” rendering option.

Would it be better to change the current “Meshes” to “Surfaces” and offer different rendering styles as an option?

- isosurface
- mesh
- volumetric

I’m thinking that having separate “volume” and “surface / mesh” render types in the list might be confusing.

Thoughts?

---

<div class="post-metadata">

**Author:** ![perminder-17](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/perminder-17/32/2043_2.png) [@perminder-17](https://discuss.avogadro.cc/u/perminder-17)\
**Post date:** [March 26, 2025, 3:16am UTC](https://discuss.avogadro.cc/t/volumetric-rendering-progress/6865/4 "2025-03-26T03:16:04Z")

</div>

Hi geoff, do you mind explaining a bit more? is that’s only changing the name of meshes to surfaces and changing the name “Volumes” to “volumetric”? Sorry for the inconvenience :")

---

<div class="post-metadata">

**Author:** ![matterhorn103](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/matterhorn103/32/1751_2.png) [@matterhorn103](https://discuss.avogadro.cc/u/matterhorn103)\
**Post date:** [March 26, 2025, 5:48am UTC](https://discuss.avogadro.cc/t/volumetric-rendering-progress/6865/5 "2025-03-26T05:48:06Z")

</div>

I think that’s a good idea to combine them all under a single display type with different options, since you’re rendering the same thing in each case, just with a different presentation.

---

<div class="post-metadata">

**Author:** ![ghutchis](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/ghutchis/32/456_2.png) [@ghutchis](https://discuss.avogadro.cc/u/ghutchis)\
**Post date:** [March 26, 2025, 2:01pm UTC](https://discuss.avogadro.cc/t/volumetric-rendering-progress/6865/6 "2025-03-26T14:01:52Z")

</div>

I’m suggesting to merge the new “Volumes” class into the meshes / surfaces class and yes renaming as “surfaces” (or something better).

My concern is that in the current pull request, having a second render type will be a bit confusing. Most users will think “I want to generate an orbital” and whether it’s a surface or a volumetric rendering is more of a style than something separate.

It doesn’t have to happen in the current pull request – I’m just looking for feedback on the UI.
