POV-Ray : Newsgroups : povray.unofficial.patches : Bug in isosurface using pigment function? Server Time
2 Sep 2024 02:19:04 EDT (-0400)
  Bug in isosurface using pigment function? (Message 5 to 14 of 24)  
<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Chris Huff
Subject: Re: Bug in isosurface using pigment function?
Date: 24 Nov 2000 09:16:18
Message: <chrishuff-2CD9BB.09164624112000@news.povray.org>
In article <3a1e6b2a@news.povray.org>, "Wlodzimierz ABX Skiba" 
<abx### [at] abxartpl> 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] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Chris Huff
Subject: Re: Bug in isosurface using pigment function?
Date: 24 Nov 2000 09:20:24
Message: <chrishuff-E00AB6.09205224112000@news.povray.org>
In article <3a1e53fd@news.povray.org>, Warp <war### [at] tagpovrayorg> 
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] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, 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] abxartpl> 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

From: Christoph Hormann
Subject: Re: Bug in isosurface using pigment function?
Date: 24 Nov 2000 10:56:58
Message: <3A1E8FCA.A806F53B@schunter.etc.tu-bs.de>
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] gmxde>
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

From: Christoph Hormann
Subject: Re: Bug in isosurface using pigment function?
Date: 24 Nov 2000 11:42:27
Message: <3A1E9A74.B6428D71@schunter.etc.tu-bs.de>
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] gmxde>
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

From: Francois Dispot
Subject: Re: Bug in isosurface using pigment function?
Date: 24 Nov 2000 14:11:02
Message: <3A1EBD44.ECD07DE8@club-internet.fr>
Wlodzimierz ABX Skiba wrote:
> 
> Chris Huff wrote in message ...
> >In article <3a1e6b2a@news.povray.org>, "Wlodzimierz ABX Skiba"
> ><abx### [at] abxartpl> 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.

-- 

      __  __ __  __  _
|  | /  \  /  / |_  /  |/
\/\/ \__/ /_ /_ |__ \_ |\


Post a reply to this message

From: Chris Huff
Subject: Re: Bug in isosurface using pigment function?
Date: 24 Nov 2000 18:01:31
Message: <chrishuff-EA7F65.18015924112000@news.povray.org>
In article <3a1e7cda@news.povray.org>, "Wlodzimierz ABX Skiba" 
<abx### [at] abxartpl> 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] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Chris Huff
Subject: Re: Bug in isosurface using pigment function?
Date: 24 Nov 2000 18:06:39
Message: <chrishuff-53E619.18070724112000@news.povray.org>
In article <3A1E9A74.B6428D71@schunter.etc.tu-bs.de>, 
chr### [at] gmxde 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] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>

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