-
-
Notifications
You must be signed in to change notification settings - Fork 191
Volumetric-rendering in avogadro project. #1979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Perminder <[email protected]>
I tried fixing the looping order of the cube's data, still some work is left but here's the result. Let me know how it looks @matterhorn103 @ghutchis @cryosWater (once we get different color maps, it will look more better (h2o-dense.cube)Screencast.from.16-03-25.10.16.23.PM.IST.webmAmmoniaScreencast.from.16-03-25.10.18.28.PM.IST.webmcrh206Also, for water if you use h2o-elf.cube You get Noel's version. here(https://baoilleach.blogspot.com/2011/08/electron-density-is-not-isosurface.html) If color mappings are different, you can get the exact same appearance. |
Here's the compile issue. |
I'm running into some crashes on Mac with the VAO in the volume render. I think it's Mac-specific, so I'll do some reading / debugging.
The first line crashes. I'll investigate further. |
No problem geoff, I can also help. But, can you undo all the changes at cube.cpp file. (Like replacing cube.cpp file from actual main branch of cube.cpp file.) This will change the looping order and will crash some of the molecules, but you could still work on small molecules. Since the compile issue is with cube.cpp file. |
I mean, you can grab the Or you can (There are other ways to do this in git, but these are easy.) |
Oops, I thought this will fix the compilation issue in your mac, but I think it's not related to the change I did in cube.cpp file. Screencast.from.23-03-25.04.26.00.AM.IST.webmThis is the colorMapping I am trying @ghutchis @matterhorn103 @cryos |
Signed-off-by: Perminder <[email protected]>
fed9de8
to
73de9e8
Compare
Screencast.from.23-03-25.05.20.25.AM.IST.webmHere's the structure for caffeine from caffeine.cube file. |
Signed-off-by: Perminder <[email protected]>
avogadro/rendering/volume_fs.glsl
Outdated
@@ -0,0 +1,88 @@ | |||
#version 330 core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I forgot to change the version. I'll fix this very soon, but @ghutchis do you think this could be the reason of compilation issue in macOS? Also, if not, I think we could include some more libraries as we did in other files
#include <GL/glew.h>
or maybe more to fix this issue?
Signed-off-by: Perminder <[email protected]>
Btw, @ghutchis I have lower the version in shaders. Can you take a look and also, I have link the colors (here's the result) Screencast.from.23-03-25.09.44.34.AM.IST.webmI could probably add a resolution as well as opacity meter in the future. Low resolution ( high fps) , High resolution (low fps). |
Signed-off-by: Perminder <[email protected]>
I don't think it's needed to go back to an old shader version. The problem on the Mac isn't the shader version, it's that So I'll set this up to only build for Windows and Linux right now, and push to update the remaining bits of code to use core profile. |
This pull request has been mentioned on Avogadro Discussion. There might be relevant details there: https://discuss.avogadro.cc/t/volumetric-rendering-progress/6865/1 |
avogadro/qtplugins/CMakeLists.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are using some really old bits of code. Please replace this:
https://gist.github.com/ghutchis/41ab922e800a7c2f14a2cb64ad65cd20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor thing - it would be great to fix the qtplugins/CMakeLists.txt - you're using an old version for some reason...
@@ -0,0 +1,9 @@ | |||
#version 120 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably leave all these shaders as 330 core
Signed-off-by: Perminder <[email protected]>
2709891
to
ee6551b
Compare
Screencast.from.28-03-25.06.20.00.AM.IST.webmI think we were already having the correct width and height in the volumeGeometry class :"). I was thinking very complex logic to find it out but had an oversight that we already have them. |
Signed-off-by: Perminder <[email protected]>
Hi @ghutchis , do you mind checking it once again then I could probably work on code cleanups. |
I believe this is actually part of an existing problem and applies to all displayed orbitals, it's not isolated to the volumetric renderer. Does it also happen for you with isosurfaces? I noticed it a little while ago and just hadn't got round to making an issue for it yet. (I figured there's enough more urgent issues that I didn't need to rush with the bug report.) |
Some results which are good.
When the alpha is low.
simplescreenrecorder-2025-03-14_23.50.15.mp4
When the alpha is high.
simplescreenrecorder-2025-03-14_23.46.00.mp4
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)
With updated loop order for cube data (BENZENE)
SOME TODO'S