![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Greg M. Johnson <"gregj;-)56590\""@aol.c;-)om> wrote:
> Thanks, BUT I think that MegaPov 0.7 does not accept an image_map as one of the
> colors in an object pattern.
A pattern does not take colors. color_maps do.
Use the pattern with a pigment_map instead.
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Can you give me an example of
>
> pigment{object{foobar} ................
>
> finish the line where one is a pigment{image_map{... , please if you
will.
>
> Neither the html help for mega 0.7 nor my imagination could find a syntax
mega
> would accept.
I don't know if the megaPOV syntax works the same, but this works in 3.5:
(you need to wrap both parts in pigment wrappers)
//start
box{<-100,0,-10><100,200,10>
pigment{
object{
box{<-30,80,0><30,140,-20>}
pigment{rgb 1},
pigment{
image_map{png "BB2.png" interpolate 4}
scale 60
translate <-30,80,0>
}
}
}
}
//end
-tgq
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Warp" <war### [at] tag povray org> wrote in message
news:3d129a40@news.povray.org...
> Greg M. Johnson <"gregj;-)56590\""@aol.c;-)om> wrote:
> > Thanks, BUT I think that MegaPov 0.7 does not accept an image_map as one
of the
> > colors in an object pattern.
> A pattern does not take colors. color_maps do.
>
The object pattern IMHO does not take pigments either. Colors were a last
ditch effort to make something work.
>
> Use the pattern with a pigment_map instead.
>
Can you suggest a syntax for this?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Greg M. Johnson <gregj:-)565### [at] aol com> wrote:
>> Use the pattern with a pigment_map instead.
> Can you suggest a syntax for this?
I got confused. The object pattern cannot be used with a pigment_map
literally. However, it can take two pigments without problems:
camera { location -z*5 look_at 0 angle 35 }
light_source { -z*10, 1 }
#declare Object = sphere { 0,1 }
#declare Pigm1 = pigment { bozo color_map { [0 rgb 0][1 rgb 1] } }
#declare Pigm2 = pigment { granite color_map { [0 rgb x][1 rgb x+y] } }
plane
{ -z,0
pigment
{ object
{ Object
pigment { Pigm1 }
pigment { Pigm2 }
}
}
}
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Greg M. Johnson" <gregj:-)565### [at] aol com> wrote in message
news:3d131911$1@news.povray.org...
> "Warp" <war### [at] tag povray org> wrote in message
> news:3d129a40@news.povray.org...
> > Greg M. Johnson <"gregj;-)56590\""@aol.c;-)om> wrote:
> > > Thanks, BUT I think that MegaPov 0.7 does not accept an image_map as
one
> of the
> > > colors in an object pattern.
> > A pattern does not take colors. color_maps do.
> >
>
> The object pattern IMHO does not take pigments either. Colors were a
last
> ditch effort to make something work.
>
> >
> > Use the pattern with a pigment_map instead.
> >
>
> Can you suggest a syntax for this?
I do believe the object pattern (like checker, brick, hexagon, etc.) don't
use pigment_maps since they are blocked patterns without smooth transitions.
They expect a specific number of colours or pigment or whatever to work
(pigment_maps can be used within each of these pigments however), i.e.
checker expects 2, hexagon expects 3, object expects 2. The trick in syntax
is that the elements need to be of the same type, either all colours, all
pigments, etc. You can't mix n match. Therefore if you wnat to use an
image map for one element and a colour for the other, since the image_map is
gonna need a pigment wrapper, you need to wrap the colour in a pigment
wrapper as well. At least the is how it appears to perform in 3.5.
See my previous post for an example that works in 3.5, I can post the source
and image if so required.
-tgq
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Fri, 21 Jun 2002 08:15:19 -0500, Greg M. Johnson wrote:
> The object pattern IMHO does not take pigments either. Colors were a
> last ditch effort to make something work.
That is not true. It worked the first time I compiled it, and it worked
for everything automatically, there is no need to write special code to
handle each case...this is how it is for any pattern, there was no "last
ditch effort". The syntax is analogous to that for any other block pattern:
texture {object {OBJECT texture {...}, texture {...}}
pigment {object {OBJECT pigment {...}, pigment {...}}
There is even a demo file demonstrating this: object_pattern.pov.
--
Christopher James Huff <chr### [at] mac com>
POV-Ray TAG e-mail: <chr### [at] tag povray org>
WWW: http://homepage.mac.com/chrishuff/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Christopher James Huff" <chr### [at] mac com> wrote in message
news:pan### [at] mac com...
> That is not true. It worked the first time I compiled it,
Your code is quite logical. It's what 0.7a IIRC refused. I'll try it in 0.7a
again "later"...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Greg M. Johnson" <gregj:-)565### [at] aol com> wrote in message
news:3d1326ab$1@news.povray.org...
> "Christopher James Huff" <chr### [at] mac com> wrote in message
> news:pan### [at] mac com...
> > That is not true. It worked the first time I compiled it,
>
> Your code is quite logical. It's what 0.7a IIRC refused. I'll try it in
0.7a
> again "later"...
>
An update here for you. I don't have megaPOV installed but I downloaded the
help and had a look. The problem I see (and I don't know which is correct)
is that in 3.5, the pigments are wrapped in the object wrapper, whereas the
megaPOV docs place them after the object wrapper so either megaPOV acts
slightly differently or the docs are wrong.
ie.
3.5 says:
pigment{
object{
my_object
pigment{pig1},
pigment{pig2}
}
}
megaPOV says:
pigment{
object{my_object}
pigment{pig1},
pigment{pig2}
}
so you might want to find out which is correct.
-tgq
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
The following code is accepted:
#declare pigobj=box{-1,1}
#declare clothtexti=texture{pigment{object{pigobj color Blue, color Red}} }
The following code is rejected:
#declare pigobj=box{-1,1}
#declare clothtexti=texture{pigment{object{pigobj shirtpig, objectpig}} }
where shirtpig and object pig are called out earlier.
The error is:
"No matching } in pigment, pigment identifier found instead."
> > "Christopher James Huff" <chr### [at] mac com> wrote in message
> > news:pan### [at] mac com...
> > > That is not true. It worked the first time I compiled it,
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wasn't it Greg M. Johnson who wrote:
>The following code is accepted:
>
>#declare pigobj=box{-1,1}
>#declare clothtexti=texture{pigment{object{pigobj color Blue, color Red}} }
>
>The following code is rejected:
>
>#declare pigobj=box{-1,1}
>#declare clothtexti=texture{pigment{object{pigobj shirtpig, objectpig}} }
>
>where shirtpig and object pig are called out earlier.
>
>The error is:
>"No matching } in pigment, pigment identifier found instead."
The correct syntax is
#declare clothtexti=texture{pigment{object{pigobj pigment{shirtpig},
pigment {objectpig}}} }
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |