|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello everyone, I'm attempting to load a bmp file as an image map onto a box,
however, it keeps getting cut from it's original resolution into a square shape.
Should I be trying to image map onto a different shape, or is there something I
need to declare?
Thanks
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Hello everyone, I'm attempting to load a bmp file as an image map onto a box,
> however, it keeps getting cut from it's original resolution into a square shape.
> Should I be trying to image map onto a different shape, or is there something I
> need to declare?
>
> Thanks
>
>
An image_map is always maped to a unit square.
You only need to scale it to the desired dimention:
texture{image_map{bmp "Your_bitmap.bmp"}scale Desired_Dimention}
You can also apply the image to this box:
box{0, 1 [Your image goes here] scale The_Dimention_you_Want}
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 11/18/2010 5:37 PM, DranoMax wrote:
> Hello everyone, I'm attempting to load a bmp file as an image map onto a box,
> however, it keeps getting cut from it's original resolution into a square shape.
> Should I be trying to image map onto a different shape, or is there something I
> need to declare?
>
> Thanks
Hi DranoMax,
With the new beta versions of POV-Ray you can use max_extent() to
retrieve the original size of your image. Here's an example:
// declare the image
#declare image =
pigment{
image_map{
sys "some_image.bmp"
}
}
// get the x/y dimensions of the image (returns a 2D vector)
#declare image_size = max_extent(image);
box{0, 1
// map image to <0,0>-<1,1>
pigment{image}
// center the box
translate -0.5
// scale it proportionately so that the box's width equals one unit
scale image_size/image_size.x
}
It's often easier to map your image to a unit box and just scale from there.
Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Great, thanks guys! It works perfect now.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |