Hello,
Refer to Texture3D demo, where 3D grayscale texture values can be mapped to rgb colors. As the approach in the demo works for small datasets only, I want to do this using the GLSL vertex/fragment shaders.
However, I cannot get this to work. Refer to attached modified Texture3D, where I added a Texture1D color table and a TGLSLShader component, as well as possibility to modify Shader Code. (Shader code is automatically loaded/saved on program start/end)
Anyone who knows how to make this work?
Regards, Ronald
PS updated attached project improving error handling and avoiding texture index issues.
When i'll have a little bit more time i'll try to convert the first and the Last to GLScene
In wait, you can take a look to the zip, is a (CodeTyphon) project based on the first by the same author the Licence is "BSD 3-Clause"
Hi Jérôme,
Thanks, I will look at zip and resources.
Regarding converting raycasting projects to GLScene, that would be great, please let me know if I can help!
Regards, Ronald
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Refer to Texture3D demo, where 3D grayscale texture values can be mapped to rgb colors. As the approach in the demo works for small datasets only, I want to do this using the GLSL vertex/fragment shaders.
However, I cannot get this to work. Refer to attached modified Texture3D, where I added a Texture1D color table and a TGLSLShader component, as well as possibility to modify Shader Code. (Shader code is automatically loaded/saved on program start/end)
Anyone who knows how to make this work?
Regards, Ronald
PS updated attached project improving error handling and avoiding texture index issues.
Last edit: Ronald 2020-10-18
Hi Ronald i took a look quickly to your code, now i understand what you want to do exactly. Your approch is not good. In this case you want to use shader, so you need to raycast the volume, and compute the transfert function directly in the shader.
I've made some research over the web and i found some resources that can help
https://github.com/neurolabusc/vx
http://www.real-time-volume-graphics.org/?page_id=28
https://prideout.net/blog/old/blog/index.html@p=64.html
http://pages.cs.wisc.edu/~nowak/779/779ClassProject.html#bound
When i'll have a little bit more time i'll try to convert the first and the Last to GLScene
In wait, you can take a look to the zip, is a (CodeTyphon) project based on the first by the same author the Licence is "BSD 3-Clause"
Regards Jérôme
Hi Jérôme,
Thanks, I will look at zip and resources.
Regarding converting raycasting projects to GLScene, that would be great, please let me know if I can help!
Regards, Ronald