Menu

Texture3D demo and raycasting

Help
Ronald
2022-02-23
2022-02-26
  • Ronald

    Ronald - 2022-02-23

    Hello,

    Attached is a modified version of GLScene Texture3D demo ( exploring the use shaders):

    • color is read from texture and applied via shaders, works ok. So, passing a 3D texture to shaders works.
    • option for raycasting via shaders :does not work.

    For the raycasting via the fragment shader, I used the example glsl code from the OpenGl Development Cookbook, as found on github

    However, I can't get the raycasting to work. as can be seen in the demo,
    Slicing does work OK, so issue must be in shader code, or in uniforms sent to shader.

    I tried several options (mainly camera positioning), but nothing works.

    Ideas/suggestions are welcome.

    Regards, Ronald

     
    • Pavel Vassiliev

      Pavel Vassiliev - 2022-02-23

      Hello Ronald,
      Please, use current version of GLScene from trunk. Your project files in that case must be with the same names as in Texture 3d demo to campare it in Beyond Campare tool. And if your code based on third party sources use the GLDirectOpenGL object for the raycasting.
      Sincerely
      Paul

       
  • Ronald

    Ronald - 2022-02-24

    Hi Pavel,

    Refer to attached zip file for version from GLScene Trunk. Same issue, unfortunately.
    In previous version, disabled Cadencer, which is unnecessary imho.
    In this version, I left it enabled, in order to have the lease differences using Beyond Compare. Also for Beyond Compare, I saved dfm as text.

    Any ideas tow to make single pass raycasting work are highly appreciated.

    Regards, Ronald

     

    Last edit: Ronald 2022-02-24
  • Ronald

    Ronald - 2022-02-25

    Hi Pavel,

    To answer your first question: I downloaded Texture3D demo yesterday from GLScene User Demos 2.1 on Sourceforge, https://sourceforge.net/projects/glscene/files/User%20Demos/User%20Demos%202.1/Textures.zip/download. The URL you mention is not listed under Files, for people who download GLScene latest version and/or demos and/or user demos from Sourceforge. Now you mentioned it, I found it under Code. This is not a place where I would have looked, as I would consider that "development stage", and expected a release stage under Files/User Demos.

    Anyway, now I found it, I will provide a demo based on that later today.

    I did look at MRIcroGL, and tried his shader code, but for some reason, this does not work with GLScene either.

    I also studied the GLScene Raycast demo, but that does not use a shader.

    So my issue remains the same: how to get single pass raycasting via shaders working with GLScene?

    Best regards, Ronald

     
  • Ronald

    Ronald - 2022-02-25

    Hello,

    Now I understood you, please find attached a project based on rev 7405. Still the same issue, no idea what I am doing wrong.

    Ideas/suggestions welcome.

    Regards, Ronald

     
  • Pavel Vassiliev

    Pavel Vassiliev - 2022-02-26

    Hello Ronald,
    I'll look at your improvements a little bit later.
    Sincerely, Pavel

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.