![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi.
I have just started using pov and I do not have any prior experience
with other similar products.
I tried to follow the documentation and create a simple image of five
glass balls overlapping in a "merge" statement according to what I read
in the docs it should have rendered one solid object made of all the
balls, but no matter what I do I still see the overlapping boundaries.
I have tried it with/without AA. Ihave tried it with official pov and
with uvpov. I have rased and dropped the intensity of the lights. and
cannot make them go away.
I would appreciate it if someone could make me solve this, or understand
it.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Kevork,
It's very hard to figure whats going on without knowing exactly what you've
done. Give us a hand here and include your code in a reply to this message.
Graham.
Kevork Abadjian wrote:
> Hi.
>
> I have just started using pov and I do not have any prior experience
> with other similar products.
>
> I tried to follow the documentation and create a simple image of five
> glass balls overlapping in a "merge" statement according to what I read
> in the docs it should have rendered one solid object made of all the
> balls, but no matter what I do I still see the overlapping boundaries.
> I have tried it with/without AA. Ihave tried it with official pov and
> with uvpov. I have rased and dropped the intensity of the lights. and
> cannot make them go away.
>
> I would appreciate it if someone could make me solve this, or understand
> it.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Kevork Abadjian wrote:
>
> Hi.
>
> I have just started using pov and I do not have any prior experience
> with other similar products.
>
> I tried to follow the documentation and create a simple image of five
> glass balls overlapping in a "merge" statement according to what I read
> in the docs it should have rendered one solid object made of all the
> balls, but no matter what I do I still see the overlapping boundaries.
> I have tried it with/without AA. Ihave tried it with official pov and
> with uvpov. I have rased and dropped the intensity of the lights. and
> cannot make them go away.
>
> I would appreciate it if someone could make me solve this, or understand
> it.
What you are probably seeing is correct behaivior for the function.
Merge will not make the interior surfaces dissapear per se. What will
instead happen is that you will have no two areas overlapping. Think
of like this. If your spheres were flat and arranged in a pie shape.
You then divide the pie up into equal sections like cutting it with a
knife. What you will see is the dividing line where each sphere's
surface now forms an internal divider with no overlapping of materials.
It doesn't remove these internal dividers but actually creates them for
you. A simple way to test this would be to make six spheres. Arrange them
roughly in a circle larger than the circumference of the sheres you use.
Make every other sphere clear ( rgbf 0 ) and then assign a different
color to the other three spheres. You will now see when rendered that
where the color spheres over lap the clear spheres that a straight boundry
line is formed instead of the additive of the color and the clear in that
area where they overlap. To remove the boundry line takes a bit more work
than just using a merge CSG function.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I was looking at the two replies posted to my message and as far as I can see
Ken explained the situation even better than I could; but he stopped just short
of a suggestion to fix the problem.
there is nothing special about the source, I am using the std seen file and
just and std texture for glass and a switch to toggle on an off the photones.
here is the source:
// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3.1
// Desc: Basic Scene Example
// Date: mm/dd/yy
// Auth: ?[esp]
//
#version 3.1
#include "colors.inc"
#include "glass.inc"
#declare phd=1.0; // lower this value for a higher density (better
// quality render)
#declare phon=0; //turn pgotons off or on (0/1)
global_settings
{
assumed_gamma 1.0
max_trace_level 20
#if (phon)
photons{
gather 20,100
radius 0.1*phd, 2, 0.1*phd
autostop 0
}
#end
}
// ----------------------------------------
camera
{
location <0.0, 0.5, -4.0>
direction 1.5*z
right 4/3*x
look_at <0.0, 0.0, 0.0>
}
//sky_sphere
//{
// pigment
// {
// gradient y
// color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
// }
//}
light_source
{
0*x // light's position (translated below)
color red 1.0 green 1.0 blue 1.0 // light's color
translate <-30, 30, -30>
}
// ----------------------------------------
plane { y, -1 pigment {color rgb <0.7,0.5,0.3>}}
#declare ball = sphere
{<-.7,-0.3,0>, 0.4
texture {T_Glass3}
interior{ior 1.5}
#if (phon)
photons{
density 0.01*phd
reflection on
refraction on
}
#end
}
#declare cnt=0
#while (cnt < 5)
merge {
object {ball
translate <cnt/2.5,0,0>
}
#declare cnt=cnt+1
}
#end
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Kevork Abadjian wrote:
>
> I was looking at the two replies posted to my message and as far as I can see
> Ken explained the situation even better than I could; but he stopped just short
> of a suggestion to fix the problem.
>
> there is nothing special about the source, I am using the std seen file and
> just and std texture for glass and a switch to toggle on an off the photones.
Your misunderstanding about how the merge function is supposed to behave
is not to do with the results you are witnessing from the example you are
using but instead of the way you are using a CSG operation inside of a
while loop. The correct way to implement a merge using a csg is like the
example below. It is your while loop rearranged to operate correctly.
When using a CSG within a while loop you must move the merge statement
outside the while statement or it is not acted upon correctly. Don't
ask me why this is so but I found after many hair pulling sessions and
then finaly by asking in these groups how to solve my problem. So without
further ado...
// This should now act correctly for a merge csg operation:
#declare cnt=0
merge {
#while (cnt < 5)
object {ball
translate <cnt/2.5,0,0>
}
#declare cnt=cnt+1
#end
}
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Well, now I'm a bit confused too...
what am I doing wrong?
MERGE from the docs:
"The union operation just glues objects together, it does not remove the
objects' surfaces inside the union. Under most circumstances this
doesn't matter. However if a transparent union is used, those interior
surfaces will be visible. The merge operations can be used to avoid this
problem. It works just like union but it eliminates the inner
surfaces..."<snip>
I changed the code a little. I dropped the texture to use a pigment that
changes
color from sphere to sphere with a .7 transmit in order to show that
merge did
NOT as the docs say "eliminates the inner surfaces".
Heres my change:
#declare cnt=0;
#while (cnt < 5)
merge {
sphere{<-.7,-0.3,0>, 0.4
translate <cnt/2.5,0,0>
}
pigment{rgbt<cnt*0.05,cnt/4.5,0.5,0.7>}//texture {T_Glass3}
//interior{ior 1.5}
#if (phon)
photons{
density 0.01*phd
reflection on
refraction on
}
#end
//rotate y*50 //I was checking to see if it was just an
effect of a bad angle
}
#declare cnt=cnt+1
#end
------------------------------------------------------------------------
I'll post my render of this in povray.images under "Help with CGS"
--
...coffee?...yes please! extra sugar,extra cream...Thank you.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Phil Clute wrote:
>
> Well, now I'm a bit confused too...
> what am I doing wrong?
>
> MERGE from the docs:
> "The union operation just glues objects together, it does not remove the
> objects' surfaces inside the union. Under most circumstances this
> doesn't matter. However if a transparent union is used, those interior
> surfaces will be visible. The merge operations can be used to avoid this
> problem. It works just like union but it eliminates the inner
> surfaces..."<snip>
>
> I changed the code a little. I dropped the texture to use a pigment that
> changes
> color from sphere to sphere with a .7 transmit in order to show that
> merge did
> NOT as the docs say "eliminates the inner surfaces".
Your code suffers the same as his in that the merge needs to be specified
outside the while loop before it will be acted upon.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Aha! that fixed it!
--
...coffee?...yes please! extra sugar,extra cream...Thank you.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Ken wrote:
>
> while loop. The correct way to implement a merge using a csg is like the
> example below. It is your while loop rearranged to operate correctly.
> When using a CSG within a while loop you must move the merge statement
> outside the while statement or it is not acted upon correctly. Don't
> ask me why this is so but I found after many hair pulling sessions and
> then finaly by asking in these groups how to solve my problem.
What do you expect? If you have the "merge" _inside_ the #while
loop, POV creates a "merge"-object fo each pass through the
loop. That's the way things work. No need to ask "why?"
Markus
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Markus Becker wrote:
>
> Ken wrote:
> >
> > while loop. The correct way to implement a merge using a csg is like the
> > example below. It is your while loop rearranged to operate correctly.
> > When using a CSG within a while loop you must move the merge statement
> > outside the while statement or it is not acted upon correctly. Don't
> > ask me why this is so but I found after many hair pulling sessions and
> > then finaly by asking in these groups how to solve my problem.
>
> What do you expect? If you have the "merge" _inside_ the #while
> loop, POV creates a "merge"-object fo each pass through the
> loop. That's the way things work. No need to ask "why?"
>
> Markus
Not altogether a programmer type and struggling to use what I can of these
functions I expect no more or no less than what I can figure out myself
of from what I can learn from the generous guidance of others. What is
intuitively obvious to you is sometimes heap big juju magic to me.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |