POV-Ray : Newsgroups : povray.general : Holes in brick pattern Server Time: 9 Dec 2018 21:39:46 GMT
  Holes in brick pattern (Message 1 to 8 of 8)  
From: Ton
Subject: Holes in brick pattern
Date: 21 Jun 2018 02:50:01
Message: <web.5b2b114e78756df8cd927dec0@news.povray.org>
For my RMS Titanic project I use the brick pattern for the deck planking.

However there are gaps in the mortar lines.

Here is a test scene that shows the problem:

#version 3.7;

global_settings
{
    assumed_gamma 1
}

#declare DeckTexture = texture
{
    pigment
    {
        brick
        srgb <0, 0, 0>, srgb <1, 1, 1>
        brick_size <20, 1, 10>
        mortar 0.05
    }
    rotate <90, 0, 0>
}

light_source
{
    <-150, 250, 0>
    color rgb <1, 1, 1>
}

camera
{
   location <-260, 38, 20>
   right x * image_width / image_height
   look_at <-240, 26, 10>
}

box
{
    <-250, 0, -50>, <0, 0, 50>
    texture
    {
        DeckTexture
    }
}

My povray version is
Persistence of Vision(tm) Ray Tracer Version 3.8.0-alpha.9606898.unofficial (g++
7.3.0 @ x86_64-pc-linux-gnu)

I have tried with maximum anit-aliasing (+a0.1 +r9), but I'm still having the
gaps. Is there any way I can fix this?

Thanks
Ton.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Holes in brick pattern
Date: 21 Jun 2018 06:54:49
Message: <5b2b4bb9$1@news.povray.org>
On 21-6-2018 4:45, Ton wrote:
> For my RMS Titanic project I use the brick pattern for the deck planking.
> 
> However there are gaps in the mortar lines.
> 
> Here is a test scene that shows the problem:
> 

[snip]

> My povray version is
> Persistence of Vision(tm) Ray Tracer Version 3.8.0-alpha.9606898.unofficial (g++
> 7.3.0 @ x86_64-pc-linux-gnu)
> 
> I have tried with maximum anit-aliasing (+a0.1 +r9), but I'm still having the
> gaps. Is there any way I can fix this?

There are two ways:

1) increase the mortar size. Crude solution and you will still find 
moire effects too.

2) Use stochastic anti-aliasing provided by UberPOV. This is, to my 
knowledge, the best way although it may slow down your render ultimately.

To use this:
1) download UberPOV at: https://github.com/UberPOV/UberPOV/releases/

2) Change #version 3.7; to #version unofficial patch 3.71;

