POV-Ray : Newsgroups : moray.win : CSG-Union vs. Merge |????<image-37kb> Server Time
29 Jul 2024 18:20:21 EDT (-0400)
  CSG-Union vs. Merge |????<image-37kb> (Message 1 to 4 of 4)  
From: David
Subject: CSG-Union vs. Merge |????<image-37kb>
Date: 5 Apr 1998 17:10:35
Message: <6g8s1e$9nu$1@oz.aussie.org>
Hi All,

    I seem to be having some trouble with CSG merges in Moray for Windows.

    Attached is a image that I basically copied out of "Raytracing Worlds
with Pov-Ray 2.2" book. As I understand it, the "Merge" image should be
completely hollow.

    I made this image as a test after other merges I attempted seem to fail,
Is this a bug in Moray or am I something important?

    BTW, Sorry if posting binaries here is wrong. But, I figure this is the
best place since I use Moray and haven't figure out Pov_ray script yet.

Thanks,
David


Post a reply to this message


Attachments:
Download 'iso-8859-1' (2 KB)

From: Johannes Hubert
Subject: Re: CSG-Union vs. Merge |????<image-37kb>
Date: 6 Apr 1998 04:52:17
Message: <6ga4n2$b63$1@oz.aussie.org>
Do I understand your image correctly? You used 2 "shells" with each shell
created as the difference of a sphere and a smaller sphere. You then made
two CSGs, each out of two of these shells, one a Union and one a Merge. And
you then made two more CSGs (differences this time) with the two former CSGs
and some kind of cube, to "cut" the shell-CSGs open to view the interior (or
something like that).

Well, I assume this is how you produced the image, so I try to reply with
this in mind. Only it is not to easily to explain in writing (at least not
for me :-). Here it goes:

Do not confuse the interior of a POV-Ray primitive with the "inside" of a
more complex object you create with a CSG. The interior of a box or sphere
for example is well defined. The "inside" of a CSG object (or at least, what
the user sees as the inside) may be something totally different, as in your
case:
What you interpret as the "inside" of your "shell" (the "hollow" part inside
the shell) is not the interior of the POV-Ray object. Instead for POV-Ray,
the interior of such a shell is the shell-part itself: The "blue" part in
your image. Since Merge only makes a difference regarding the interior of
the object as POV-Ray sees it (not as the user may percieve it
"intuitively"), it has nothing to do with making your second object "empty".

Somebody correct me if I am wrong, but I think you can only see a difference
between a Union and a Merge, if at least one object in the CSG has a at
least partially transparent texture, so that you can see "into" the object.
In my experience Unions render faster than Merges (is that true?) so the
only reason to use a Merge would be, when you have a CSG with transparent
objects and you don't want to see interior surfaces.

Try this: Make a CSG out of two normal spheres that intersect each other.
Assign some glass texture to the CSG (without refraction). Now watch the
difference between Union and Merge: With the Union, you can see the outline
of each sphere inside the other (through the glass). With the Merge both
objects become one: There are no interior surfaces to see.
Now do the same with your "shells" (only use a non refractive glass texture
now): You will see that now the shells continue inside of each other again.
This is because the "empty/hollow" part of the shells is not the "interior".
Well, it is "inside" of the shell, but for POV-Ray it has the same status as
any other place in 3D space "outside" of the shell: It is space occupied by
only one object (or none at all), so there is no need for any special
Merge-CSGing. But if you look closely at the shell's shell itself (what is
blue in your image, and should be "glassy" now) then you will again see a
difference between Union and Merge.

Pewh, hope it helps :-)

Johannes.


Post a reply to this message

From: Tony Vigil
Subject: Re: CSG-Union vs. Merge |????<image-37kb>
Date: 7 Apr 1998 05:09:14
Message: <3529ED39.886DDD7A@gte.net>
It appears that you have made a difference (a larger sphere minus a
smaller sphere), made copies of the CSG object, then unioned one set and
merged another another set.  I made this object in the first image by
doing a merge of the two smaller spheres and a merge of the two larger
spheres.  Then I did a difference of the two CSG objects and a box
(cube).

The object in the second image was much simpler to create.  I made two
spheres with the hollow function activated.  I created a CSG merge
object of the two spheres.  Next, I created a CSG difference object of
the previous CSG object & the box (cube).  Note that the box's texture
was made with a simple single color pigment with 100% transparency.

[Image]  [Image]

David wrote:

>  Hi All,     I seem to be having some trouble with CSG merges in Moray
> for Windows.     Attached is a image that I basically copied out of
> "Raytracing Worlds with Pov-Ray 2.2" book. As I understand it, the
> "Merge" image should be completely hollow.     I made this image as a
> test after other merges I attempted seem to fail, Is this a bug in
> Moray or am I something important?     BTW, Sorry if posting binaries
> here is wrong. But, I figure this is the best place since I use Moray
> and haven't figure out Pov_ray script yet. Thanks,David


Post a reply to this message


Attachments:
Download 'us-ascii' (3 KB) Download 'c:\windows\temp\nsmail3e.jpeg.jpg' (6 KB) Download 'c:\windows\temp\nsmailr1.jpeg.jpg' (5 KB)

Preview of image 'c:\windows\temp\nsmail3e.jpeg.jpg'
c:\windows\temp\nsmail3e.jpeg.jpg

Preview of image 'c:\windows\temp\nsmailr1.jpeg.jpg'
c:\windows\temp\nsmailr1.jpeg.jpg


 

From: David
Subject: Re: CSG-Union vs. Merge |????<image-37kb>
Date: 10 Apr 1998 00:26:29
Message: <6gk72d$po2$1@oz.aussie.org>
You almost had Johannes...:)

  I made two spheres, diff'd the one out of the other, cut with a cube. Then
made four copies and unioned/merged them as needed..:) I'll give 3/4 of a
Cigar for that..:)

    As for the rest of your post. I think I understand. Merge only works
where two objects intersect. But, the inner walls of my sphere weren't
actually intersecting because the inner sphere was diff'd out.

Thanks to everyone who answered my question.

David


Johannes Hubert wrote in message <6ga4n2$b63$1@oz.aussie.org>...
>Do I understand your image correctly? You used 2 "shells" with each shell
>created as the difference of a sphere and a smaller sphere. You then made
>two CSGs, each out of two of these shells, one a Union and one a Merge. And
>you then made two more CSGs (differences this time) with the two former
CSGs
>and some kind of cube, to "cut" the shell-CSGs open to view the interior
(or
>something like that).
>>


Post a reply to this message

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