POV-Ray : Newsgroups : povray.unofficial.patches : image_pattern Server Time
2 Sep 2024 14:20:41 EDT (-0400)
  image_pattern (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Fabian Brau
Subject: image_pattern
Date: 26 Jan 2000 11:00:22
Message: <388F1AE2.F20EE806@umh.ac.be>
Hello,

someone can tell me the difference between image_pattern and
material_map? What can image_pattern do that material_map cannot?
A simple example would be cool :)

Thanks

Fabian.


Post a reply to this message

From: Ken
Subject: Re: image_pattern
Date: 26 Jan 2000 12:03:43
Message: <388F282B.3E4323C7@pacbell.net>
Fabian Brau wrote:
> 
> Hello,
> 
> someone can tell me the difference between image_pattern and
> material_map? What can image_pattern do that material_map cannot?
> A simple example would be cool :)
> 
> Thanks
> 
> Fabian.

That was the very first question asked in this group when it was new.
I know because I asked it :)

 The answer that Nathan gave me was -

This was made for Thomas Baier for use with 3DS to POV conversions.  Let's
say you have two textures, and you want to use a black and white image
to fade between the two textures.  Now lets say all you have to work with
is material_map.  That would be a lot of work.  If you only wanted to use
two textures (no fading between), that would be easy, but since material_map
uses indices and single textures, fading would be very difficult and you'd
have a lot of "average{ texture_map { [0.5 t1] [0.4 t2] }}" statements.
You could put it in a while loop, but that would still be a lot of extra
work.

Now, on the other hand, if you have image_pattern, you can use texture_map
instead of material_map, and just use the image as your image_pattern.
Simple.  Fast.  Saves memory (no need for 256 textures for those 256
shades of grey).

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Fabian Brau
Subject: Re: image_pattern
Date: 26 Jan 2000 12:33:30
Message: <388F30B7.B024EBDD@umh.ac.be>
Ken wrote:
> 
> Fabian Brau wrote:
> >
> > Hello,
> >
> > someone can tell me the difference between image_pattern and
> > material_map? What can image_pattern do that material_map cannot?
> > A simple example would be cool :)
> >
> > Thanks
> >
> > Fabian.
> 
> That was the very first question asked in this group when it was new.
> I know because I asked it :)
> 
>  The answer that Nathan gave me was -
> 
> This was made for Thomas Baier for use with 3DS to POV conversions.  Let's
> say you have two textures, and you want to use a black and white image
> to fade between the two textures.  Now lets say all you have to work with
> is material_map.  That would be a lot of work.  If you only wanted to use
> two textures (no fading between), that would be easy, but since material_map
> uses indices and single textures, fading would be very difficult and you'd
> have a lot of "average{ texture_map { [0.5 t1] [0.4 t2] }}" statements.
> You could put it in a while loop, but that would still be a lot of extra
> work.
> 
> Now, on the other hand, if you have image_pattern, you can use texture_map
> instead of material_map, and just use the image as your image_pattern.
> Simple.  Fast.  Saves memory (no need for 256 textures for those 256
> shades of grey).

Yes but one can use a gif with only 2 color define in the palette. 
But I feel that I don't understand yet this feature. I certainly need 
an example to see the advantage of this :)

Thanks!

Fabian.


Post a reply to this message

From: Bob Hughes
Subject: Re: image_pattern
Date: 26 Jan 2000 13:35:10
Message: <388f3e5e@news.povray.org>
There's an example of it's use in the Patterns.htm file which is packaged with
MegaPOV patch.
It's basically a texture_map using a image as guidelines for the texture index.

Bob

"Fabian Brau" <fab### [at] umhacbe> wrote in message
news:388F30B7.B024EBDD@umh.ac.be...
|
| > > someone can tell me the difference between image_pattern and
| > > material_map? What can image_pattern do that material_map cannot?
| > > A simple example would be cool :)
| > >
| > > Thanks
| > >
| > > Fabian.
| >
| > That was the very first question asked in this group when it was new.
| > I know because I asked it :)
| >
| >  The answer that Nathan gave me was -
| >
| > This was made for Thomas Baier for use with 3DS to POV conversions.  Let's
| > say you have two textures, and you want to use a black and white image
| > to fade between the two textures.  Now lets say all you have to work with
| > is material_map.  That would be a lot of work.  If you only wanted to use
| > two textures (no fading between), that would be easy, but since material_map
| > uses indices and single textures, fading would be very difficult and you'd
| > have a lot of "average{ texture_map { [0.5 t1] [0.4 t2] }}" statements.
| > You could put it in a while loop, but that would still be a lot of extra
| > work.
| >
| > Now, on the other hand, if you have image_pattern, you can use texture_map
| > instead of material_map, and just use the image as your image_pattern.
| > Simple.  Fast.  Saves memory (no need for 256 textures for those 256
| > shades of grey).
|
| Yes but one can use a gif with only 2 color define in the palette.
| But I feel that I don't understand yet this feature. I certainly need
| an example to see the advantage of this :)
|
| Thanks!
|
| Fabian.


Post a reply to this message

