iv3d-users

Text archives Help


Re: [IV3D-USERS] Fixing MPR rendering (Re: Implementing a Reader Parallel to UVF)


Chronological Thread 
  • From: tom fogal <tfogal@sci.utah.edu>
  • To: iv3d-users@sci.utah.edu, Mathieu Malaterre <mathieu.malaterre@gmail.com>
  • Subject: Re: [IV3D-USERS] Fixing MPR rendering (Re: Implementing a Reader Parallel to UVF)
  • Date: Fri, 04 Jul 2014 13:17:09 +0200
  • Comments: In-reply-to Mathieu Malaterre <mathieu.malaterre@gmail.com> message dated "Wed, 02 Jul 2014 12:08:47 +0200."

hi, sorry, i've been out sick for a bit.

Mathieu Malaterre writes:
> Tom,
>
> On Wed, Jun 18, 2014 at 11:38 AM, tom fogal <tfogal@sci.utah.edu> wrote:
> [...]
> > It starts in GLRenderer.cpp around line 1093. You can see there that
> > we do a search for the first LOD that has only a single brick.
> >
> > In reality, we *should* do something more akin to what goes on at line
> > 1199: plan a new frame, setting the brick list to everything that makes
> > sense (the important part of PlanHQMIPFrame is the 'build sub frame
> > brick list'). Then loop through each elem of m_vCurrentBrickList and
> > render it.
>
> Let see if I understand what should be done here. I need to entirely
> copy/paste:
>
> vector<Brick> AbstrRenderer::BuildSubFrameBrickList(bool
> bUseResidencyAsDistanceCriterion)
>
> into a function called BuildSubFrameBrickListForMPR
>
> Then inside this new function change the line
>
> if(RegionNeedsBrick(**reg, brick->first, brick->second, b.bIsEmpty)) {
>
> with
>
> if(RegionNeedsBrickForMPR(**reg, brick->first, brick->second,
> b.bIsEmpty)) {
>
> And finally provide an implementation for RegionNeedsBrickForMPR
> (check if brick region is entirely in Region positive|negative
> half-space).

Without actually looking at it, I think the existing RegionNeedsBrick
should suffice. Ditto for brick list creation. That is, you should
be able to simply build the brick list and then iterate through it and
render. The problem now is that it's not even building that list.

> What's not very clear is if I should do that in a single pass. In
> other word do I populate the m_vCurrentBrickList with any bricks that
> will be required for Axial AND Coronal AND Sagittal view in a single
> pass ? Should I do that in 3 different pass ?

Right, I'd fill it in one pass and then render it in a second.
Something like this:

foreach brick b in the dataset:
foreach region r:
if b is within r's FOV
add b to bricklist

// probably a 'remove duplicates' step here, or just smart inserts

foreach brick b in bricklist:
bind b's texture
foreach region r:
// or no-op, if b is not in r
render b in r
unbind b's texture
post loop stuff

Looking at that HQMIP stuff, it appears to not support interruption.
This means IV3D would appear to hang while this was going on. Ideally
you'd do the second pass while checking m_iTimeSliceMSecs, as in the
'normal' rendering around line 2674 (Render3DView).

-tom



Archive powered by MHonArc 2.6.18.

Top of page