POV-Ray : Newsgroups : povray.binaries.images : Energy drink Server Time
1 Aug 2024 16:23:52 EDT (-0400)
  Energy drink (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Larp
Subject: Re: Energy drink
Date: 12 Aug 2008 17:48:35
Message: <48a20532@news.povray.org>
Mike Williams wrote:

> It looks like you might be attempting to difference the
> can with a union of blobs each of which have a single
> element.

Yes, you're right.

> That doesn't gain you the advantage of the blob 
> trick. What you have to do is difference the can with a
> single blob object that has lots of components.
> 
> blob { threshold 1
>     cylinder { <0,0.6,0><2,0.6,2>, 0.03, 10000 }
>       rotate <0,RotY1,0>
>       translate <0,PosY1,0>
>     cylinder { <0,0.6,0><2,0.6,2>, 0.03, 10000 }
>       rotate <0,RotY2,0>
>       translate <0,PosY2,0>
>     cylinder { <0,0.6,0><2,0.6,2>, 0.03, 10000 }
>       rotate <0,RotY3,0>
>       translate <0,PosY3,0>
>     ...
> }

I assume you mean this (see the position of brackets):

blob { threshold 1
    cylinder { <0,0.6,0><2,0.6,2>, 0.03, 10000 
      rotate <0,RotY1,0>
      translate <0,PosY1,0> }
    cylinder { <0,0.6,0><2,0.6,2>, 0.03, 10000 
      rotate <0,RotY2,0>
      translate <0,PosY2,0> }
    cylinder { <0,0.6,0><2,0.6,2>, 0.03, 10000 
      rotate <0,RotY3,0>
      translate <0,PosY3,0> }
    ...
}

Anyway, I changed the structure to single blob version and
got render time of... 1 hour 6 minutes! It's shorter time
with the previous run, but still very much the same as with
the original code, so at this time blobs didn't speed up
things. That is tragical, because I already had strong
faith in faster rendering. :=)

   Larp


Post a reply to this message

From: Mike Williams
Subject: Re: Energy drink
Date: 13 Aug 2008 00:14:38
Message: <P2D4$IBo+loIFwIB@econym.demon.co.uk>
Wasn't it Larp who wrote:
>Anyway, I changed the structure to single blob version and
>got render time of... 1 hour 6 minutes! It's shorter time
>with the previous run, but still very much the same as with
>the original code, so at this time blobs didn't speed up
>things. That is tragical, because I already had strong
>faith in faster rendering. :=)

The scene below takes 2 seconds to render on my machine. I can imagine 
that fancy lighting and focal blur would slow it down, but not by that 
much.

How fast is your scene without the holes?


camera {location  <0, 2, -10> look_at <0,1,0> angle 40}
light_source { <0, 0, 0> color rgb 1  translate <-30, 30, -30>}

#declare CAN = difference {
   cylinder { <0, 0, 0>, <0, 3, 0>, 1 }
   cylinder { <0, -0.1, 0>, <0, 3.1, 0>, 0.97 }
}

#declare R1 = seed(123);
#declare HOLES = blob { threshold 1
   #declare N=0;
   #while (N<1000)
     sphere { <0.985,0.6,0>, 0.03, 10000
       rotate <0,rand(R1)*360,0>
       translate <0,rand(R1)*2,0> }
     #declare N=N+1;
   #end
}

difference {
   object {CAN}
   object {HOLES}
   pigment {rgb 1}
}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Larp
Subject: Re: Energy drink
Date: 13 Aug 2008 15:44:48
Message: <48a339b0@news.povray.org>
Mike Williams wrote:

> The scene below takes 2 seconds to render on my machine. I
> can imagine that fancy lighting and focal blur would slow
> it down, but not by that much.
> 
> How fast is your scene without the holes?

Rendering without holes or focal blur took 6 minutes 3
seconds. 

The can is defined in separate include file which is quite
complex cocktail of lathes, prisms, tori, sphere sweeps
etc. - in overall 444 rows. I'm not surprised rendering
takes some time. Still I'm somehow happy with the results,
even to render something like this 29 hours is not sane at
all...

   Larp


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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