POV-Ray : Newsgroups : povray.general : layered texture help please Server Time
6 Aug 2024 02:25:04 EDT (-0400)
  layered texture help please (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From: Rafal 'Raf256' Maj
Subject: Re: layered texture help please
Date: 14 Jul 2002 16:19:18
Message: <Xns924BE27C57FEAraf256com@204.213.191.226>
"Hugo" <hua### [at] post3teledk> wrote in news:3d31da8b$1@news.povray.org:

>> normal { blur 0.3 scale 0.1 }
> 
> What's that?  That's not Pov 3.5 ?

sorry - I was thinking about "bozo" 

-- 


Post a reply to this message

From: Hugo
Subject: Re: layered texture help please
Date: 14 Jul 2002 16:23:25
Message: <3d31ddbd@news.povray.org>
> I can dig up the files, but perhaps you get the idea?

Here is one. You will probably be able to improve it.
------------

// Blur pigment from <0,0,0> to <1,1,0>
// by Hugo Asmussen

camera { location <0,0,-5> look_at 0 angle 48 }
light_source { <-80,80,-80>, 1 }

#declare Input=pigment { checker rgb 1,rgb 0 scale .5 }

#declare Layers=255; // between 1 - 255
#declare Amount=.025;

#declare Output=
pigment { image_map { function 50,50 {
 pigment { average pigment_map {

  #local Layers=1/Layers;

  #local Count=0;
  #while(Count<1)

   [1 Input translate vrotate(Amount*x,(360*Count)*z)  ]

   #local Count=Count+Layers;
  #end
 } scale .5 +(.5/25) }
} interpolate 2 }
}

box { <-10,-10,0>,<10,10,-1> pigment { Output } }


Post a reply to this message

From: James Taylor
Subject: Re: layered texture help please
Date: 14 Jul 2002 18:08:43
Message: <3d31f66b@news.povray.org>
"Hugo" <hua### [at] post3teledk> wrote:
>...But you can come close by duplicating a texture layer
> 10-30 times (usually enough) each time with a small 'translate' to it, in
> some direction (I suggest random directions for 3d textures, and for
example
> a circular direction for a 2d texture). This works quite well.

That's the one that'd do it :)

The texture I'm using is for a background on a plane aligned such that the
normal points towards the camera. It's basically a pigment_map with a
turbulent facet normal. The trouble is the facets produce abrupt edges and I
wanted a way to blur these a little - this technique seems like the way to
go...

thanks
jim


Post a reply to this message

From: Rune
Subject: Re: layered texture help please
Date: 14 Jul 2002 18:23:24
Message: <3d31f9dc$1@news.povray.org>
James Taylor wrote:
> The trouble is the facets produce abrupt edges and
> I wanted a way to blur these a little - this
> technique seems like the way to go...

If it's just a normal you want to blur, specifying a low accuracy might
do it; at least that's what the documentation says.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated July 12)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Christopher James Huff
Subject: Re: layered texture help please
Date: 14 Jul 2002 19:10:56
Message: <chrishuff-70EFA2.18081914072002@netplex.aussie.org>
In article <3d31f9dc$1@news.povray.org>,
 "Rune" <run### [at] mobilixnetdk> wrote:

> > The trouble is the facets produce abrupt edges and
> > I wanted a way to blur these a little - this
> > technique seems like the way to go...
> 
> If it's just a normal you want to blur, specifying a low accuracy might
> do it; at least that's what the documentation says.

That doesn't really give a blurring effect, just loss of small detail. I 
don't think it would work very well with the facet normal. However, if 
just the normal is being blurred, it might work to just use an averaged 
normal instead of averaged textures. Might render a bit faster.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Rune
Subject: Re: layered texture help please
Date: 15 Jul 2002 20:22:22
Message: <3d33673e@news.povray.org>
Christopher James Huff wrote:
> That doesn't really give a blurring effect,
> just loss of small detail.

What's the difference? It does give a blurring effect, as opposed to
abrupt changes.

It doesn't work with the special facets normal though, but for other
normals it works.

See for example here:

camera {
   location -3*z
   look_at 0
}
light_source {<1,2,-3>*100, color 1}
sphere {
   0, 1
   pigment {rgb 1}
   normal {
      crackle scale 0.3
      accuracy pow(10,sin(2*pi*clock)*0.6)*0.15
   }
   finish {phong 0.5}
}

Render this as a cyclic animation. If that isn't blurring of the normal,
then I don't know what is...

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated July 12)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Christopher James Huff
Subject: Re: layered texture help please
Date: 16 Jul 2002 13:03:31
Message: <chrishuff-7F3B93.11581516072002@netplex.aussie.org>
In article <3d33673e@news.povray.org>,
 "Rune" <run### [at] mobilixnetdk> wrote:

> What's the difference? It does give a blurring effect, as opposed to
> abrupt changes.
> 
> It doesn't work with the special facets normal though, but for other
> normals it works.

If it was a blur effect, it would work with the facets pattern (it would 
also be slower). It is just a reduction in accuracy. Small features 
aren't blurred out, the gradient of the pattern just isn't sampled as 
finely, so small details aren't picked up. The facets pattern doesn't 
have a gradient, it is solved in a different way, so it won't work with 
this trick. A true blur would work though.


> Render this as a cyclic animation. If that isn't blurring of the normal,
> then I don't know what is...

Make an average texture of several textures with randomly jittered 
normals...that's a blur. The effect of reducing the accuracy is just to 
make the sample points farther apart, not to spread out the existing 
features which is what a blur is.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Rune
Subject: Re: layered texture help please
Date: 16 Jul 2002 14:01:09
Message: <3d345f65$1@news.povray.org>
Christopher James Huff wrote:
> It is just a reduction in accuracy. Small features
> aren't blurred out, the gradient of the pattern just
> isn't sampled as finely

I'm aware of the technical difference, but would you be able to spot the
difference in a rendered image? (Looking apart from the fact that the
real blur method will often create grainy results, while the accuracy
method won't.)

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated July 12)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Hugo
Subject: Re: layered texture help please
Date: 17 Jul 2002 05:24:08
Message: <3d3537b8@news.povray.org>
> the real blur method will often create grainy results,
> while the accuracy method won't.)

The method I posted here does not produce grainy results. There are no
jittering, and the amount of blur we need is usually small, so the steps
between samples aren't visible.

Your method was however a surprise to me. I didn't know there was an
'accuracy' available in normals. Though, my method blurs pigments, patterns,
or whole textures, not just normals.

Regards,
Hugo


Post a reply to this message

From: Christopher James Huff
Subject: Re: layered texture help please
Date: 17 Jul 2002 12:27:10
Message: <chrishuff-BF55C1.11215917072002@netplex.aussie.org>
In article <3d345f65$1@news.povray.org>,
 "Rune" <run### [at] mobilixnetdk> wrote:

> I'm aware of the technical difference, but would you be able to spot the
> difference in a rendered image? (Looking apart from the fact that the
> real blur method will often create grainy results, while the accuracy
> method won't.)

The real blur method won't make grainy results. It might have "stepping" 
results in some cases without enough samples, but not grainyness...
Yes, the difference would be visible, I'll work up some images to show 
the differences. And the convolution matrix method (which is essentially 
what the averaged texture method is) is much more flexible.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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