 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I just can't get this to work. Accuracy, method and max_gradient (over 2000)
have no effect at all. The artifact stays there.
The right half of the front-side of the box is shadowed. It depends on
the location of the camera (eg. if the camera is moved a bit to the right, the
shadowed area moves as well).
Another interesting effect happens when you uncomment the last light_source
in the example scene. Since it's inside the isosurface, it shouldn't illuminate
anything. However, it not only illuminates the isosurface itself but also
the floor.
Any explanation / fix suggestion?
---------8<---------8<---------8<---------8<---------8<---------8<------
#version Unofficial MegaPov 0.6;
#declare ObjectFunc =
function { pigment { boxed color_map { [0 rgb 1][0 rgb 0][1 rgb 0] } } }
isosurface
{ function { ObjectFunc(x,y,z) }
contained_by { box { -1.01,1.01 } }
max_gradient 2000
threshold .5
pigment { rgb x+y }
}
camera { location <0,5,-10>*.7 look_at 0 angle 35 }
light_source { <100,200,-150>, 1 }
plane { y,-1 pigment { checker rgb 1, rgb .5 } }
//light_source { 0, x }
---------8<---------8<---------8<---------8<---------8<---------8<------
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Problably (once more) a precision problem.
try this:
function { pigment { boxed color_map { [0 rgb .51][0 rgb .49][1 rgb 0] }
} }
Bouf.
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: Bug in isosurface using pigment function?
Date: 24 Nov 2000 08:20:42
Message: <3a1e6b2a@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Warp wrote in message <3a1e53fd@news.povray.org>...
> I just can't get this to work. Accuracy, method and max_gradient (over
2000)
> have no effect at all. The artifact stays there.
I have noticed the same problem.
first I prepare CSG than I declare function{pigment{object{...}}} to
describe interior of it
and then I clone this as isosurface. Isosurface has artifacts even with
accuracy 0.00005.
I have calculated value (with eval) of max_gradient as 200000 but this
not help. I read somewhere that pigments has smaller precision than
coordinates and pervaps this is cause.
I have also noticed that there is no hilights on iso-cloned object which
appear in original csg.
This means that normals are completely wrong.
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
>
> I just can't get this to work. Accuracy, method and max_gradient (over 2000)
> have no effect at all. The artifact stays there.
> [...]
> #declare ObjectFunc =
> function { pigment { boxed color_map { [0 rgb 1][0 rgb 0][1 rgb 0] } } }
>
It's the old problem of abrupt changes (infinite gradient) in the
isosurface function. In general the boxed pigment is well suited for
isosurface functions but with your color_map it has the same problem as
object pattern / crackle solid / ...
If you try
function { pigment { boxed color_map { [0 rgb 1][k rgb 0][1 rgb 0] } } }
with 0.1 > k > 0.0 and check the max_gradient values (using eval), this
should become clear.
BTW, the max_gradient with k=0.0 purely depends on the accuracy.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a1e6b2a@news.povray.org>, "Wlodzimierz ABX Skiba"
<abx### [at] abx art pl> wrote:
> first I prepare CSG than I declare function{pigment{object{...}}} to
> describe interior of it and then I clone this as isosurface.
> Isosurface has artifacts even with accuracy 0.00005.
> I have calculated value (with eval) of max_gradient as 200000 but this
> not help.
The object pattern has two states: on and off. It doesn't have any
"in-between" values. Patterns like this have an infinite gradient, and
cause the isosurface algorithm problems. Other patterns that have this
problem are checkers, hexagon, brick, and any pigment that has sharp
lines. Warp is using the boxed pattern, which does vary smoothly, but
his color_map is [0 rgb 1][0 rgb 0][1 rgb 0], which looks like a mistake
to me...it is completely black, with no variation at all, basically a
big, slow rendering 0. I think he wants [0 rgb 1][1 rgb 0] instead.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a1e53fd@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
You declared your pigment as:
#declare ObjectFunc =
function {
pigment {boxed
color_map {[0 rgb 1][0 rgb 0][1 rgb 0]}
}
}
What are you expecting this color_map to result in? It starts out as
white, but goes to black in 0 distance and ends in black, basically a
black pigment...isosurfaces require a smoothly varying function. My
guess is you want either this:
color_map {[0 rgb 1][1 rgb 0]}
or something similar to this:
color_map {[0 rgb 1][0.5 rgb 0][1 rgb 0]}
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: Bug in isosurface using pigment function?
Date: 24 Nov 2000 09:36:10
Message: <3a1e7cda@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
>In article <3a1e6b2a@news.povray.org>, "Wlodzimierz ABX Skiba"
><abx### [at] abx art pl> wrote:
>
> > first I prepare CSG than I declare function{pigment{object{...}}} to
> > describe interior of it and then I clone this as isosurface.
> > Isosurface has artifacts even with accuracy 0.00005.
> > I have calculated value (with eval) of max_gradient as 200000 but
this
> > not help.
>
> The object pattern has two states: on and off. It doesn't have any
> "in-between" values. Patterns like this have an infinite gradient, and
> cause the isosurface algorithm problems. Other patterns that have this
> problem are checkers, hexagon, brick, and any pigment that has sharp
> lines.
I know this but unfortunatly in current (unoficial) state of pov this is
only way to play with described week ago nonlinear transformations.
Everything is ok but normals.
hmmm
perhaps the problem can be resolved just like in smooth_triangle ?
in 2D description:
1. take point at equipotential surface
P
2. take value at corners of cube around of it (size of cube depends of
accuracy)
V1---V2
|\ /|
| P |
|/ \|
V3---V4
3. find points on edges where value is like in P
4. aproximate normal
ABX at babilon at org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Wlodzimierz ABX Skiba wrote:
>
>
> I know this but unfortunatly in current (unoficial) state of pov this is
> only way to play with described week ago nonlinear transformations.
> Everything is ok but normals.
>
I don't think so, AFAIK, every surface could somehow be approximated with
a smooth isosurface function, although it can be quite complicated and i
agree that it would be nice to use an object pattern for this purpose.
> perhaps the problem can be resolved just like in smooth_triangle ?
>
> in 2D description:
>
> 1. take point at equipotential surface
> P
> 2. take value at corners of cube around of it (size of cube depends of
> accuracy)
> V1---V2
> |\ /|
> | P |
> |/ \|
> V3---V4
> 3. find points on edges where value is like in P
> 4. aproximate normal
But there is no point in pigment { checker color rgb 0 color rgb 1 } where
the value is 0.5 so there is also no equipotential surface for this value.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: Bug in isosurface using pigment function?
Date: 24 Nov 2000 11:19:02
Message: <3a1e94f6@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Christoph Hormann wrote in message
<3A1E8FCA.A806F53B@schunter.etc.tu-bs.de>...
> > I know this but unfortunatly in current (unoficial) state of pov
this is
> > only way to play with described week ago nonlinear transformations.
> > Everything is ok but normals.
>
> I don't think so, AFAIK, every surface could somehow be approximated
with
> a smooth isosurface function, although it can be quite complicated and
i
> agree that it would be nice to use an object pattern for this purpose.
I use this feature only to explore iso-functions possibilities of my
non-linear transformation. But if I want make usefull macro it should be
possible modify any object, not only described as functions. First one
is csg, second one is iso-non-linear-transformation, there is place for
third one but I'm working on it:
http://www.abx.art.pl/pov/nonlinear/twist.jpg
> But there is no point in pigment { checker color rgb 0 color rgb 1 }
where
> the value is 0.5 so there is also no equipotential surface for this
value.
hmmm
ABX at babilon at org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Wlodzimierz ABX Skiba wrote:
>
> I use this feature only to explore iso-functions possibilities of my
> non-linear transformation. But if I want make usefull macro it should be
> possible modify any object, not only described as functions. First one
> is csg, second one is iso-non-linear-transformation, there is place for
> third one but I'm working on it:
> http://www.abx.art.pl/pov/nonlinear/twist.jpg
>
Every CSG made of cylinders, spheres, cones, boxes, torii should be quite
easy to convert to a smooth isosurface function, the more difficult things
are lathe, prism and meshes.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: Bug in isosurface using pigment function?
Date: 24 Nov 2000 11:49:39
Message: <3a1e9c23@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Christoph Hormann wrote in message
<3A1E9A74.B6428D71@schunter.etc.tu-bs.de>...
> Every CSG made of cylinders, spheres, cones, boxes, torii should be
quite
> easy to convert to a smooth isosurface function, the more difficult
things
> are lathe, prism and meshes.
yes, I know
but as I said I'm looking for universal method (equations)
perhaps to code in source code
ABX -> just look -> http://www.mdk.art.pl/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Wlodzimierz ABX Skiba wrote:
>
> Chris Huff wrote in message ...
> >In article <3a1e6b2a@news.povray.org>, "Wlodzimierz ABX Skiba"
> ><abx### [at] abx art pl> wrote:
> >
> > > first I prepare CSG than I declare function{pigment{object{...}}} to
> > > describe interior of it and then I clone this as isosurface.
> > > Isosurface has artifacts even with accuracy 0.00005.
> > > I have calculated value (with eval) of max_gradient as 200000 but
> this
> > > not help.
> >
> > The object pattern has two states: on and off. It doesn't have any
> > "in-between" values. Patterns like this have an infinite gradient, and
> > cause the isosurface algorithm problems. Other patterns that have this
> > problem are checkers, hexagon, brick, and any pigment that has sharp
> > lines.
>
> I know this but unfortunatly in current (unoficial) state of pov this is
> only way to play with described week ago nonlinear transformations.
> Everything is ok but normals.
The couple of images I posted a few weeks ago didn't use the object
pattern, but proximity.
I don't know if this is what you were talking abut though.
--
François DISPOT -- http://www.wozzeck.net
__ __ __ __ _
| | / \ / / |_ / |/
\/\/ \__/ /_ /_ |__ \_ |\
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a1e7cda@news.povray.org>, "Wlodzimierz ABX Skiba"
<abx### [at] abx art pl> wrote:
> I know this but unfortunatly in current (unoficial) state of pov this is
> only way to play with described week ago nonlinear transformations.
The proximity pattern will be better for this, but in it's current state
is too slow to make a practical pigment function.
> perhaps the problem can be resolved just like in smooth_triangle ?
I don't see how...in a smooth triangle, you manually specify the normal
at each corner. Isosurfaces don't have such convenient control
points...and the results would probably look horrible.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3A1E9A74.B6428D71@schunter.etc.tu-bs.de>,
chr### [at] gmx de wrote:
> Every CSG made of cylinders, spheres, cones, boxes, torii should be quite
> easy to convert to a smooth isosurface function, the more difficult things
> are lathe, prism and meshes.
A sor should be pretty easy, a lathe shouldn't be extremely difficult. A
mesh may not be a huge problem either. Simple convex prisms also
wouldn't be hard, but concave or self-intersecting prisms could be a
bigger problem.
Basically the distance of the nearest point on the surface, with a
negative sign if inside the object and a positive sign if outside.
This is what my proximity pattern will eventually do.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote:
>
> A sor should be pretty easy, a lathe shouldn't be extremely difficult. A
> mesh may not be a huge problem either. Simple convex prisms also
> wouldn't be hard, but concave or self-intersecting prisms could be a
> bigger problem.
With linear splines this should be easy too, but the others would involve
some more complicated math that would probably be quite slow when not hard
coded.
> Basically the distance of the nearest point on the surface, with a
> negative sign if inside the object and a positive sign if outside.
> This is what my proximity pattern will eventually do.
proximity pattern is quite slow right now, but for linear spline
prisms/lathe/sor, i could think of a different algorithm dividing space
into segments where proximity only depends on a single plane, that would
use quite a lot of memory, but it would be fast. Of course this would
also have some problems with concave shapes, but since the isosurface use
only needs good results near the actual surface, this is not that
problematic.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: Bug in isosurface using pigment function?
Date: 25 Nov 2000 04:58:35
Message: <3a1f8d4b@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Christoph Hormann wrote in message
<3A1F8692.ECF21C45@schunter.etc.tu-bs.de>...
> > Basically the distance of the nearest point on the surface, with a
> > negative sign if inside the object and a positive sign if outside.
> > This is what my proximity pattern will eventually do.
>
> proximity pattern is quite slow right now...
but don't need so much small accuracy and perhaps so big max_gradient
therefore this could be faster than pigment{object{}}
I'll tell you after (ray)tracing
ABX
VooVoo is not VooDoo -> http://www.voovoo.art.pl/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a1f8d4b@news.povray.org>, "Wlodzimierz ABX Skiba"
<abx### [at] abx art pl> wrote:
> but don't need so much small accuracy and perhaps so big max_gradient
> therefore this could be faster than pigment{object{}}
In order to get a smooth enough pattern that the isosurface algorithm
can use it, you need to use a huge number of samples. It has been tried
before, but was too slow to be of practical use.
However, I am working on an updated version that has specialized
proximity functions for each object as well as the existing sampling
function...this will be much faster for many objects.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: Bug in isosurface using pigment function?
Date: 26 Nov 2000 08:59:49
Message: <3a211755@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Chris Huff wrote in message ...
> However, I am working on an updated version that has specialized
> proximity functions for each object as well as the existing sampling
> function...this will be much faster for many objects.
sounds great
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff <chr### [at] mac com> wrote:
: but
: his color_map is [0 rgb 1][0 rgb 0][1 rgb 0], which looks like a mistake
: to me...it is completely black, with no variation at all
Did you actually try to render an object with that pigment?
It's not completely black :)
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff <chr### [at] mac com> wrote:
: What are you expecting this color_map to result in? It starts out as
: white, but goes to black in 0 distance and ends in black, basically a
: black pigment...
Try rendering a plane with that pigment.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3a221a8d@news.povray.org>, Warp <war### [at] tag povray org>
wrote:
> Did you actually try to render an object with that pigment?
I rendered a unit-radius sphere... :-(
> It's not completely black :)
Right...it's a black cube surrounded with white, something that could
just as easily been done using the object pattern with a box. It still
won't work very well for isosurfaces, which dislike instantaneous
changes in value.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Well, my original idea was precisely trying to recreate any object with
an isosurface using an object pigment. Seems that I'm not the first to
get the idea.
And I understand now why it doesn't work.
So still no easy non-uniform transformations. Sorry :)
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
>
> Well, my original idea was precisely trying to recreate any object with
> an isosurface using an object pigment. Seems that I'm not the first to
> get the idea.
Someone tried it a while ago. Using "object" pattern doesn't work,
because of the "abrupt changes". Using "proximity" pattern works
better, but is, as expected, awfully slow...
Fabien.
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Wlodzimierz ABX Skiba
Subject: Re: Bug in isosurface using pigment function?
Date: 27 Nov 2000 11:03:52
Message: <3a2285e8$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
Fabien Mosen wrote in message <3A227FD2.280D7793@skynet.be>...
> Someone tried it a while ago. Using "object" pattern doesn't work,
> because of the "abrupt changes". Using "proximity" pattern works
> better, but is, as expected, awfully slow...
currently I'm trying with specialized patch
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |