[osg-users] Multipass Technique

Robert Osfield robert.osfield at gmail.com
Thu Apr 21 01:50:53 PDT 2016


Hi Alex,

On 20 April 2016 at 21:02, Alex Taylor <alextaylor at gmail.com> wrote:

> I'm interested in trying out the MultiPassTechnique for for volume
> rendering and I have a few questions after looking through the source code
> and the example.
>
> 1) In the example, here is the description of the convex hull that can be
> used by MultipassTechnique:
>
> --hull","load 3D hull that defines the extents of the region to volume
> render.
>
> The hull is then read in from a file, if specified. My first question is,
> what is the expected form of the geometry that one adds to the Tile via
> addChild? It's not clear to me in the example without seeing an example of
> a file that contains a hull.
>

The hull just needs to contain a geometry mesh that represents the boundary
of the volume you want to render.  The way MultipassTechnique works is to
render the back side of the hull to one depth texture and then the front
side to another depth texture.  Then during the ray tracing of the volume
data it checks the two depth textures to work out where the ray should
start and finish.



>
> 2) There are different shaders and enums for three different scenarios:
> CUBE, HULL, and CUBE AND HULL. What do each of these scenarios mean? When
> would each be useful?
>

I can't recall the exact details off the top of my head, but they'll be
something like CUBE - just render the volume tile as a straight cube, HULL
- render the hull to two depth textures and constrain the volume rendering
between these, CUBE AND HULL - render the full cube but use two different
settings for alpha within the HULL vs outside the HULL but still inside the
CUBE.



>
> 3) I'm interested in Multi-pass technique because I'd like to be able to
> implement a clipping "ROI" defined by an data-axes aligned cube. Would it
> be possible to define a cube shaped convex hull and have the portion of my
> data that is inside be rendered and have the portion outside the cube be
> clipped? Is this within the use cases that were in mind when Multipass
> Technique was added?
>

I am not clear on what you have in mind here so can't answer.


Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160421/f16f81dc/attachment-0003.htm>


More information about the osg-users mailing list