POV-Ray : Newsgroups : povray.general : pigment image map big image Server Time
29 Jul 2024 04:28:12 EDT (-0400)
  pigment image map big image (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: handos
Subject: pigment image map big image
Date: 2 Jul 2013 13:55:00
Message: <web.51d3132420ee38e6d7ae32040@news.povray.org>
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

From: Cousin Ricky
Subject: Re: pigment image map big image
Date: 2 Jul 2013 14:20:01
Message: <web.51d318b8958a06f478641e0c0@news.povray.org>
"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

From: handos
Subject: Re: pigment image map big image
Date: 2 Jul 2013 15:20:00
Message: <web.51d32752958a06f4d7ae32040@news.povray.org>
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

From: Le Forgeron
Subject: Re: pigment image map big image
Date: 2 Jul 2013 15:28:14
Message: <51d329ce$1@news.povray.org>
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

From: handos
Subject: Re: pigment image map big image
Date: 2 Jul 2013 15:50:00
Message: <web.51d32de6958a06f4d7ae32040@news.povray.org>
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

From: Alain
Subject: Re: pigment image map big image
Date: 2 Jul 2013 15:51:58
Message: <51d32f5e$1@news.povray.org>

> 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

From: handos
Subject: Re: pigment image map big image
Date: 2 Jul 2013 15:55:01
Message: <web.51d32f1d958a06f4d7ae32040@news.povray.org>
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

From: Alain
Subject: Re: pigment image map big image
Date: 2 Jul 2013 16:24:18
Message: <51d336f2$1@news.povray.org>

> 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

From: Warp
Subject: Re: pigment image map big image
Date: 2 Jul 2013 19:19:58
Message: <51d3601e@news.povray.org>
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

From: James Holsenback
Subject: Re: pigment image map big image
Date: 3 Jul 2013 08:29:23
Message: <51d41923$1@news.povray.org>
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

Goto Latest 10 Messages Next 2 Messages >>>

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