POV-Ray : Newsgroups : povray.general : VFAQ question Server Time
7 Aug 2024 17:27:01 EDT (-0400)
  VFAQ question (Message 1 to 8 of 8)  
From: Tom Melly
Subject: VFAQ question
Date: 6 Sep 2001 07:21:50
Message: <3b975c4e@news.povray.org>
Although this is in the 3.5 docs, it doesn't really have anything to do with
3.5, hence the post here...

In the VFAQ there is a section about rendering speeds of merge vs. union.

Whilst the information is correct (and interesting), it seems overly concerned
with the technical side of the problem, rather than the reality.

In reality, the choice between merge and union is basically one of effect, not
speed.

If you want visible inner surfaces you use union, if you don't, you use merge.
The choice isn't dictated by "which is faster", but "what effect do I want".

Therefore, the only exception to this is if your csg object is non-transparent,
when you should always use union, since this is the only time when the results
will be identical (and union is invariably faster).

--
#macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
}light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM


Post a reply to this message

From: Warp
Subject: Re: VFAQ question
Date: 6 Sep 2001 07:39:58
Message: <3b97608e@news.povray.org>
The question to which the answer is responding is not "which should I use,
union or merge?", but it's about the *speed* of different CSG operations.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Tom Melly
Subject: Re: VFAQ question
Date: 6 Sep 2001 07:52:56
Message: <3b976398$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message news:3b97608e@news.povray.org...
>   The question to which the answer is responding is not "which should I use,
> union or merge?", but it's about the *speed* of different CSG operations.

Okay. So its the right answer to the wrong question.... The implication is that
the two methods will produce identical results. The only time that this is true
(non-trans. surfaces), union is invariably faster. For all other uses, you may
as well ask, "Which is more useful? Chalk or cheese?"

Contentious Tom...


Post a reply to this message

From: Gilles Tran
Subject: Re: VFAQ question
Date: 6 Sep 2001 08:03:34
Message: <3B976698.D4759AF2@inapg.inra.fr>
Tom Melly wrote:

> Okay. So its the right answer to the wrong question.... The implication is that
> the two methods will produce identical results. The only time that this is true
> (non-trans. surfaces), union is invariably faster. For all other uses, you may
> as well ask, "Which is more useful? Chalk or cheese?"

I second that. One additional problem is that the doc (6.5.6.5) states that "merge
is slower rendering than union so it should only be used when it is really
necessary". But later the VFAQ says that "A very common allegation is that "merge
is always slower than union". This statement is not true." Looks like the doc is
picking fights with itself. Talk about schizophrenia... :)

G.


--

**********************
http://www.oyonale.com
**********************
Graphic experiments
Pov-ray gallery


Post a reply to this message

From: Warp
Subject: Re: VFAQ question
Date: 6 Sep 2001 09:22:03
Message: <3b97787b@news.povray.org>
As the VFAQ is practially an independent documentation attached to the
main documentation, this kind of contradictions are very possible and hard
to track.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: ingo
Subject: Re: VFAQ question
Date: 6 Sep 2001 11:19:34
Message: <Xns9114B040AE26Eseed7@povray.org>
in news:3B976698.D4759AF2@inapg.inra.fr Gilles Tran wrote:

> One additional problem is that the doc (6.5.6.5) states that "merge
> is slower rendering than union so it should only be used when it is
> really necessary".

Changed that one a bit.

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Warp
Subject: Re: VFAQ question
Date: 6 Sep 2001 11:39:09
Message: <3b97989d@news.povray.org>
ingo <ing### [at] homenl> wrote:
:> One additional problem is that the doc (6.5.6.5) states that "merge
:> is slower rendering than union so it should only be used when it is
:> really necessary".

: Changed that one a bit.

  How did you change it? I think it may be enough to add "with non-transparent
objects" somewhere, or something like that. (And perhaps add a note that
with transparent objects the behaviour is different and the proper CSG should
be chosen depending on that.)

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: ingo
Subject: Re: VFAQ question
Date: 6 Sep 2001 12:00:09
Message: <Xns9114B720D5055seed7@povray.org>
in news:3b97989d@news.povray.org Warp wrote:

> How did you change it?

Note that in general merge is slower rendering than union when used 
with non transparent objects. A small test may be needed to determine 
what is the optimal solution regarding speed and visual result.

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

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