POV-Ray : Newsgroups : povray.general : Image_map front & back Server Time
6 Aug 2024 08:15:59 EDT (-0400)
  Image_map front & back (Message 21 to 30 of 37)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>
From: Warp
Subject: Re: Image_map front & back
Date: 20 Jun 2002 23:15:12
Message: <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.

  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

From: TinCanMan
Subject: Re: Image_map front & back
Date: 21 Jun 2002 07:49:52
Message: <3d1312e0$1@news.povray.org>
> 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

From: Greg M  Johnson
Subject: Re: Image_map front & back
Date: 21 Jun 2002 08:16:17
Message: <3d131911$1@news.povray.org>
"Warp" <war### [at] tagpovrayorg> 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

From: Warp
Subject: Re: Image_map front & back
Date: 21 Jun 2002 08:48:49
Message: <3d1320b1@news.povray.org>
Greg M. Johnson <gregj:-)565### [at] aolcom> 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

From: TinCanMan
Subject: Re: Image_map front & back
Date: 21 Jun 2002 09:05:36
Message: <3d1324a0$1@news.povray.org>
"Greg M. Johnson" <gregj:-)565### [at] aolcom> wrote in message
news:3d131911$1@news.povray.org...
> "Warp" <war### [at] tagpovrayorg> 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

From: Christopher James Huff
Subject: Re: Image_map front & back
Date: 21 Jun 2002 09:06:45
Message: <pan.2002.06.21.08.06.08.489728.635@mac.com>
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] maccom>
POV-Ray TAG e-mail: <chr### [at] tagpovrayorg>
WWW: http://homepage.mac.com/chrishuff/


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Image_map front & back
Date: 21 Jun 2002 09:14:19
Message: <3d1326ab$1@news.povray.org>
"Christopher James Huff" <chr### [at] maccom> wrote in message
news:pan### [at] maccom...
> 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

From: TinCanMan
Subject: Re: Image_map front & back
Date: 21 Jun 2002 09:31:22
Message: <3d132aaa$1@news.povray.org>
"Greg M. Johnson" <gregj:-)565### [at] aolcom> wrote in message
news:3d1326ab$1@news.povray.org...
> "Christopher James Huff" <chr### [at] maccom> wrote in message
> news:pan### [at] maccom...
> > 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

From: Greg M  Johnson
Subject: MegaPov 0.7 bug
Date: 22 Jun 2002 22:52:45
Message: <3d1537fd@news.povray.org>
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] maccom> wrote in message
> > news:pan### [at] maccom...
> > > That is not true. It worked the first time I compiled it,


Post a reply to this message

From: Mike Williams
Subject: Re: MegaPov 0.7 bug
Date: 23 Jun 2002 01:07:22
Message: <RXm$YEAJcVF9Ew2h@econym.demon.co.uk>
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

<<< Previous 10 Messages Goto Latest 10 Messages Next 7 Messages >>>

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