POV-Ray : Newsgroups : povray.advanced-users : rectangles Server Time
30 Jul 2024 06:28:21 EDT (-0400)
  rectangles (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Christoph Hormann
Subject: Re: rectangles
Date: 21 Jun 2000 01:42:58
Message: <395055E2.2AE0E761@schunter.etc.tu-bs.de>
Peter Popov wrote:
> 
> You've missed one. A zero-thickness box (yes it works). Try something
> like box { <-1,0,-1>, <1,0,1> } and see what happens. It should render
> faster than a regular box.
> 

I didn't know, it is possible ( similar to cylinder ) but definitely
worth trying.  

Christoph

--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Christoph Hormann
Subject: Re: rectangles
Date: 21 Jun 2000 01:43:02
Message: <395055E7.E9860113@schunter.etc.tu-bs.de>
Mike Williams wrote:
> 
> I'd guess that the vast majority of the tracing time would be consumed
> by looking for the bounding boxes which have been automatically
> generated. Each ray has to be checked against all 1000 bounding boxes,
> but once the bounding boxes have been located, the ray only has to be
> checked against at most one actual object. (Because the object exactly
> fills the bounding box, if there's no reflection or transparency the ray
> will always terminate at the first object). So the construction details
> of your object would only be expected to have a tiny influence the trace
> time.
> 

your argumentation sounds quite reasonable, even though objects are
partly transparent in this case :-) I also looked more on the memory 
point, where differences are much larger.  

Christoph

--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Warp
Subject: Re: rectangles
Date: 21 Jun 2000 05:25:54
Message: <39508a21@news.povray.org>
Christoph Hormann <Chr### [at] schunteretctu-bsde> wrote:
: AFAIK with large meshes, mesh { triangle... } will also be much better
: than union { triangle...}

  A mesh takes a lot less memory than a union of triangles.
  Perhaps a bit surprisingly a union does not render considerably slower than
a mesh (although one could think that a mesh could have some optimizations).

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Warp
Subject: Re: rectangles
Date: 21 Jun 2000 05:28:00
Message: <39508a9f@news.povray.org>
Have you tested if there's any difference in render time between putting
all those 1000 rectangles into a union or separately in the scene?
  Povray may be able to make some bounding box optimizations with unions,
but I may remember wrong.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Fabian BRAU
Subject: Re: rectangles
Date: 21 Jun 2000 06:13:48
Message: <3950954C.56F4A98A@umh.ac.be>
Question:

is the majority of the memory is used by the rectangle or not?
Because one mesh of an object or 1000 mesh (copies) of the
same mesh use almost the same amount of memory. So if the 
answer of my question is yes I dont understand why there is no
more difference between mesh and box for the memory peak.

Fabian.


> 
> Because I needed some simple rectangle shape for a scene I am working on
> and because it is used about 1000 times in the scene, I tried some
> different possibilities building that shape and checked
> memory-use/tracing time.
> 
> It is just a very quick test on a concrete scene, differences in time
> are quite low, so you probably can not say anything definitive from
> these values (did not want to wait longer :-).  BTW, scene also contains
> many other objects.
> 
> Any comments/ideas ?
> 
> Christoph
> 
> Objects I tested:
> 
> //------------------------------
> 
> mesh {
>    triangle{<0.0,0.0,0.0>,<0.0,0.0,1.0>,<1.0,0.0,1.0>}
>    triangle{<0.0,0.0,0.0>,<1.0,0.0,0.0>,<1.0,0.0,1.0>}
> }
> 
> //------------------------------
> 
> union {
>    triangle{<0.0,0.0,0.0>,<0.0,0.0,1.0>,<1.0,0.0,1.0>}
>    triangle{<0.0,0.0,0.0>,<1.0,0.0,0.0>,<1.0,0.0,1.0>}
> }
> 
> //------------------------------
> 
> box {
>    <0, -0.00001, 0>
>    <1,  0.00001, 1>
> }
> 
> //------------------------------
> 
> plane {
>   y, 0.0
>   hollow on
>   clipped_by { box
>    { <0, -0.1, 0>
>      <1,  0.1, 1> } }
> }
> 
> //------------------------------
> 
> polygon {
>   5, <0, 0>, <0, 1>, <1, 1>, <1, 0>, <0, 0>
>   rotate 90*x
> }
> 
> //------------------------------
> 
> Time/memory data:
> 
> ###################################################################
> -------------------------------------------------------------------
> mesh
> -------------------------------------------------------------------
> Peak memory used:         47840394 bytes
> -------------------------------------------------------------------
> Time For Parse:    0 hours  0 minutes  10.0 seconds (10 seconds)
> Time For Trace:    0 hours  3 minutes   7.0 seconds (187 seconds)
>     Total Time:    0 hours  3 minutes  17.0 seconds (197 seconds)
> ###################################################################
> -------------------------------------------------------------------
> union
> -------------------------------------------------------------------
> Peak memory used:         47803698 bytes
> -------------------------------------------------------------------
> Time For Parse:    0 hours  0 minutes  11.0 seconds (11 seconds)
> Time For Trace:    0 hours  3 minutes   3.0 seconds (183 seconds)
>     Total Time:    0 hours  3 minutes  14.0 seconds (194 seconds)
> ###################################################################
> -------------------------------------------------------------------
> box
> -------------------------------------------------------------------
> Peak memory used:         47920778 bytes
> -------------------------------------------------------------------
> Time For Parse:    0 hours  0 minutes  10.0 seconds (10 seconds)
> Time For Trace:    0 hours  3 minutes   2.0 seconds (182 seconds)
>     Total Time:    0 hours  3 minutes  12.0 seconds (192 seconds)
> ###################################################################
> -------------------------------------------------------------------
> clipped plane
> -------------------------------------------------------------------
> Peak memory used:         48296618 bytes
> -------------------------------------------------------------------
> Time For Parse:    0 hours  0 minutes  10.0 seconds (10 seconds)
> Time For Trace:    0 hours  3 minutes   0.0 seconds (180 seconds)
>     Total Time:    0 hours  3 minutes  10.0 seconds (190 seconds)
> ###################################################################
> -------------------------------------------------------------------
> polygon
> -------------------------------------------------------------------
> Peak memory used:         47882238 bytes
> -------------------------------------------------------------------
> Time For Parse:    0 hours  0 minutes  10.0 seconds (10 seconds)
> Time For Trace:    0 hours  2 minutes  57.0 seconds (177 seconds)
>     Total Time:    0 hours  3 minutes   7.0 seconds (187 seconds)
> ###################################################################
> 
> --
> Christoph Hormann <chr### [at] gmxde>
> Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Warp
Subject: Re: rectangles
Date: 21 Jun 2000 06:41:26
Message: <39509bd6@news.povray.org>
Fabian BRAU <Fab### [at] umhacbe> wrote:
: Because one mesh of an object or 1000 mesh (copies) of the
: same mesh use almost the same amount of memory.

  With that small mesh, not really. There has to be a way to say "a copy
of this mesh is located here". This 'handle' with information about the
copy may take even more memory than that mesh with two triangles.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Fabian BRAU
Subject: Re: rectangles
Date: 21 Jun 2000 06:44:35
Message: <39509C85.C2FCEB@umh.ac.be>
Thanks for the clarification.

Fabian.


> 
> Fabian BRAU <Fab### [at] umhacbe> wrote:
> : Because one mesh of an object or 1000 mesh (copies) of the
> : same mesh use almost the same amount of memory.
> 
>   With that small mesh, not really. There has to be a way to say "a copy
> of this mesh is located here". This 'handle' with information about the
> copy may take even more memory than that mesh with two triangles.
> 
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Christoph Hormann
Subject: Re: rectangles
Date: 21 Jun 2000 07:52:05
Message: <3950AC61.2412607F@schunter.etc.tu-bs.de>
Warp wrote:
> 
>   Have you tested if there's any difference in render time between putting
> all those 1000 rectangles into a union or separately in the scene?
>   Povray may be able to make some bounding box optimizations with unions,
> but I may remember wrong.
> 

The rectangles are already structured in unions. 

