POV-Ray : Newsgroups : povray.binaries.images : Woven Cloth Texture : Re: Woven Cloth Texture Server Time
31 Jul 2024 08:21:58 EDT (-0400)
  Re: Woven Cloth Texture  
From: Nekar Xenos
Date: 11 Feb 2010 05:57:31
Message: <op.u7yl1wlaufxv4h@go-dynamite>
Hmm, I could use this as a starting point fore a carbon fibre texture :)

-Nekar
On Wed, 10 Feb 2010 03:17:50 +0200, Dave Blandston <nomail@nomail> 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


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


Post a reply to this message

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