POV-Ray : Newsgroups : povray.general : Importing an image to use on pov ray and overlaying a line Server Time
7 Oct 2024 08:09:04 EDT (-0400)
  Importing an image to use on pov ray and overlaying a line (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: 6digit
Subject: Importing an image to use on pov ray and overlaying a line
Date: 17 Jul 2022 11:45:00
Message: <web.62d42d79b67b6e84eb0f47cfb08dd02@news.povray.org>
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?

thank you.


Post a reply to this message

From: jr
Subject: Re: Importing an image to use on pov ray and overlaying a line
Date: 17 Jul 2022 14:30:00
Message: <web.62d45459df954fb91be3cd4b6cde94f1@news.povray.org>
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.


Post a reply to this message

From: 6digit
Subject: Re: Importing an image to use on pov ray and overlaying a line
Date: 17 Jul 2022 21:25:00
Message: <web.62d4b5cedf954fb9d8145616fb08dd02@news.povray.org>
"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

From: jr
Subject: Re: Importing an image to use on pov ray and overlaying a line
Date: 18 Jul 2022 03:40:00
Message: <web.62d50d79df954fb91be3cd4b6cde94f1@news.povray.org>
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

From: 6digit
Subject: Re: Importing an image to use on pov ray and overlaying a line
Date: 18 Jul 2022 08:40:00
Message: <web.62d553b8df954fb94eb0f47cfb08dd02@news.povray.org>
"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

From: 6digit
Subject: Re: Importing an image to use on pov ray and overlaying a line
Date: 18 Jul 2022 08:40:00
Message: <web.62d553dedf954fb94eb0f47cfb08dd02@news.povray.org>
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

From: 6digit
Subject: Re: Importing an image to use on pov ray and overlaying a line
Date: 18 Jul 2022 09:25:00
Message: <web.62d55e79df954fb94eb0f47cfb08dd02@news.povray.org>
"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

From: jr
Subject: Re: Importing an image to use on pov ray and overlaying a line
Date: 18 Jul 2022 11:55:00
Message: <web.62d58142df954fb91be3cd4b6cde94f1@news.povray.org>
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

From: 6digit
Subject: Re: Importing an image to use on pov ray and overlaying a line
Date: 18 Jul 2022 22:00:00
Message: <web.62d60f42df954fb9d8145616fb08dd02@news.povray.org>
"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

Goto Latest 10 Messages Next 2 Messages >>>

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