3) Stochastic ant-aliasing is provided by choosing one of the following 
settings for your render (width and height to your convenience of course:
// +w800 +h600 +am3 +a0.1 +ac0.90 +r3
// +w800 +h600 +am3 +a0.01 +ac0.90 +r4
// +w800 +h600 +am3 +a0.01 +ac0.99 +r4
// +w800 +h600 +am3 +a0.01 +ac0.99 +r6

Explanation, in the words of Clipka:
[start citation]
As for the mode 3 oversampling, this mode is driven by a stochastic 
algorithm, similar to focal blur;
the +a parameter specifies the /variance/, and the +ac parameter 
specifies the /confidence/.

In layman's terms, the mode 3 is all about estimates: While it renders 
pixels over and over again,
it estimates (A) the colour of the pixel, (B) the error in the estimated 
colour,
i.e. how much it still differs from the actual value, and (C) the 
reliability of the error estimate.
The +a parameter specifies the maximum estimated error you are willing 
to accept, while the +ac parameter
specifies the minimum reliability you demand for that error estimate.

In even simpler terms, the +a parameter affects the amount of general 
noise in the resulting image,
while the +ac parameter affects the amount of speckle artefacts.

(Last not least, the +r parameter puts a hard maximum on the number of 
samples per pixel.
The effective limit is 4 to the power of the parameter value, making it 
approximately the same as
for a worst-case scenario in anti-aliasing mode 2.)
[end citation]

-- 
Thomas


Post a reply to this message

From: Ton
Subject: Re: Holes in brick pattern
Date: 21 Jun 2018 23:45:01
Message: <web.5b2c379ed92967a0524ae6190@news.povray.org>
Thanks Thomas.

D downloaded the uberpov sources and tried to compile it. but since version 1.65
the boost-libraries don't contain TR1 anymore. In the release notes they say
that it has been removed. Don't know why, but uberpov uses them, and the include
files are not there. Where can I file a bugreport for this? In bugreports, or
unofficial-patches?
I tried then the windows version. Wine is running almost everything, and uberpov
and the stochastic anti-aliasing did a good job. Are there any plans
incorporating this into POV-Ray?

Thanks
Ton.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Holes in brick pattern
Date: 23 Jun 2018 11:07:34
Message: <5b2e29f6@news.povray.org>
On 22-6-2018 1:41, Ton wrote:
> Thanks Thomas.
> 
> D downloaded the uberpov sources and tried to compile it. but since version 1.65
> the boost-libraries don't contain TR1 anymore. In the release notes they say
> that it has been removed. Don't know why, but uberpov uses them, and the include
> files are not there. Where can I file a bugreport for this? In bugreports, or
> unofficial-patches?
> I tried then the windows version. Wine is running almost everything, and uberpov
> and the stochastic anti-aliasing did a good job. Are there any plans
> incorporating this into POV-Ray?
> 

I cannot answer that. Those are questions for Clipka.

-- 
Thomas


Post a reply to this message

From: Kenneth
Subject: Re: Holes in brick pattern
Date: 25 Jun 2018 14:30:00
Message: <web.5b30fc06d92967a0a47873e10@news.povray.org>
"Ton" <nomail@nomail> wrote:
>
> I have tried with maximum anit-aliasing (+a0.1 +r9), but I'm still having the
> gaps. Is there any way I can fix this?
>

There's also the trick of running a very LARGE-sized render (with some good
anti-alias settings), and then *down-sampling* that image in another app as a
post-processing step, to make it smaller. This approach has been discussed from
time to time in the newsgroups, and I use it myself if I have a 'problem' image.

I tried your code example with a render size of 3840 X 2880 pixels, using AA
with an antialias_threshold of 0.05-- then downsized it in Photoshop to 1100 X
825 pixels (a purposely 'odd' size, so as not to be a strict 2:1 or 3:1
reduction.) This seems to eliminate any Moire patterns, as far as I can tell.
Some of the thin lines do disappear, though; I don't think there's a way around
that, because the lines are SO thin to begin with.

In Photoshop, I'm using the (default?) bi-cubic interpolation for the
down-sizing; but try bi-linear instead (if your image app has that), to see if
it produces better results.


Post a reply to this message

From: clipka
Subject: Re: Holes in brick pattern
Date: 25 Jun 2018 14:48:46
Message: <5b3100ce$1@news.povray.org>
Am 21.06.2018 um 08:54 schrieb Thomas de Groot:

> 2) Use stochastic anti-aliasing provided by UberPOV. This is, to my
> knowledge, the best way although it may slow down your render ultimately.

BTW, an effect very similar to UberPOV's stochastic anti-aliasing can be
achieved by a very miniscule amount of focal blur with high-quality
settings.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Holes in brick pattern
Date: 26 Jun 2018 06:36:04
Message: <5b31ded4@news.povray.org>
On 25-6-2018 16:48, clipka wrote:
> Am 21.06.2018 um 08:54 schrieb Thomas de Groot:
> 
>> 2) Use stochastic anti-aliasing provided by UberPOV. This is, to my
>> knowledge, the best way although it may slow down your render ultimately.
> 
> BTW, an effect very similar to UberPOV's stochastic anti-aliasing can be
> achieved by a very miniscule amount of focal blur with high-quality
> settings.
> 

Indeed, yes. After taking my fish oil pill, the memory of that trick 
just came back to me :-)

-- 
Thomas


Post a reply to this message

From: Ton
Subject: Re: Holes in brick pattern
Date: 26 Jun 2018 10:40:01
Message: <web.5b321738d92967a072bd179f0@news.povray.org>
Thanks for all the tips. Uberpov with its stochastic anti-aliasing is doing a
good job. I think I'll stick with that.


Post a reply to this message

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