|
|
|
|
|
|
| |
| |
|
|
From: Jörg "Yadgar" Bleimann
Subject: Differencing a cubic sphere sweep - artifact problem!
Date: 29 Apr 2017 20:05:07
Message: <59052a33@news.povray.org>
|
|
|
| |
| |
|
|
Hi(gh)!
I started to model the building blocks of a Swiss-made marble lane
system... when I came to an elongated block with a serpentine-shaped
marble track on top, I chose to use a cubic sphere to create the
hollow... but it resulted in heavy artifacts (object on the extreme
right of the scene attached). I tried various tolerance values - but
nothing removed those artifacts! Here is the code:
#declare T_Beech =
texture
{
pigment { color rgb <0.6, 0.55, 0.45> }
finish { ambient 0.1 diffuse 1 brilliance 0.4 }
}
#declare Cube =
box
{
0, 0.05
texture { T_Beech }
}
#declare HalfCube =
object
{
Cube
scale <1, 0.5, 1>
}
#declare HalfCube_Triple =
object { HalfCube scale <1, 1, 3> }
#declare Serpentine =
sphere_sweep
{
cubic_spline
8
<0.025, 0.025, -0.02>, 0.05/6
<0.025, 0.025, 0>, 0.05/6
<0.021, 0.025, 0.02>, 0.05/6
<0.012, 0.025, 0.05>, 0.05/6
<0.038, 0.025, 0.10>, 0.05/6
<0.029, 0.025, 0.13>, 0.05/6
<0.025, 0.025, 0.15>, 0.05/6
<0.025, 0.025, 0.17>, 0.05/6
texture { T_Beech }
}
#declare KL =
difference
{
object { HalfCube_Triple }
object { Serpentine }
}
See you in Khyberspace!
Yadgar
Post a reply to this message
Attachments:
Download '2017-04-30 cugolino, take 1.jpg' (41 KB)
Preview of image '2017-04-30 cugolino, take 1.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I tried all sorts of tricks to try and eliminate the problem, but no luck:
Scaling both cube and sphere-sweep (both before and after they are created), as
well as the sphere radii; changing the sphere-sweep 'tolerance' value by orders
of magnitude up and down (which seems to have no effect at all); rotating only
the sphere-sweep in space; changing the number of entries in the sphere-sweep;
even moving the camera around. Adding commas after the 'sweep entries (as
recommended in the docs) has no effect either.
Using a b_spline instead of cubic also shows the problem.
Using union (or merge!) instead of difference results in NO problem; those
operations work OK.
I assume that this is your only sphere-sweep that uses a CUBIC spline?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> I assume that this is your only sphere-sweep that uses a CUBIC spline?
Oops, I was thinking of your closest block in the image, the one with the curved
indent. That's probably a differenced torus shape, not a sphere-sweep.
Post a reply to this message
|
|
| |
| |
|
|
From: Cousin Ricky
Subject: Re: Differencing a cubic sphere sweep - artifact problem!
Date: 30 Apr 2017 00:06:51
Message: <590562db$1@news.povray.org>
|
|
|
| |
| |
|
|
On 2017-04-29 08:05 PM (-4), Jörg "Yadgar" Bleimann wrote:
> Hi(gh)!
>
> I started to model the building blocks of a Swiss-made marble lane
> system... when I came to an elongated block with a serpentine-shaped
> marble track on top, I chose to use a cubic sphere to create the
> hollow... but it resulted in heavy artifacts (object on the extreme
> right of the scene attached). I tried various tolerance values - but
> nothing removed those artifacts! Here is the code:
It is for just such a reason that I created the SphereSweep module in
the Object Collection:
http://lib.povray.org/searchcollection/index2.php?objectName=SphereSweep&contributorTag=Cousin%20Ricky
Post a reply to this message
|
|
| |
| |
|
|
From: Jörg "Yadgar" Bleimann
Subject: Re: Differencing a cubic sphere sweep - artifact problem!
Date: 30 Apr 2017 07:23:54
Message: <5905c94a$1@news.povray.org>
|
|
|
| |
| |
|
|
Hi(gh)!
Am 30.04.2017 um 06:06 schrieb Cousin Ricky:
> It is for just such a reason that I created the SphereSweep module in
> the Object Collection:
>
>
http://lib.povray.org/searchcollection/index2.php?objectName=SphereSweep&contributorTag=Cousin%20Ricky
Very good, I will try this out!
See you in Khyberspace!
Yadgar
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: Differencing a cubic sphere sweep - artifact problem!
Date: 30 Apr 2017 11:06:35
Message: <5905fd7b$1@news.povray.org>
|
|
|
| |
| |
|
|
On 04/29/2017 08:05 PM, Jörg "Yadgar" Bleimann wrote:
> Hi(gh)!
>
> I started to model the building blocks of a Swiss-made marble lane
> system... when I came to an elongated block with a serpentine-shaped
> marble track on top, I chose to use a cubic sphere to create the
> hollow... but it resulted in heavy artifacts (object on the extreme
> right of the scene attached). I tried various tolerance values - but
> nothing removed those artifacts! Here is the code:
>
Thanks for posting code. I've opened a github issue for this:
https://github.com/POV-Ray/povray/issues/287
given it seems to render correctly in 3.6.1.
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> I tried all sorts of tricks to try and eliminate the problem, but no luck...
>
I ran the scene in the latest(?) 3.7.1 beta 5, as well as in my original 3.70
install; same problems in both.
IIRC, sphere_sweeps using a cubic spline have been problematic for a *long*
time. If it were possible to do, I would suggest adding the 'natural_spline'
type to the sphere_sweep code. I don't know the math differences between natural
and cubic splines (or if one is mathematically 'simpler' than the other) but it
might give us at least one way to make curvy sphere_sweeps that can be
CSG-differenced from another object.
Post a reply to this message
|
|
| |
| |
|
|
From: Jörg "Yadgar" Bleimann
Subject: Re: Differencing a cubic sphere sweep - artifact problem!
Date: 1 May 2017 03:44:08
Message: <5906e748@news.povray.org>
|
|
|
| |
| |
|
|
Hi(gh)!
Am 30.04.2017 um 13:23 schrieb Jörg "Yadgar" Bleimann:
> Hi(gh)!
>
> Am 30.04.2017 um 06:06 schrieb Cousin Ricky:
>
>> It is for just such a reason that I created the SphereSweep module in
>> the Object Collection:
>>
>>
http://lib.povray.org/searchcollection/index2.php?objectName=SphereSweep&contributorTag=Cousin%20Ricky
>>
>
> Very good, I will try this out!
Now it looks correct: see attachment!
See you in Khyberspace!
Yadgar
Post a reply to this message
Attachments:
Download '2017-04-30 cugolino, take 2.jpg' (31 KB)
Preview of image '2017-04-30 cugolino, take 2.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> IIRC, sphere_sweeps using a cubic spline have been problematic for a *long*
> time.
I was unaware of this.
>If it were possible to do, I would suggest adding the 'natural_spline'
> type to the sphere_sweep code. I don't know the math differences between natural
> and cubic splines (or if one is mathematically 'simpler' than the other) but it
> might give us at least one way to make curvy sphere_sweeps that can be
> CSG-differenced from another object.
Maybe for the time being you could use:
http://www.econym.demon.co.uk/isotut/splines.htm
it may be slower, but would give good end results straightaway.
Post a reply to this message
|
|
| |
| |
|
|
From: Le Forgeron
Subject: Re: Differencing a cubic sphere sweep - artifact problem!
Date: 1 May 2017 12:19:57
Message: <5907602d@news.povray.org>
|
|
|
| |
| |
|
|
Le 30/04/2017 à 17:06, William F Pokorny a écrit :
> On 04/29/2017 08:05 PM, Jörg "Yadgar" Bleimann wrote:
>> Hi(gh)!
>>
>> I started to model the building blocks of a Swiss-made marble lane
>> system... when I came to an elongated block with a serpentine-shaped
>> marble track on top, I chose to use a cubic sphere to create the
>> hollow... but it resulted in heavy artifacts (object on the extreme
>> right of the scene attached). I tried various tolerance values - but
>> nothing removed those artifacts! Here is the code:
>>
> Thanks for posting code. I've opened a github issue for this:
>
> https://github.com/POV-Ray/povray/issues/287
>
> given it seems to render correctly in 3.6.1.
>
> Bill P.
>
Thanks for logging.
I tested with hg-povray and it is fine there (at least the tmp372.pov file)
Actually, it is also ok on my master head, but both stable and official
master have problem.
Which leads me to conclude: read the note about the patch of my master,
for sphere_sweep:
* sphere sweep: less noise under some angles
* sphere sweep: UV mapping
* sphere sweep: removed the preliminary workaround for FS#81 (not
effective, was adding noise)
* sphere sweep: added the suggested fix for FS#243 (negative uniform
scaling of untransformed object should have effect on radius as absolute
factor)
From what I would keep in the sphsweep.cpp, previously in
source/backend/shape (now spheresweep.cpp in source/core/shape ):
const DBL ZERO_TOLERANCE = 1.0e-1;// less noise when near 1 than
near 0 [JG]
instead of
const DBL ZERO_TOLERANCE = 1.0e-4;
Good luck.
Post a reply to this message
Attachments:
Download 'offmaster.png' (51 KB)
Download 'hg.png' (52 KB)
Download 'master.png' (52 KB)
Download 'stable.png' (51 KB)
Preview of image 'offmaster.png'
Preview of image 'hg.png'
Preview of image 'master.png'
Preview of image 'stable.png'
|
|
| |
| |
|
|
|
|
| |