|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I have this image floor_stonechip that I want to map on a planar surface. I used
the following code for that:
plane {
y,0
translate table3_pos
translate 300*y
pigment {
image_map {png "floor_stonechip.png"}
}
}
A sample result of my rendering generates this:
www.doc.ic.ac.uk/~ahanda/scene_16_0040.png
However, the floor doesn't look exactly like I want to see. The
floor_stonechip.png looks like this:
www.doc.ic.ac.uk/~ahanda/floor_stonechip.png
Can povray experts point me what is it that I need to change in this code to get
similar looking floor (the floor_stonechip.png is quite a big image)
Thank you
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"handos" <han### [at] gmailcom> wrote:
> plane {
> y,0
> translate table3_pos
> translate 300*y
> pigment {
> image_map {png "floor_stonechip.png"}
> }
> }
Image maps map to the x-y plane. You need to rotate the pigment:
pigment {
image_map {png "floor_stonechip.png"}
rotate 90 * x
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi Ricky,
I am not sure if I understand that properly why there should be a rotate around
the x-axis but I did try that it doesn't seem to change much. The
floor_stonechip.png seems to be quite a big image I wonder if there is any
scaling happening around?
"Cousin Ricky" <rickysttATyahooDOTcom> wrote:
> "handos" <han### [at] gmailcom> wrote:
> > plane {
> > y,0
> > translate table3_pos
> > translate 300*y
> > pigment {
> > image_map {png "floor_stonechip.png"}
> > }
> > }
>
> Image maps map to the x-y plane. You need to rotate the pigment:
>
> pigment {
> image_map {png "floor_stonechip.png"}
> rotate 90 * x
> }
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 02/07/2013 21:17, handos nous fit lire :
> Hi Ricky,
>
> I am not sure if I understand that properly why there should be a rotate around
> the x-axis but I did try that it doesn't seem to change much. The
> floor_stonechip.png seems to be quite a big image I wonder if there is any
> scaling happening around?
whatever the size of the image used for image_map, it will fit a 1x1 square.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
If I understand you correctly, do I need to scale the pigment by a very large
value?
Ankur.
Le_Forgeron <jgr### [at] freefr> wrote:
> Le 02/07/2013 21:17, handos nous fit lire :
> > Hi Ricky,
> >
> > I am not sure if I understand that properly why there should be a rotate around
> > the x-axis but I did try that it doesn't seem to change much. The
> > floor_stonechip.png seems to be quite a big image I wonder if there is any
> > scaling happening around?
>
> whatever the size of the image used for image_map, it will fit a 1x1 square.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Hi Ricky,
>
> I am not sure if I understand that properly why there should be a rotate around
> the x-axis but I did try that it doesn't seem to change much. The
> floor_stonechip.png seems to be quite a big image I wonder if there is any
> scaling happening around?
>
It's very simple:
The image is maped on the X-Y plane (vertical plane) from <0,0> to <1,1>
and get tilled infinitely across and verticaly.
You want it to appear on the X-Z plane (horizontal plane), so, you need
Next, you need to properly scale the image_map to fit your needs.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
so I did scale the pigment to a very large value but in vain :(
Ankur.
"handos" <han### [at] gmailcom> wrote:
> If I understand you correctly, do I need to scale the pigment by a very large
> value?
>
> Ankur.
>
> Le_Forgeron <jgr### [at] freefr> wrote:
> > Le 02/07/2013 21:17, handos nous fit lire :
> > > Hi Ricky,
> > >
> > > I am not sure if I understand that properly why there should be a rotate around
> > > the x-axis but I did try that it doesn't seem to change much. The
> > > floor_stonechip.png seems to be quite a big image I wonder if there is any
> > > scaling happening around?
> >
> > whatever the size of the image used for image_map, it will fit a 1x1 square.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> so I did scale the pigment to a very large value but in vain :(
>
> Ankur.
>
If you only scale the image without rotating it, you get an incorrect
result: A slice of the image smeared infinitely along the Z direction.
The key is to rotate the image so that is maps correctly on the
horizontal plane.
Next, you scale it by a reasonable amount to fit your needs. The exact
scaling needed depends on the exact context of your scene. It also
depend on the proportions of your image. If your image is 800x600
pixels, you need a 4:3 ratio in your scaling.
It can be something like:
image_map{jpeg "your image.jpg" rotate 90*x scale<100,1,75>}
In this sample, the image will cover 100 by 75 unit on the ground plane
and repeat infinitely in both directions.
Use the "once" keyword if you want only one instance of the image.
It can help to use once when adjusting the scalling.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
handos <han### [at] gmailcom> wrote:
> so I did scale the pigment to a very large value but in vain :(
Don't just do trial-and-error to see what happens. Try to understand
what's going on.
The image map will be mapped on a 1x1 unit square on the x-y plane
(and repeated on both of those axes.)
Your floor is on the x-z plane (because its normal vector is pointing
in the y direction.) Therefore you need to rotate the image map so that
it will be on the x-z plane instead of the x-y plane. If you rotate the
pigment by 90 degrees around the x axis, then it will end up being on
the x-z plane. (Try to visualize why that's so.)
What size is the floor, approximately, visible on the image, in units?
Is it like 10x10 units? 1000x1000 units? 0.01x0.01 units? Something else?
If the visible portion of the floor is, for example, 1000x1000 units,
then you need to scale your image map pigment by about 100 to get what
you want (ie. something like 10x10 tiles.)
If you just have no idea what the size of the floor is, then put a
box { 0, 1 } on it and see how large it is. It will give you a notion
of the scale of the image. (If the box is so large that it covers
everything, make it smaller.)
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 07/02/2013 01:51 PM, handos wrote:
> I have this image floor_stonechip that I want to map on a planar surface. I used
> the following code for that:
>
> plane {
> y,0
> translate table3_pos
> translate 300*y
> pigment {
> image_map {png "floor_stonechip.png"}
> }
> }
>
> A sample result of my rendering generates this:
> www.doc.ic.ac.uk/~ahanda/scene_16_0040.png
> However, the floor doesn't look exactly like I want to see. The
> floor_stonechip.png looks like this:
> www.doc.ic.ac.uk/~ahanda/floor_stonechip.png
>
> Can povray experts point me what is it that I need to change in this code to get
> similar looking floor (the floor_stonechip.png is quite a big image)
>
> Thank you
>
>
>
>
maybe this might help:
http://wiki.povray.org/content/Reference:Vector_Expressions#Index_Entry_max_extent
the 2nd code example
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |