POV-Ray : Newsgroups : povray.binaries.images : Woven Cloth Texture : Re: Woven Cloth Texture Server Time
31 Jul 2024 08:29:03 EDT (-0400)
  Re: Woven Cloth Texture  
From: Anthony D  Baye
Date: 12 Feb 2010 12:45:22
Message: <4b7593b2@news.povray.org>
Most Excellent.  I tried to come up with something similar a while back, 
but failed. This works great.

A.D.B.

Dave Blandston wrote:
> In case anyone's interested, here's a handy woven cloth texture. To add color,
> you can add another texture to the averaged texture_map near the end. I hope
> someone finds this usefull!
> 
> Regards,
> Dave Blandston
> 
> * * * * * * * * * * * * * * * * * * * * * * * *
> 
> #local ClothScale = .5;
> #local ThreadWidth = .2;
> #local EdgeWidth = .08;
> 
> #declare Cloth = texture {
>    pigment {
>       gradient x
>       color_map {
>          [0 color Black]
>          [.1 color Black]
>          [.5 color White * 4]
>          [.9 color Black]
>          [1 color Black]
>       } //color_map
>    } //pigment
> } //texture
> texture {
>    pigment {
>       gradient y
>       color_map {
>          [0 color Black]
>          [.5 - ThreadWidth / 2 - EdgeWidth color Black]
>          [.5 - ThreadWidth / 2 color Black transmit 1]
>          [.5 + ThreadWidth / 2 color Black transmit 1]
>          [.5 + ThreadWidth / 2 + EdgeWidth color Black]
>          [1 color Black]
>       } //color_map
>    } //pigment
> } //texture
> 
> #declare Cloth = texture {
>    average
>    texture_map {
>       [1 Cloth]
>       [1 Cloth translate <.5, .5, 0>]
>       [1 Cloth rotate 90 * z translate <.5, 0, 0>]
>       [1 Cloth rotate 90 * z translate <0, .5, 0>]
>       //[1 MyTexture]
>    } //texture_map
>    scale <ClothScale, ClothScale, 1>
> } //texture
> 
> 
> ------------------------------------------------------------------------
>


Post a reply to this message


Attachments:
Download '9.png' (267 KB)

Preview of image '9.png'
9.png


 

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