|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "6digit" <eob### [at] gmailcom> wrote:
> > Good evening,
> >
> > I'm new to pov ray, so I need help with some issues.
> > 1. how do I import an image into pov ray so I can overlay an object on it. I
> > have tried and used various threads. one suggested using something called screen
> > inc. the issue I'm having with this, is when I try to edit the camera it doesn't
> > seem to take any effect. so I was wondering if there's any other way of doing
> > this or could explain how the screen inc works.
>
> one way is using an 'image_map' as a pigment, something like:
>
> plane {
> z, 1
> pigment {
> image_map {"myimg.jpg" once map_type 0}
> }
> }
>
> and scale the object (or the pigment) to reflect the image dimensions.
> <https://wiki.povray.org/content/Reference:Image_Map>
>
>
> > 2. if I do import the image how do I draw a simple line overlayed on the image.
> > also, I have looked at many threads. they too suggested drawing a very tin box.
> > is there another way to do this?
>
> cylinders, usually, for a line. afaik, no, you "only" have the choice from
> <https://wiki.povray.org/content/Reference:The_Object_Zoo>. hth.
>
>
> regards, jr.
Thank you jr it worked fine but it appears theres a shadow as it is hard to see
the image.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"6digit" <eob### [at] gmailcom> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > ...
> > one way is using an 'image_map' as a pigment, something like:
> >
> Thank you jr it worked fine but it appears theres a shadow as it is hard to see
> the image.
ok, there are two ways, essentially[*], to deal with a shadow: adapt the
light_source or the object. there are 'shadowless' (lights) and 'no_shadow'
modified objects; you can get the details from this page:
<https://wiki.povray.org/content/Reference:Keywords>
[*] but bear in mind that many of the regulars here know a _lot_ more about
POV-Ray than I do :-).
also meant to mention, re cylindrical lines, there's a 'sphere_sweep' primitive
which folks here use to good effect to make "lines", recently eg Dave Blandston.
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
From: Thorsten
Subject: Re: Importing an image to use on pov ray and overlaying a line
Date: 18 Jul 2022 03:50:09
Message: <62d510b1$1@news.povray.org>
|
|
|
| |
| |
|
|
On 17.07.2022 17:40, 6digit wrote:
> Good evening,
>
> I'm new to pov ray, so I need help with some issues.
> 1. how do I import an image into pov ray so I can overlay an object on it. I
> have tried and used various threads. one suggested using something called screen
> inc. the issue I'm having with this, is when I try to edit the camera it doesn't
> seem to take any effect. so I was wondering if there's any other way of doing
> this or could explain how the screen inc works.
>
> 2. if I do import the image how do I draw a simple line overlayed on the image.
> also, I have looked at many threads. they too suggested drawing a very tin box.
> is there another way to do this?
To overlay a 2D line over a 2D image and (as you said later in this
thread) not wanting shadows suggests you have the wrong tool for the
job. POV-Ray is a 3D rendering software, and not really suitable for 2D
image composition. The best way to manipulate 2D images in a
programmatic way is probably ImageMagick, which is open source and
freely available at https://imagemagick.org/
Thorsten
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "6digit" <eob### [at] gmailcom> wrote:
> > "jr" <cre### [at] gmailcom> wrote:
> > > ...
> > > one way is using an 'image_map' as a pigment, something like:
> > >
> > Thank you jr it worked fine but it appears theres a shadow as it is hard to see
> > the image.
>
> ok, there are two ways, essentially[*], to deal with a shadow: adapt the
> light_source or the object. there are 'shadowless' (lights) and 'no_shadow'
> modified objects; you can get the details from this page:
> <https://wiki.povray.org/content/Reference:Keywords>
>
> [*] but bear in mind that many of the regulars here know a _lot_ more about
> POV-Ray than I do :-).
>
> also meant to mention, re cylindrical lines, there's a 'sphere_sweep' primitive
> which folks here use to good effect to make "lines", recently eg Dave Blandston.
>
>
> regards, jr.
Thank you mr jr i was able to get rid of the shadow. the scaling is what im
trying to fix now.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thorsten <tho### [at] trfde> wrote:
> On 17.07.2022 17:40, 6digit wrote:
> > Good evening,
> >
> > I'm new to pov ray, so I need help with some issues.
> > 1. how do I import an image into pov ray so I can overlay an object on it. I
> > have tried and used various threads. one suggested using something called screen
> > inc. the issue I'm having with this, is when I try to edit the camera it doesn't
> > seem to take any effect. so I was wondering if there's any other way of doing
> > this or could explain how the screen inc works.
> >
> > 2. if I do import the image how do I draw a simple line overlayed on the image.
> > also, I have looked at many threads. they too suggested drawing a very tin box.
> > is there another way to do this?
>
> To overlay a 2D line over a 2D image and (as you said later in this
> thread) not wanting shadows suggests you have the wrong tool for the
> job. POV-Ray is a 3D rendering software, and not really suitable for 2D
> image composition. The best way to manipulate 2D images in a
> programmatic way is probably ImageMagick, which is open source and
> freely available at https://imagemagick.org/
>
> Thorsten
thank you thorsten i will check it out.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "6digit" <eob### [at] gmailcom> wrote:
> > "jr" <cre### [at] gmailcom> wrote:
> > > ...
> > > one way is using an 'image_map' as a pigment, something like:
> > >
> > Thank you jr it worked fine but it appears theres a shadow as it is hard to see
> > the image.
>
> ok, there are two ways, essentially[*], to deal with a shadow: adapt the
> light_source or the object. there are 'shadowless' (lights) and 'no_shadow'
> modified objects; you can get the details from this page:
> <https://wiki.povray.org/content/Reference:Keywords>
>
> [*] but bear in mind that many of the regulars here know a _lot_ more about
> POV-Ray than I do :-).
>
> also meant to mention, re cylindrical lines, there's a 'sphere_sweep' primitive
> which folks here use to good effect to make "lines", recently eg Dave Blandston.
>
>
> regards, jr.
Thank you jr. the info youve giving me its more than enough i am making
considerable progress with this little info.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"6digit" <eob### [at] gmailcom> wrote:
> Thank you jr. the info youve giving me its more than enough i am making
> considerable progress with this little info.
> I'm new to pov ray, ...
glad you got "on top of it". and hope you will find your future "POVing"
rewarding.
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "6digit" <eob### [at] gmailcom> wrote:
> > Good evening,
> >
> > I'm new to pov ray, so I need help with some issues.
> > 1. how do I import an image into pov ray so I can overlay an object on it. I
> > have tried and used various threads. one suggested using something called screen
> > inc. the issue I'm having with this, is when I try to edit the camera it doesn't
> > seem to take any effect. so I was wondering if there's any other way of doing
> > this or could explain how the screen inc works.
>
> one way is using an 'image_map' as a pigment, something like:
>
> plane {
> z, 1
> pigment {
> image_map {"myimg.jpg" once map_type 0}
> }
> }
>
> and scale the object (or the pigment) to reflect the image dimensions.
> <https://wiki.povray.org/content/Reference:Image_Map>
> Could you please advise on scaling the object because I am having trouble scaling
it.
>
> > 2. if I do import the image how do I draw a simple line overlayed on the image.
> > also, I have looked at many threads. they too suggested drawing a very tin box.
> > is there another way to do this?
>
> cylinders, usually, for a line. afaik, no, you "only" have the choice from
> <https://wiki.povray.org/content/Reference:The_Object_Zoo>. hth.
>
>
> regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
"6digit" <eob### [at] gmailcom> wrote:
> ...
> > Could you please advise on scaling the object because I am having trouble scaling
it.
will try :-).
say your input photo/image is 1920x1080 pixels. then, to get from "square"
image_map to correct proportion, a 'scale <1.92,1.08,1>' would restore the
aspect[*]. as for where to place the 'scale', fwiw, I tend to make it part of
the 'texture' or 'pigment' containing the map. eg:
plane {
z,1
texture {
pigment { ...the image_map... }
}
scale <1.92,1.08,1>
}
[*] approximate/close is often good enough. for instance, for one of my
project's, the source jpg is 624x351 and I use a 'scale <10,6,1>'
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
oops.
"jr" <cre### [at] gmailcom> wrote:
> plane {
> z,1
> texture {
> pigment { ...the image_map... }
> }
> scale <1.92,1.08,1>
> }
should have been:
plane {
z,1
texture {
pigment { ...the image_map... }
scale <1.92,1.08,1>
}
}
(typing.. :-))
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|