POV-Ray : Newsgroups : povray.binaries.images : One trillion spheres Server Time
17 Nov 2024 20:26:32 EST (-0500)
  One trillion spheres (Message 1 to 3 of 3)  
From: IanT
Subject: One trillion spheres
Date: 30 Jan 2006 14:20:01
Message: <web.43de658c398fca0b232c06aa0@news.povray.org>
Hi all,

The attached not rendered with Povray but I thought it was an interesting
experiment worth sharing...

I was idly thinking this morning whether it would be possible to use some
CSG-acceleration techniques to render materials with billions/trillions+
actual particles rather than messing about with slow-to-render volume
and media effects.  After a few minutes (and a subtle but effective tweak
to my CSG union code) I came up with a scene that effectively contains
a trillion (1,000,000,000,000) spheres.  The entire scene occupies
200x200x200
units and each sphere is 0.00125 units in diameter.

The image attached is a deep zoom where you can (just) make out the
individual objects in the bottom-right corner.  Every visible object is
a tiny sphere.  I'm not entirely sure how many are represented in the field
of view, probably several billion.

Technical details ...

The scene is basically 4 nested levels of CSG unions as follows...

union(1000 * union (1000 * union (1000 * union(1000 * sphere))))

Each union contains its own 20x20x20 uniform-grid subdivision scheme (the
whole scene effectively contains 1 billion individual voxel grids) so the
parse/render times are surprisingly low for so many shapes (17s to parse and
around 17 minutes to render the attached at 1280x1024 and 4x4
anti-aliasing).
"Whole" views of the scene are rendered in under a minute, which bodes well
for my plans to render stone and smoke as billions of individual
particles...

I'm sure povray would be able to handle this, would be interesting to see
if anyone can replicate it and give me an idea of parse/render times.  Code
on request...

Ian.


Post a reply to this message


Attachments:
Download 'trillion_05_s.jpg' (698 KB)

Preview of image 'trillion_05_s.jpg'
trillion_05_s.jpg


 

From: Warp
Subject: Re: One trillion spheres
Date: 5 Feb 2006 06:02:12
Message: <43e5db34$1@news.povray.org>
IanT wrote:
> I came up with a scene that effectively contains
> a trillion (1,000,000,000,000) spheres.

   Unless you are using a 64-bit computer with dozens of gigabytes
of memory, I assume that you can't actually create that many
individual and independent spheres (ie. so that the location and
size of each sphere could be specified separately and independently
of any of the other spheres).

   If you just made a group of some millions of spheres and then
referenced it (without copying) several times, then it's possible,
of course, but you will only get copies of the group and not
individual independent spheres.

   Something similar to this can already be done in POV-Ray if you
use triangles instead of spheres.


Post a reply to this message

From: IanT
Subject: Re: One trillion spheres
Date: 8 Feb 2006 15:05:01
Message: <web.43ea4dfaa8a49e14417aa78b0@news.povray.org>
Yes, absolutely right.  The memory requirements are only for 1000 spheres
and 4 CSG union objects.  In my ray tracer, any CSG object or triangle mesh
is automatically assigned its own individual subdivision scheme (any one of
uniform grid, bounding volume hierarchy or kd-tree ... although I've
never found any reason yet to use anything other than uniform grid ...
it seems to outperform kd-tree by at least 20% in almost all cases, with the
unfortunate side-effect of needing a little more memory), which makes
rendering a "huge" CSG about as quick as a similar-size triangle mesh.

You're right that this approach isn't particularly flexible but I've since
found it useful for simulating rough textures, such as that on the surface
of
a brick, by clumping together billions of virtual boxes (per above method)
with each group having a slightly different texture and size/rotation.

I liked the ethereal/huge-scale quality of some of the images resulting
from the experiment hence me posting it...

Ian.

Warp <war### [at] tagpovrayorg> wrote:
> IanT wrote:
> > I came up with a scene that effectively contains
> > a trillion (1,000,000,000,000) spheres.
>
>    Unless you are using a 64-bit computer with dozens of gigabytes
> of memory, I assume that you can't actually create that many
> individual and independent spheres (ie. so that the location and
> size of each sphere could be specified separately and independently
> of any of the other spheres).
>
>    If you just made a group of some millions of spheres and then
> referenced it (without copying) several times, then it's possible,
> of course, but you will only get copies of the group and not
> individual independent spheres.
>
>    Something similar to this can already be done in POV-Ray if you
> use triangles instead of spheres.


Post a reply to this message

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