From: Bob Hughes
Subject: Re: image_pattern
Date: 26 Jan 2000 15:11:04
Message: <388f54d8@news.povray.org>
Sorry, I think I see what you're getting at and I didn't before.  If I
understand it correctly a 'material_map' does not allow for manipulation of the
indices the way 'image_pattern' does.
You can specify a [value texture] format instead of just list textures out 0 to
255.

#declare IPp=
  texture {
    image_pattern { tga "belinda.tga" use_alpha}
    texture_map {
      [0 pigment {rgb <1,0,0>} ] // index 0
      [.5 pigment {rgb <0,1,0>} ] // index 127
      [1 pigment {rgb <0,0,1>} ] // index 255
    } translate -.5 scale 1.5  // transformations
  }

Where as 'material_map' goes like this:

#declare IPm=
texture {
 material_map { tga "belinda.tga"
  texture { pigment {rgb <1,0,0>}} // index 0
  texture { pigment {rgb <0,1,0>}} // index 1
  texture { pigment {rgb <0,0,1>}} // index 2
 }}

That is if I understand any of it right.  You can include image_patterns inside
of image patterns apparently (nesting), material_maps don't seem to be capable
of that.

Bob


Post a reply to this message

From: Ron Parker
Subject: Re: image_pattern
Date: 26 Jan 2000 15:39:14
Message: <slrn88umrc.v8.ron.parker@ron.gwmicro.com>
On Wed, 26 Jan 2000 14:10:47 -0600, Bob Hughes wrote:
>Sorry, I think I see what you're getting at and I didn't before.  If I
>understand it correctly a 'material_map' does not allow for manipulation of the
>indices the way 'image_pattern' does.
>You can specify a [value texture] format instead of just list textures out 0 to
>255.

The other difference is that it fades from one texture to another if it gets
an intermediate index.

-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

From: Nathan Kopp
Subject: Re: image_pattern
Date: 26 Jan 2000 21:17:14
Message: <388faaaa@news.povray.org>
Fabian Brau <fab### [at] umhacbe> wrote...
> Hello,
>
> someone can tell me the difference between image_pattern and
> material_map? What can image_pattern do that material_map cannot?
> A simple example would be cool :)
>

Advantages of image_pattern:

1) it is not limited to textures; it can be used directly with normals and
pigments

2) it can provide more than 256 entries

3) it fades between entries (especially useful when you have fewer than 256)

4) it can be nested

5) it follows a more standard format (like most other patterns), unlike
material_map, which is specialized

6) interpolation of the bitmap works better (see documentation on
material_map for an explanation of why interpolation is not effective with
material_maps)


-Nathan


Post a reply to this message

From: Bob Hughes
Subject: Re: image_pattern
Date: 27 Jan 2000 00:12:55
Message: <388fd3d7@news.povray.org>
This gets edited into the patterns.htm file I have here immediately, thanks
Nathan.
Didn't know about the "more than 256" thing.  Great, but I don't see how it
could.  After all, if there's only a 256 color palette or one 8-bit plane of a
24bit image how does it apply textures to other than those specific areas of a
image then?  A kind of interpolation?

Bob

"Nathan Kopp" <Nat### [at] Koppcom> wrote in message
news:388faaaa@news.povray.org...
|
| Advantages of image_pattern:
|
| 1) it is not limited to textures; it can be used directly with normals and
| pigments
|
| 2) it can provide more than 256 entries
|
| 3) it fades between entries (especially useful when you have fewer than 256)
|
| 4) it can be nested
|
| 5) it follows a more standard format (like most other patterns), unlike
| material_map, which is specialized
|
| 6) interpolation of the bitmap works better (see documentation on
| material_map for an explanation of why interpolation is not effective with
| material_maps)
|
|
| -Nathan
|


Post a reply to this message

From: Alan Kong
Subject: Re: image_pattern
Date: 27 Jan 2000 01:25:28
Message: <a2pv8s0et6al2n7ustt6kdqlnaut0fvct3@4ax.com>
On Wed, 26 Jan 2000 09:00:28 -0800 Ken <tyl### [at] pacbellnet> wrote:

>That was the very first question asked in this group when it was new.
>I know because I asked it :)

  It's a good question. Is this addressed in Warp's VFAQ (I've got to
get myself a local copy)?

-- 
Alan - ako### [at] povrayorg - a k o n g <at> p o v r a y <dot> o r g
http://www.povray.org - Home of the Persistence of Vision Ray Tracer


Post a reply to this message

From: Ken
Subject: Re: image_pattern
Date: 27 Jan 2000 01:49:56
Message: <388FE9C3.4653B5E7@pacbell.net>
Alan Kong wrote:
> 
> On Wed, 26 Jan 2000 09:00:28 -0800 Ken <tyl### [at] pacbellnet> wrote:
> 
> >That was the very first question asked in this group when it was new.
> >I know because I asked it :)
> 
>   It's a good question. Is this addressed in Warp's VFAQ (I've got to
> get myself a local copy)?

Actually the question has not come up that many times. If it repeats
again in the future there may be a need to include it in the VFAQ but
-I- don't think it's needed quite yet.

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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