|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I am trying to apply an image to the surface of a box as so
box { <-2, -0.5, -2>, <2, 0.55, 2>
pigment{image_map {sys "Test.bmp"} scale 1}
rotate y*45
translate<-25.5, 0, -25.5>
}
But I am getting a series of verticle bars. Thinking this was due to a
scaling problem I have added the scale and gone from 0.0001 to 10000. At
extremes I get a solid color that might be a corner of the image but nothing
else. Is there any way to work out how to scale the file to fit the box
surface or am I going about this completely the wrong way. I really only
want to place an image on the surface.
Thanks
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"David Instone" <d.i### [at] gmailcom> wrote in message
news:45824328@news.povray.org...
>I am trying to apply an image to the surface of a box as so
>
> box { <-2, -0.5, -2>, <2, 0.55, 2>
> pigment{image_map {sys "Test.bmp"} scale 1}
> rotate y*45
> translate<-25.5, 0, -25.5>
> }
>
> But I am getting a series of verticle bars. Thinking this was due to a
> scaling problem I have added the scale and gone from 0.0001 to 10000. At
> extremes I get a solid color that might be a corner of the image but
> nothing
> else. Is there any way to work out how to scale the file to fit the box
> surface or am I going about this completely the wrong way. I really only
> want to place an image on the surface.
>
> Thanks
>
My guess is that you're projecting the image onto the edge of your box and
the lines are the continuation of the image through the box.
The image is projected onto an XY plane by default, so if you are looking at
the XZ plane of the box you would just get stripes.
If this is your problem, just try rotating the image:
pigment{image_map {sys "Test.bmp"} scale 1 rotate x*90}
Which should place the image on the XZ plane, then you can rotate and
translate the box to wherever you want.
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Chris B" <c_b### [at] btconnectcomnospam> wrote in message
news:45826366$1@news.povray.org...
>
> "David Instone" <d.i### [at] gmailcom> wrote in message
> news:45824328@news.povray.org...
>> Is there any way to work out how to scale the file to fit the box
>> surface or am I going about this completely the wrong way. I really only
>> want to place an image on the surface.
>>
>> Thanks
>>
Oh yes, and the scaling bit - By default the image takes up one unit square
with it's bottom left corner at the origin. So to scale to a 4x4 surface and
centre it you'd need
pigment{image_map {sys "Test.bmp"} scale 4 translate <-2,0,-2> rotate x*90}
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Chris B" <c_b### [at] btconnectcomnospam> wrote in message
news:4582646a$1@news.povray.org...
>
> Oh yes, and the scaling bit - By default the image takes up one unit
square
> with it's bottom left corner at the origin. So to scale to a 4x4 surface
and
> centre it you'd need
>
> pigment{image_map {sys "Test.bmp"} scale 4 translate <-2,0,-2> rotate
x*90}
>
> Regards,
> Chris B.
>
>
Thank you very much Chris. You hit the nail right on the head with that one
and it has been annoying me for too long. I did have to play with it a bit
to get it right though. Instead of your version I ended up with this.
pigment{image_map {sys "Test.bmp"} scale 4 rotate x*90 translate <-2,0,-2>}
I found that if you translate before you rotate you end up with two half
images tiled verticaly. Does that sound feasible or am I making it up as I
go along?
Regards David
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"David Instone" <d.i### [at] gmailcom> wrote:
> "Chris B" <c_b### [at] btconnectcomnospam> wrote in message
> news:4582646a$1@news.povray.org...
> >
> > Oh yes, and the scaling bit - By default the image takes up one unit
> square
> > with it's bottom left corner at the origin. So to scale to a 4x4 surface
> and
> > centre it you'd need
> >
> > pigment{image_map {sys "Test.bmp"} scale 4 translate <-2,0,-2> rotate
> x*90}
> >
> > Regards,
> > Chris B.
> >
> >
>
> Thank you very much Chris. You hit the nail right on the head with that one
> and it has been annoying me for too long. I did have to play with it a bit
> to get it right though. Instead of your version I ended up with this.
>
> pigment{image_map {sys "Test.bmp"} scale 4 rotate x*90 translate <-2,0,-2>}
>
> I found that if you translate before you rotate you end up with two half
> images tiled verticaly. Does that sound feasible or am I making it up as I
> go along?
>
> Regards David
pigment{image_map {sys "Test.bmp"} once scale 4 rotate x*90 translate
<-2,0,-2>}
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"David Instone" <d.i### [at] gmailcom> wrote in message
news:45827229@news.povray.org...
>
> You hit the nail right on the head with that one
> and it has been annoying me for too long. I did have to play with it a bit
> to get it right though. Instead of your version I ended up with this.
>
> pigment{image_map {sys "Test.bmp"} scale 4 rotate x*90 translate
> <-2,0,-2>}
>
> I found that if you translate before you rotate you end up with two half
> images tiled verticaly. Does that sound feasible or am I making it up as I
> go along?
>
Hi David,
Ah yes, of course you're perfectly correct. If you translate it first the
translation in the Z direction has no effect, because it's just effectively
pushing the image into itself.
So you could translate <-2,-2,0> and then rotate x*90, but I think that
doing the rotate first, as you've done it, is clearer.
Regards,
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|