POV-Ray : Newsgroups : povray.binaries.images : Problem with textobject. : Re: Problem with textobject. Server Time
3 Oct 2024 07:10:19 EDT (-0400)
  Re: Problem with textobject.  
From: Mike Williams
Date: 4 Feb 2000 16:07:37
Message: <mYReZBAXazm4Ewdd@econym.demon.co.uk>
Wasn't it Lo van den Berg who wrote:
>Hi,
>
>I have made the following simple image. It renders in under 4 minutes.
>To my astonishment the addition of a text object causes a render time
>43times longer than without. The source is included and contains the
>version with the textobject.
>
>At 576x432:
>with Textobject : 2h 54m
>without Textobject: 0h 4m
>
>Also the statistics tell me:
>Ray->Shape Intersection          Tests       Succeeded  Percentage
>True Type Font                60249600           11479      0.02
>
>Why? Can anybody explain?


I can't really explain the exact technical details about what is
happening, but I can give you a rough idea, and provide a fix.

What's happening is that the automatic generation of bounding slabs has
some sort of a problem with CGI differences, and this is causing it to
check for intersections with the text in lots of places where the text
can't possibly be.

The fix is to add a manual bounding box to the text, like:-

        text {
                ttf "timrom.ttf"
                "High Tech Automation"
                0.1, 0
                scale 0.15
                translate <-0.2, 2.6,-0.01>
                bounded_by {
                        box { <-0.2, 2.6,-0.01>,<1.5,3.0,0.01> }
                }
        }

With this slight change, you'll find that the version with the text
renders in only twice the time of the textless version, and there'll
only be 602,080 True Type Font tests instead of 60,249,600


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.