I tested different arrangements concerning this point (larger/smaller
blocks of rectangles) and there was only small difference in memory use,
but time was the same (+/- 1 sec)

Christoph

--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Christoph Hormann
Subject: Re: rectangles
Date: 21 Jun 2000 07:59:56
Message: <3950AE38.5879F2E7@schunter.etc.tu-bs.de>
I made a more specific test with a scene containing 11620 rectangles
(and only those rectangles :-).  


These are the results:


-----------------------------------------------------------------
mesh
-----------------------------------------------------------------
Peak memory used:         20078124 bytes
-----------------------------------------------------------------
Time For Parse:    0 hours  0 minutes   3.0 seconds (3 seconds)
Time For Trace:    0 hours  1 minutes  13.0 seconds (73 seconds)
    Total Time:    0 hours  1 minutes  16.0 seconds (76 seconds)

-----------------------------------------------------------------
triangle union
-----------------------------------------------------------------
Peak memory used:         20313423 bytes
-----------------------------------------------------------------
Time For Parse:    0 hours  0 minutes   4.0 seconds (4 seconds)
Time For Trace:    0 hours  1 minutes  35.0 seconds (95 seconds)
    Total Time:    0 hours  1 minutes  39.0 seconds (99 seconds)
          
-----------------------------------------------------------------
polygon
-----------------------------------------------------------------
Peak memory used:         20260648 bytes
-----------------------------------------------------------------
Time For Parse:    0 hours  0 minutes   3.0 seconds (3 seconds)
Time For Trace:    0 hours  1 minutes   9.0 seconds (69 seconds)
    Total Time:    0 hours  1 minutes  12.0 seconds (72 seconds)
    
-----------------------------------------------------------------
box 0 height
-----------------------------------------------------------------
Peak memory used:         20450420 bytes
-----------------------------------------------------------------
Time For Parse:    0 hours  0 minutes   2.0 seconds (2 seconds)
Time For Trace:    0 hours  1 minutes   7.0 seconds (67 seconds)
    Total Time:    0 hours  1 minutes   9.0 seconds (69 seconds)
    
-----------------------------------------------------------------
clipped plane
-----------------------------------------------------------------
Peak memory used:         22095452 bytes
-----------------------------------------------------------------
Time For Parse:    0 hours  0 minutes   3.0 seconds (3 seconds)
Time For Trace:    0 hours  1 minutes   9.0 seconds (69 seconds)
    Total Time:    0 hours  1 minutes  12.0 seconds (72 seconds)

--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: SamuelT
Subject: Re: rectangles
Date: 21 Jun 2000 13:16:09
Message: <3950F933.E71030D9@aol.com>
Ahhh! The zero-height box wins :) I'll be using those for my clouds now
:)

~Sam

Christoph Hormann wrote:

> -----------------------------------------------------------------
> polygon
> -----------------------------------------------------------------
> Peak memory used:         20260648 bytes
> -----------------------------------------------------------------
> Time For Parse:    0 hours  0 minutes   3.0 seconds (3 seconds)
> Time For Trace:    0 hours  1 minutes   9.0 seconds (69 seconds)
>     Total Time:    0 hours  1 minutes  12.0 seconds (72 seconds)
>
> -----------------------------------------------------------------
> box 0 height
> -----------------------------------------------------------------
> Peak memory used:         20450420 bytes
> -----------------------------------------------------------------
> Time For Parse:    0 hours  0 minutes   2.0 seconds (2 seconds)
> Time For Trace:    0 hours  1 minutes   7.0 seconds (67 seconds)
>     Total Time:    0 hours  1 minutes   9.0 seconds (69 seconds)
>
> -----------------------------------------------------------------
> clipped plane
> -----------------------------------------------------------------
> Peak memory used:         22095452 bytes
> -----------------------------------------------------------------
> Time For Parse:    0 hours  0 minutes   3.0 seconds (3 seconds)
> Time For Trace:    0 hours  1 minutes   9.0 seconds (69 seconds)
>     Total Time:    0 hours  1 minutes  12.0 seconds (72 seconds)
>
> --
> Christoph Hormann <chr### [at] gmxde>
> Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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