POV-Ray : Newsgroups : povray.newusers : How many objects? : Re: How many objects? Server Time
28 Jul 2024 22:23:24 EDT (-0400)
  Re: How many objects?  
From: Mike Williams
Date: 16 Jul 2007 10:49:50
Message: <Qv8XUGAVQ4mGFwTf@econym.demon.co.uk>
Wasn't it Transient who wrote:
>How many objects I can place in a scene? Thousands, millions, billions?
>To be more specific lets say I want to draw a scene with 1 million spheres.
>How much time it will take (roughly, on a modern PC) ? What are the critical
>characteristics of a computer (cache, frequency, CPU, memory, graphic card)
>which would let me plot more objects faster?

It depends on what sort of shortcuts you're willing to accept.

I have rendered a scene that had 20 billion polygons in it, but that was
achieved by having many copies of the same mesh in the scene. If I
hadn't used that trick, then I once calculated that the source for the
image would have had a file size of 1.7 Terabytes.

I've never really pushed the limits with discrete objects, like spheres,
but POV whizzes through the processing of a million spheres. Try this
scene:

global_settings {assumed_gamma 1.0}
#declare M=100;
union {
  #declare X=0;
  #while (X<M)
    #declare Y=0;
    #while (Y<M)
      #declare Z=0;
      #while (Z<M)
        sphere{<X,Y,Z>,1}
        #declare Z=Z+1;
      #end
      #declare Y=Y+1;
    #end
    #declare X=X+1;
  #end 
  pigment {rgb 1}
}
camera {location  <1.5,1.5,-1>*M look_at <M,M,M>/2}
light_source {<3, 10, -30>*M color rgb 1}

Memory is going to be the limiting feature when dealing with sheer
numbers of objects. POV says that the "peak memory used" for those
million spheres was 290 Mb, but the scene with the 20 billion polygons
used far less - I ran it on a machine that only had 256Mb of memory, and
Windows ate a considerable percentage of that.

Note that the graphics card has no effect on the speed of POVRay. The
computer that I used for the 20 billion polygons image didn't have a
graphics card.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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