reg texture/picture mapping

hi all,

I have got a problem regarding texture/picture mapping on a surface.I have got a surface of dimension 100X100 units and a picture of 10.0x.20.0 units.I am able to fill the surface by scaling the picture .
Now i want this picture to fill the whole surface, maintaining the original size of 10.0x 20.0 i.e.
10 picture should come in x- direction and 5 in y direction.Also is there any option in radiance texture mapping that automatically repeats the picture and maps it to any surface to fill the whole surface maintaing the original size of texture/picture

I hope i was able to communicate the problem correctly

regards
Gurneet

Hi Gurneet,

I will try to answer your question. Based on your description the aspect ratio of the images is 1 to 2 (X to Y).

First thing to note is that the picture.cal function depends on a particular assumption about aspect ratio. For the sake of this function aspect ratio is considered as (Y/X) with the following implications (I hope I get this correct as I do not have RwR in front of me):

   1. if Y/X > 1, (vertical aspect ratio) then the unit dimension of the
      picture is the X dimension
   2. if Y/X = 1, then the picture is unit dimension 1x1
   3. if Y/X < 1, (horizontal aspect ratio) then the unit dimension of
      the picture is the Y dimension

So in your case the following material definition should work

void colorpict 10by20image
9 red green blue your_image.pic picture.cal pic_u pic_v -s 10
0
1 2

since the image is vertical in aspect if we scale by 10 then we get an image that takes up 10x20 units.

Now to get an image to tile automagically, you can use the tile_u tile_v functions of picture.cal as follows:

void colorpict 10by20image.tile
9 red green blue your_image.pic picture.cal tile_u tile_v -s 10
0
1 2

This should get you 10 tiles in X and 5 tiles in Y on a surface that measure 100x100. Note that you will need to apply transformations (-rx, -rz, -ry, -t x y z) if the geometry is not located at the origin or is transformed out of the x,y plane.

Hope this helps (and that I do not have things backwards on the aspect ration stuff).

Regards,

-Jack de Valpine

G.S.Monga wrote:

···

hi all,

I have got a problem regarding texture/picture mapping on a surface.I have got a surface of dimension 100X100 units and a picture of 10.0x.20.0 units.I am able to fill the surface by scaling the picture .
Now i want this picture to fill the whole surface, maintaining the original size of 10.0x 20.0 i.e.
10 picture should come in x- direction and 5 in y direction.Also is there any option in radiance texture mapping that automatically repeats the picture and maps it to any surface to fill the whole surface maintaing the original size of texture/picture

I hope i was able to communicate the problem correctly

regards
Gurneet

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

--
# Jack de Valpine
# president
#
# visarc incorporated
# http://www.visarc.com
#
# channeling technology for superior design and construction