|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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 'temp.png' (50 KB)
Preview of image 'temp.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Dave Blandston" <nomail@nomail> schreef in bericht
news:web.4b72093ee292c410cba3fb0f0@news.povray.org...
> 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!
>
Thanks a lot indeed. I always use an image map for this effect, mostly as a
bump map (as your texture can also be applied of course), but it is nice to
have it as a texture code.
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
looks a lot like the one used in Gimp too. Perhaps similar algorithms? :)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>Dave Blandston on date 10/02/2010 02:17 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
>
Simple and neat solution,
;-)
Paolo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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!
I think it would be even more useful if it had a 'normal' block as
well. That way it would interact with lighting, giving it depth.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> I think it would be even more useful if it had a 'normal' block as
> well. That way it would interact with lighting, giving it depth.
I tried to do this myself, but didn't get anything useful. Maybe it's
harder than it sounds.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Dave Blandston" <nomail@nomail> wrote in message
news:web.4b72093ee292c410cba3fb0f0@news.povray.org...
> 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!
I tried adding a little turbulence the texture pattern, rendering once in
gray and again with a colored pattern, then imported the gray as a height
field and the pattern as the color, and made a pretty neat shape. I made
real gaps in the shape with the water level. I think you could do a pretty
good picnic basket or some such by UV mapping this output as a displacement
map, too.
Bravo, I like this. :-)
--
Jack
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 13/02/2010 4:44 AM, Anthony D. Baye wrote:
> Most Excellent. I tried to come up with something similar a while back,
> but failed. This works great.
ha! a little 9. that's very cute.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |