POV-Ray : Newsgroups : povray.general : IES file format Server Time
7 Nov 2024 02:24:33 EST (-0500)
  IES file format (Message 1 to 6 of 6)  
From: Gianluca Massaccesi
Subject: IES file format
Date: 28 Jan 2004 06:03:14
Message: <401796f2@news.povray.org>
There is a way of introducing angle-dependent light source?
For example considering as input a file in IES format for light sources?

Thanks to anybody can help me!

Gianluca Massaccesi


Post a reply to this message

From: Peter Popov
Subject: Re: IES file format
Date: 28 Jan 2004 19:47:28
Message: <tdlg10d9nvsagu8ulngjobph39raj9vfhv@4ax.com>
On Wed, 28 Jan 2004 12:13:39 +0100, "Gianluca Massaccesi"
<gia### [at] tinit> wrote:

>There is a way of introducing angle-dependent light source?
>For example considering as input a file in IES format for light sources?

I don't know how exactly the data is represented in the IES format but
I guess it's a projection of a spherical surface on a rectangular area
which holds luminosity and/or spectral values. If it can be converted
to PNG with alpha (if necessary), you can use it as an image_map
(map_type 1) on a tiny sphere which you then put around the
light_source and give it no_image. Do not use looks_like because it
implies a no_shadow flag on the sphere and you do want it to cast a
shadow (a filtered luminosity map, sort of). You know, with some luck
I might not even be talking complete gibberish :)


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Gianluca Massaccesi
Subject: Re: IES file format
Date: 29 Jan 2004 08:23:15
Message: <40190943$1@news.povray.org>
Thank you. This could be an idea. IES format gives luminosity in function of
horizontal and vertical angle.
This morning I developed a software that reads an IES file and write a file
with a set of spot light, one for each angle. It works but if the angle
discretization is fine, the number of spotlights created i beg and the
rendering gets slow.
I will test your idea, to see if it gives better performances.
The procedure is not known to me at the moment but I can try to manage.
Please if you can send me any information about the procedure or just an
example, it would be helpfull.

Many thanks.

Gianluca

"Peter Popov" <pet### [at] vipbg> ha scritto nel messaggio
news:tdlg10d9nvsagu8ulngjobph39raj9vfhv@4ax.com...
> On Wed, 28 Jan 2004 12:13:39 +0100, "Gianluca Massaccesi"
> <gia### [at] tinit> wrote:
>
> >There is a way of introducing angle-dependent light source?
> >For example considering as input a file in IES format for light sources?
>
> I don't know how exactly the data is represented in the IES format but
> I guess it's a projection of a spherical surface on a rectangular area
> which holds luminosity and/or spectral values. If it can be converted
> to PNG with alpha (if necessary), you can use it as an image_map
> (map_type 1) on a tiny sphere which you then put around the
> light_source and give it no_image. Do not use looks_like because it
> implies a no_shadow flag on the sphere and you do want it to cast a
> shadow (a filtered luminosity map, sort of). You know, with some luck
> I might not even be talking complete gibberish :)
>
>
> Peter Popov ICQ : 15002700
> Personal e-mail : pet### [at] vipbg
> TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Peter Popov
Subject: Re: IES file format
Date: 29 Jan 2004 09:15:52
Message: <cn4i10dpa0m0j20fsblmo9938ljsssvbe4@4ax.com>
On Thu, 29 Jan 2004 14:33:44 +0100, "Gianluca Massaccesi"
<gia### [at] tinit> wrote:

>Thank you. This could be an idea. IES format gives luminosity in function of
>horizontal and vertical angle.

So it's a mercator projection then? This should make things more
simple. Just convert it to something POV can read. Probably the best
format is 16-bit grayscale PNG with 16-bit alpha. Make the gray
channel 100% white and store the luminosity as transparency in the
alpha channel. I.e. the more luminance, the more transparent the image
map will be and the more light will shine through, which is what we
want.

In terms of POV code it looks quite simple once you have the PNG file:

#macro IES_Light_Source (Location, Color, Transparency_Map_File) {
   union {
      light_source { 0 color Color }
      sphere {
         0, 0.001
         pigment {
            image_map {
               png Transparency_Map_File
               map_type 1
            }
         }
         no_image
      }
      translate Location
   }
}

Then use the macro like this:

IES_Light_Source ( <10,100,-20>, rgb 100, "foo_file.png" )

You can also use a plain simple 16-bit PNG without the alpha channel,
then use image_pattern to create a transparency map, but that's just
nitpicking :)

There might be some errors in the code since I am typing it directly
in the newsreader, but you get the idea. 


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Gianluca Massaccesi
Subject: Re: IES file format
Date: 30 Jan 2004 08:57:51
Message: <401a62df@news.povray.org>
The sintax is clear. The problem is now how to produce a png file from an
ies file.
Attached there are 2 example. One very simple (prova_06.txt) and another of
the size I have to use. It represent a light source of 45x99 values for each
angle. Till now I simulated it with 45x99 spotlights. But you can immagine
that the performances are not good enough.
Your way maybe is faster but it is difficult to traslate such files in png
format (I have not the specifications of the format neither).

Can you suggest something easier?

Thanks.

Gianluca Massaccesi

"Peter Popov" <pet### [at] vipbg> ha scritto nel messaggio
news:cn4i10dpa0m0j20fsblmo9938ljsssvbe4@4ax.com...
> On Thu, 29 Jan 2004 14:33:44 +0100, "Gianluca Massaccesi"
> <gia### [at] tinit> wrote:
>
> >Thank you. This could be an idea. IES format gives luminosity in function
of
> >horizontal and vertical angle.
>
> So it's a mercator projection then? This should make things more
> simple. Just convert it to something POV can read. Probably the best
> format is 16-bit grayscale PNG with 16-bit alpha. Make the gray
> channel 100% white and store the luminosity as transparency in the
> alpha channel. I.e. the more luminance, the more transparent the image
> map will be and the more light will shine through, which is what we
> want.
>
> In terms of POV code it looks quite simple once you have the PNG file:
>
> #macro IES_Light_Source (Location, Color, Transparency_Map_File) {
>    union {
>       light_source { 0 color Color }
>       sphere {
>          0, 0.001
>          pigment {
>             image_map {
>                png Transparency_Map_File
>                map_type 1
>             }
>          }
>          no_image
>       }
>       translate Location
>    }
> }
>
> Then use the macro like this:
>
> IES_Light_Source ( <10,100,-20>, rgb 100, "foo_file.png" )
>
> You can also use a plain simple 16-bit PNG without the alpha channel,
> then use image_pattern to create a transparency map, but that's just
> nitpicking :)
>
> There might be some errors in the code since I am typing it directly
> in the newsreader, but you get the idea.
>
>
> Peter Popov ICQ : 15002700
> Personal e-mail : pet### [at] vipbg
> TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message


Attachments:
Download 'prova_06.txt' (1 KB) Download '67FR-RH.ies.txt' (27 KB)

From: Tom Melly
Subject: Re: IES file format
Date: 30 Jan 2004 09:48:15
Message: <401a6eaf@news.povray.org>
"Gianluca Massaccesi" <gia### [at] tinit> wrote in message
news:401a62df@news.povray.org...

Eep - cancel that message, and repost just the message to this group and the
binaries to one of the binaries groups (none of them look strictly relevant, so
I guess it doesn't matter too much which one). Then just mention in the message
to this group where the binary can be found.

Alternatively, place the binaries on a website and provide a link.

A bore, I know, but posting binaries to non-binary groups is very much a no-no,
and will do your reputation no good.


Post a reply to this message

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