![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
please i would like help with an issue I have.
I have an imported image and I would like it to be scaled to full size as it is
currently at a scale that is not visible to the eye. below I have posted the
image
and the current code i have
// perspective (default, not required) camera
camera {
perspective
location <5, 5, -15>
look_at <0, 0, 0>
right x*2752/4896 // aspect
//direction<3129.6857,3102.3533,0>
focal_point < 563.2927,1366.9001,0.0>
aperture 3.6171875
// direction z // direction and zoom
// angle 67 // field (overides direction zoom)
}
plane {
z, 1
pigment {
image_map {png "image" once map_type 0 interpolate 2 } }
finish {ambient 1 diffuse 0}
scale 4
}
Post a reply to this message
Attachments:
Download 'test.png' (155 KB)
Preview of image 'test.png'
![test.png](/povray.general/attachment/%3Cweb.62d84daeafca4da4d8145616fb08dd02%40news.povray.org%3E/test.png?ttop=442896&toff=100&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 20/07/2022 7:47 pm, 6digit wrote:
> please i would like help with an issue I have.
> I have an imported image and I would like it to be scaled to full size as it is
> currently at a scale that is not visible to the eye. below I have posted the
> image
> and the current code i have
>
> // perspective (default, not required) camera
> camera {
> perspective
> location <5, 5, -15>
> look_at <0, 0, 0>
> right x*2752/4896 // aspect
> //direction<3129.6857,3102.3533,0>
> focal_point < 563.2927,1366.9001,0.0>
> aperture 3.6171875
> // direction z // direction and zoom
> // angle 67 // field (overides direction zoom)
> }
> plane {
> z, 1
> pigment {
> image_map {png "image" once map_type 0 interpolate 2 } }
> finish {ambient 1 diffuse 0}
> scale 4
> }
Here is how I would do it:
ini settings: +W2592 +H1944 // Set the output to the original size of
your image.
#declare image_width = 2592;
#declare image_height = 1944;
///////////////////////////////////////////////////////////////////////////////
// perspective (default, not required) camera
camera {
orthographic
// Less distortion with an orthographic camera
location <image_width/2, image_height/2, -10000
// Move the camera perpendicular to the center of the image
// and back in z
look_at <image_width/2, image_height/2, 0>
// Point at the center of the image
right x*image_width/image_height
// aspect the same as original image.
//direction<3129.6857,3102.3533,0>
focal_point <image_width/2, image_height/2, 0>
// I have never used focal_point before but I guess
// it needs to be the centre of the image
aperture 3.6171875
// direction z // direction and zoom
angle 14 // field (overides direction zoom)
}
box{<0,0,0>,<1,1,0.001>
pigment {image_map {"D:/Files/Photos/Historic boats/027.JPG" once
map_type 0 interpolate 2 } }
finish {ambient 1 diffuse 0}
scale <image_width, image_height, 1>
}
// Make a box from 0 to 1 in z and y, thin in z
// Add image (from 0 to 1)
// then scale to original aspect
///////////////////////////////////////////////////////////////////////////////
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"m@b" <sai### [at] googlemail com> wrote:
> On 20/07/2022 7:47 pm, 6digit wrote:
> > please i would like help with an issue I have.
> > I have an imported image and I would like it to be scaled to full size as it is
> > currently at a scale that is not visible to the eye. below I have posted the
> > image
> > and the current code i have
> >
> > // perspective (default, not required) camera
> > camera {
> > perspective
> > location <5, 5, -15>
> > look_at <0, 0, 0>
> > right x*2752/4896 // aspect
> > //direction<3129.6857,3102.3533,0>
> > focal_point < 563.2927,1366.9001,0.0>
> > aperture 3.6171875
> > // direction z // direction and zoom
> > // angle 67 // field (overides direction zoom)
> > }
> > plane {
> > z, 1
> > pigment {
> > image_map {png "image" once map_type 0 interpolate 2 } }
> > finish {ambient 1 diffuse 0}
> > scale 4
> > }
>
> Here is how I would do it:
>
> ini settings: +W2592 +H1944 // Set the output to the original size of
> your image.
>
>
>
> #declare image_width = 2592;
> #declare image_height = 1944;
>
> ///////////////////////////////////////////////////////////////////////////////
> // perspective (default, not required) camera
> camera {
> orthographic
> // Less distortion with an orthographic camera
>
> location <image_width/2, image_height/2, -10000
> // Move the camera perpendicular to the center of the image
> // and back in z
>
> look_at <image_width/2, image_height/2, 0>
> // Point at the center of the image
>
> right x*image_width/image_height
> // aspect the same as original image.
>
> //direction<3129.6857,3102.3533,0>
> focal_point <image_width/2, image_height/2, 0>
> // I have never used focal_point before but I guess
> // it needs to be the centre of the image
>
> aperture 3.6171875
> // direction z // direction and zoom
> angle 14 // field (overides direction zoom)
> }
>
>
> box{<0,0,0>,<1,1,0.001>
> pigment {image_map {"D:/Files/Photos/Historic boats/027.JPG" once
> map_type 0 interpolate 2 } }
> finish {ambient 1 diffuse 0}
> scale <image_width, image_height, 1>
> }
>
> // Make a box from 0 to 1 in z and y, thin in z
> // Add image (from 0 to 1)
> // then scale to original aspect
>
>
> ///////////////////////////////////////////////////////////////////////////////
Thank you very much this has been an issue i have been dealing with. one more
thing if you dont mind if i want to overlay a simple box over the image what do
i have to do? and secondly is ok if i refrence you in my work as you have
provided such good work?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"6digit" <eob### [at] gmail com> wrote:
> "m@b" <sai### [at] googlemail com> wrote:
> > On 20/07/2022 7:47 pm, 6digit wrote:
> > > please i would like help with an issue I have.
> > > I have an imported image and I would like it to be scaled to full size as it is
> > > currently at a scale that is not visible to the eye. below I have posted the
> > > image
> > > and the current code i have
> > >
> > > // perspective (default, not required) camera
> > > camera {
> > > perspective
> > > location <5, 5, -15>
> > > look_at <0, 0, 0>
> > > right x*2752/4896 // aspect
> > > //direction<3129.6857,3102.3533,0>
> > > focal_point < 563.2927,1366.9001,0.0>
> > > aperture 3.6171875
> > > // direction z // direction and zoom
> > > // angle 67 // field (overides direction zoom)
> > > }
> > > plane {
> > > z, 1
> > > pigment {
> > > image_map {png "image" once map_type 0 interpolate 2 } }
> > > finish {ambient 1 diffuse 0}
> > > scale 4
> > > }
> >
> > Here is how I would do it:
> >
> > ini settings: +W2592 +H1944 // Set the output to the original size of
> > your image.
> >
> >
> >
> > #declare image_width = 2592;
> > #declare image_height = 1944;
> >
> > ///////////////////////////////////////////////////////////////////////////////
> > // perspective (default, not required) camera
> > camera {
> > orthographic
> > // Less distortion with an orthographic camera
> >
> > location <image_width/2, image_height/2, -10000
> > // Move the camera perpendicular to the center of the image
> > // and back in z
> >
> > look_at <image_width/2, image_height/2, 0>
> > // Point at the center of the image
> >
> > right x*image_width/image_height
> > // aspect the same as original image.
> >
> > //direction<3129.6857,3102.3533,0>
> > focal_point <image_width/2, image_height/2, 0>
> > // I have never used focal_point before but I guess
> > // it needs to be the centre of the image
> >
> > aperture 3.6171875
> > // direction z // direction and zoom
> > angle 14 // field (overides direction zoom)
> > }
> >
> >
> > box{<0,0,0>,<1,1,0.001>
> > pigment {image_map {"D:/Files/Photos/Historic boats/027.JPG" once
> > map_type 0 interpolate 2 } }
> > finish {ambient 1 diffuse 0}
> > scale <image_width, image_height, 1>
> > }
> >
> > // Make a box from 0 to 1 in z and y, thin in z
> > // Add image (from 0 to 1)
> > // then scale to original aspect
> >
> >
> > ///////////////////////////////////////////////////////////////////////////////
> Thank you very much this has been an issue i have been dealing with. one more
> thing if you dont mind if i want to overlay a simple box over the image what do
> i have to do? and secondly is ok if i refrence you in my work as you have
> provided such good work?
for the box or any other object i want to specifically place it in the x and z
plane.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
hi,
"6digit" <eob### [at] gmail com> wrote:
> please i would like help with an issue I have.
> ....
"below I have posted ... the current code i have"
well, most code, probably, I need a '#version' and things, too, to make POV-Ray
happy ;-). have included an alternative to m@b's suggestion, fwiw.
regards, jr.
-----<snip>-----
#version 3.8;
global_settings {assumed_gamma 1}
// dims, divided by 1000.
#declare w_ = 2.752;
#declare h_ = 4.896;
// map.
#declare p_ = pigment {
image_map {png "6dig.png" once map_type 0 interpolate 2}
};
// lights, camera, action.
light_source {<-1,1,-1>*1000 color srgb 1 parallel}
camera {
location <w_/2,h_/2,-15>
right x * (w_/h_)
up y
look_at <w_/2,h_/2,0>
}
box {
0, <w_,h_,.1>
texture {
pigment {p_}
scale <w_,h_,1>
}
}
-----<snip>-----
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"jr" <cre### [at] gmail com> wrote:
> hi,
>
> "6digit" <eob### [at] gmail com> wrote:
> > please i would like help with an issue I have.
> > ....
>
> "below I have posted ... the current code i have"
>
> well, most code, probably, I need a '#version' and things, too, to make POV-Ray
> happy ;-). have included an alternative to m@b's suggestion, fwiw.
>
>
> regards, jr.
>
>
> -----<snip>-----
> #version 3.8;
>
> global_settings {assumed_gamma 1}
>
> // dims, divided by 1000.
> #declare w_ = 2.752;
> #declare h_ = 4.896;
>
> // map.
> #declare p_ = pigment {
> image_map {png "6dig.png" once map_type 0 interpolate 2}
> };
>
> // lights, camera, action.
>
> light_source {<-1,1,-1>*1000 color srgb 1 parallel}
>
> camera {
> location <w_/2,h_/2,-15>
> right x * (w_/h_)
> up y
> look_at <w_/2,h_/2,0>
> }
>
> box {
> 0, <w_,h_,.1>
> texture {
> pigment {p_}
> scale <w_,h_,1>
> }
> }
> -----<snip>-----
good evening so i created a series of cylinders using the following code
sphere_sweep {
linear_spline
5,
<image_width,image_height, 5>, 0.5
<image_width, image_height, 6>, 0.5
<image_width, image_height, 7>, 0.5
<image_width, image_height, 8>,0.5
<image_width, image_height, 9>,0.5
tolerance 0.1
scale 0.9
//rotate<0.0169,0.5644,3.0455>
}
i want to overlay this image over the image imported to pov ray. i have 2 issues
tho the first been
1. it seems the cylinders are behind the image ? how do i bring them foward in a
way they can seen as an intergral part of the scene. secondly how do i put them
in the x and y plane
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
hi,
"6digit" <eob### [at] gmail com> wrote:
> ...
> good evening so i created a series of cylinders using the following code
> sphere_sweep {
> linear_spline
> 5,
> <image_width,image_height, 5>, 0.5
> <image_width, image_height, 6>, 0.5
> <image_width, image_height, 7>, 0.5
> <image_width, image_height, 8>,0.5
> <image_width, image_height, 9>,0.5
> tolerance 0.1
> scale 0.9
> //rotate<0.0169,0.5644,3.0455>
>
> }
> i want to overlay this image over the image imported to pov ray. i have 2 issues
> tho the first been
> 1. it seems the cylinders are behind the image ? how do i bring them foward in a
> way they can seen as an intergral part of the scene. secondly how do i put them
> in the x and y plane
#2 - each point is a (3-vector) sphere centre, so just place them at convenient
locations.
#1 - so much depends. you could declare the sweep, then translate it so it
moves nearer the camera, eg
#declare theSweep = sphere_sweep { ... };
...
object {theSweep translate some_pos}
regards, jr.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
(forgot, sorry)
"6digit" <eob### [at] gmail com> wrote:
> ...
> sphere_sweep {
> linear_spline
> 5,
> <image_width,image_height, 5>, 0.5
> <image_width, image_height, 6>, 0.5
> <image_width, image_height, 7>, 0.5
> <image_width, image_height, 8>,0.5
> <image_width, image_height, 9>,0.5
you are aware that the variables you use refer to the rendered image size, ie
your '+wnnn +hnnn' options?
regards, jr.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"jr" <cre### [at] gmail com> wrote:
> (forgot, sorry)
>
> "6digit" <eob### [at] gmail com> wrote:
> > ...
> > sphere_sweep {
> > linear_spline
> > 5,
> > <image_width,image_height, 5>, 0.5
> > <image_width, image_height, 6>, 0.5
> > <image_width, image_height, 7>, 0.5
> > <image_width, image_height, 8>,0.5
> > <image_width, image_height, 9>,0.5
>
> you are aware that the variables you use refer to the rendered image size, ie
> your '+wnnn +hnnn' options?
>
>
> regards, jr.
yes i am aware. just experimenting
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 2022-07-20 17:57 (-4), 6digit wrote:
>
> for the box or any other object i want to specifically place it in the x and z
> plane.
All image map pigments are in the x-y plane, so you would use rotate x
to bring it into the x-z plane.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |