Best approach to customize InlineDrawing - need 3D Textures for Volume Raycasting

ueckueck Posts: 4
edited September 2016 in VR, AR and Visualization

Dear Fabric Team,

I'm currently working on an early prototype that uses FE to prototype Medical Augmented Reality visualization.

One goal is to be able to render volumetric textures using a raycaster that is implemented as GLSL shader. In order to do so I need a 3D Texture with GL_UNSIGNED_BYTE as data-type.

I've studied the InlineDrawing source code and found that there is some half-finished support to upload 3D Textures (OGLTexture2D) - but it certainly does not the data type i'm using. Converting cubic volume to RGBA or Float is not feasible due to the memory consumption that comes with that change.

so i've implemented (based on OGLTexture2D) an OGLTexture3D class and the needed Adaptor, Shader, Drawing aspects.

However, when I finally plugged everything together I found that InlineDrawing uses the OGLTexture2DAdaptorMetaData to carry the required information around - but this is a type not an interface. Therefore my OGLTexture3D cannot be stored in the Metadata.

Now i'm kind of stuck between forking InlineDrawing completely (which would require work to keep up to date with future changes in FE) and dropping the idea of using FE for Medical AR.

Do you have any suggestions on how to extend FE InlineDrawing to do what I need without the need of maintaining a fork of InlineDrawing ?

Would future updates of FE eventually provide a more flexible rendering pipeline that could be extended in the envisioned way?

Thanks for your feedback!

cheers
ulrich

Comments

  • jcgagnonjcgagnon Fabric Employee Posts: 92 Fabric Employee

    Hi Ulrich,

    Normally you don't have to create a OGLTexture3D class, since OGLTexture2D, although its name is misleading, actually has a "depth" component, and can be used to connect to a sampler3d if you add the write adaptor and "data loading" methods to InlineDrawing.

    You can add a "loadTexture3D" method to OGLTexture2D, even within your own extension.

    Jerome Couture-Gagnon

  • ueckueck Posts: 4

    Dear Jerome,

    thanks for your reply.

    I'll try your suggestion.

    cheers
    Ulrich

Sign In or Register to comment.