#78 Rt (and Rtedge) Clips Image

closed-fixed
9
2008-05-06
2006-07-19
Tom Browder
No

The attached tgm demonstrates the problem. Use the
following commands:

% mged rtbug.g
> ae 270 0
> B grp
# notice region Hidden.r is seen in view upper-right
> rt
# notice region Hidden.r is seen in pix upper-right
> ae 35 25
> B grp
# notice region Hidden.r is seen in view upper-right
> rt
# notice region Hidden.r is NOT seen in pix upper-right

I believe the eye point is not being calculated
properly, but I can't pinpoint it in the source code.

When I ray trace the group "grp" programmatically I
see all the objects, including Hidden.r. I calculate
the eye point by using the diagonal of the bounding
box as the distance to translate toward the viewer
from the center of the bounding box, all in model
coordinates. I don't think the transformation used by
rt or rtedge ensures enough distance is backed out
from the bbox centroid, or it is not being applied to
the correct point.

This problem is evidenced using BRL-CAD version 7.8.0
compiled using gcc 4.1.1 on i386 Linux hosts using
both Fedora Core 2 and 5.

Discussion

  • Tom Browder

    Tom Browder - 2006-07-19

    An example BRL-CAD binary database (db 5 format) demonstrating the problem.

     
  • Sean Morrison

    Sean Morrison - 2006-07-26
    • priority: 5 --> 8
    • assigned_to: nobody --> brlcad
     
  • Sean Morrison

    Sean Morrison - 2006-07-26

    Logged In: YES
    user_id=785737

    Just wanted to note that I have started looking into this problem and it indeed
    is a rather significant bug. The exact cause is still not evident but seems to
    be related to the extent of the bounding box extending behind the rt/rtedge
    view plane (which should NOT be happening for non-perspective, autoview).
    It would be useful to know whether this bug is also present in either 7.0 or
    7.2 since if it was only recently introduced, it makes it considerably easier to
    trace down. I'll keep looking into this and see if a workaround can be
    identified as well as a proper fix, of course.

     
  • Sean Morrison

    Sean Morrison - 2006-08-08
    • priority: 8 --> 9
    • status: open --> open-accepted
     
  • Tom Browder

    Tom Browder - 2007-08-27

    Logged In: YES
    user_id=861162
    Originator: YES

    We just went back in time to BRL-CAD versions 7.2.6, 7.2.4, and 7.0.0, and the same problem exists. I'm not sure what the fix is, but we need tis to work correctly!

    I will try to compile from source and try lgt on recent versions if you can tell me how to get it to work without the error message.

    Thanks.

    -Tom

     
  • Tom Browder

    Tom Browder - 2007-08-30
    • milestone: 387261 --> serious bug / workaround
     
  • Tom Browder

    Tom Browder - 2007-08-30

    Logged In: YES
    user_id=861162
    Originator: YES

    We have determined that lgt still works correctly (i.e., no clipping) from version 7.0.0 through 7.8.0 (and, conversely, rtedge exhibits the same problem all the way back to 7.0.0). I have changed the severity to reflect that there is a workaround (as long as lgt is still available!).

    -Tom

     
  • Bob Parker

    Bob Parker - 2008-05-06
    • assigned_to: brlcad --> bob1961
    • status: open-accepted --> closed-fixed
     
  • Bob Parker

    Bob Parker - 2008-05-06

    Logged In: YES
    user_id=1190914
    Originator: NO

    Fixed in latest SVN

     
  • Sean Morrison

    Sean Morrison - 2008-05-06

    Logged In: YES
    user_id=785737
    Originator: NO

    Tom,

    Some additional details if you're interested, it did look like rt/rtedge were indeed incorrectly clipping the render due to an invalid eye point calculation that was specific to the commands being invoked from within mged. The problem was traced down to code committed all the way back in 1997 (circa release 5.0) where the longest dimension of the bounding box was used as the default eye point. This in turn could cause clipping if the diagonal distance was considerably larger and when rendering from a non-orthogonal view and where geometry expanded into that space of course.

    The fix should be in the next release of BRL-CAD (7.12.4+), and thank you again for all your patience. If you need a patch before then, svn revision 31004 has the change.

    Cheers!
    Sean

     
  • Tom Browder

    Tom Browder - 2009-09-14

    I see this problem again. When I programmatically use rtedge, the objetc is not filling the view so I get very few pixels compared to doing rtedge in mged. I've attached xpart.g. Try rtedge on object "curved" inside and outside mged to observe the difference.

     
  • Tom Browder

    Tom Browder - 2009-09-14

    Hm. I can't figure out how to add a file--help!

     

Log in to post a comment.