POV-Ray : Newsgroups : povray.general : Locking for a solution to create backlight functionality Server Time
18 Apr 2024 19:43:28 EDT (-0400)
  Locking for a solution to create backlight functionality (Message 1 to 6 of 6)  
From: povray
Subject: Locking for a solution to create backlight functionality
Date: 18 Mar 2019 19:10:00
Message: <web.5c90245a2bdcc2e46ef277700@news.povray.org>
Hi Folks,
I#m new to this forum. Hi everybody!

As the subject already tells I'm searching for a solution to design for example
a screen of a mobile phone, where I can use a PNG file as a screenshot that
should be iluminated like on a real backlighted screen of a mobile.

Therefore I found two solution, but non of them I'm glad with.

First atempt:
//--------------------------------------------------------------------------
#macro DisplayWithPicture(CenterPos,Diagonale, RatioXY, PicturePathName)

  #local SizeY = Diagonale / sqrt((RatioXY*RatioXY+1));
  #local SizeX = SizeY * RatioXY;
  #local Dimension = <SizeX/2,SizeY/2,SizeY/2000>;
  #local PosEdge2 = CenterPos+Dimension;
  #local PosEdge1 = CenterPos-Dimension;

  union{
    light_source {
      CenterPos
      color rgb<1.00, 1.00, 1.00>*10
      parallel
    }

    box { PosEdge1, PosEdge2
      texture{
        pigment {
          image_map{
            png PicturePathName
            map_type 0
            once
            filter all 0
          } // end of image_map,
          scale <SizeX,SizeY,0>
          translate PosEdge1
        }
      }
    }
  }

#end // of DisplayWithPicture
//--------------------------------------------------------------------------
This works first of all, but by placing the union of light_source and box with
the translate command to another position the light_source is not moved
accordingly.

//--------------------------------------------------------------------------
Second atempt:
I was using the same box but I added interior defintion to act like a light

  interior {
    media {
      emission color rgb<1.0,1.0,1.0>*1.75
    }
  }


But I'm also not successfull with this solution.
- The box ist not iluminated consistent
- As the box goes thin like a film the ilumination reduces to zero

//--------------------------------------------------------------------------

What else could I do to achiv a screen with backlight?


Post a reply to this message

From: Bald Eagle
Subject: Re: Locking for a solution to create backlight functionality
Date: 18 Mar 2019 19:50:00
Message: <web.5c902d898b28ec02765e06870@news.povray.org>
Sometimes you need to separate the effect you want to achieve with CGI from how
you might actually do it in the real world.

Perhaps you can just add finish {emission 1} to your image_map instead of trying
to actually backlight it.

Then there's http://www.povray.org/documentation/view/3.6.1/316/

and you may want to look at the double_illuminate modifier


Post a reply to this message

From: William F Pokorny
Subject: Re: Locking for a solution to create backlight functionality
Date: 18 Mar 2019 19:59:41
Message: <5c9030ed$1@news.povray.org>
On 3/18/19 7:06 PM, povray wrote:
> Hi Folks,
> I#m new to this forum. Hi everybody!
> 
> As the subject already tells I'm searching for a solution to design for example
> a screen of a mobile phone, where I can use a PNG file as a screenshot that
> should be iluminated like on a real backlighted screen of a mobile.
> 
> Therefore I found two solution, but non of them I'm glad with.
> 
> First atempt:
> This works first of all, but by placing the union of light_source and box with
> the translate command to another position the light_source is not moved
> accordingly.
> 

Hmm. Is this still true if you define an initial point_at <3d location> 
in your macro ?

> 
> What else could I do to achiv a screen with backlight?
> 
> 

Tossing out ideas not being completely sure what you need.

If you just want to see the image on the screen at a constant intensity 
you could set the image screen shape texture's emission (or ambient) 
finish to 1.

If your after an actual glowing screen which will light the scene, an 
option is to use radiosity and define the screen box/image with an 
emissive finish: emission 1 or larger.

Perhaps too the double_illuminate object qualifier or the diffuse 
backside illumination feature would be of use depending on what your 
after.

http://wiki.povray.org/content/Reference:Double_Illuminate_Object_Modifier

http://wiki.povray.org/content/Reference:Finish#Diffuse_Reflection_Items

Bill P.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Locking for a solution to create backlight functionality
Date: 19 Mar 2019 03:41:07
Message: <5c909d13$1@news.povray.org>
On 19-3-2019 0:59, William F Pokorny wrote:
> If your after an actual glowing screen which will light the scene, an 
> option is to use radiosity and define the screen box/image with an 
> emissive finish: emission 1 or larger.
> 

Adding to this, I would use an .exr image format instead of .png, you 
will then really get a screen image that illuminates the surroundings 
(e.g. light probes) playing with emission set to 1 or higher.

You can easily save your png image to OpenEXR using for example Ive's 
smart utility IC: http://www.lilysoft.org/IC/ic_index.htm

-- 
Thomas


Post a reply to this message

From: Alain
Subject: Re: Locking for a solution to create backlight functionality
Date: 19 Mar 2019 16:52:38
Message: <5c915696$1@news.povray.org>
Le 19-03-18 à 19:06, povray a écrit :
> Hi Folks,
> I#m new to this forum. Hi everybody!
> 
> As the subject already tells I'm searching for a solution to design for example
> a screen of a mobile phone, where I can use a PNG file as a screenshot that
> should be iluminated like on a real backlighted screen of a mobile.
> 
> Therefore I found two solution, but non of them I'm glad with.
> 

> //--------------------------------------------------------------------------
> Second atempt:
> I was using the same box but I added interior defintion to act like a light
> 
>    interior {
>      media {
>        emission color rgb<1.0,1.0,1.0>*1.75
>      }
>    }
> 
> 
> But I'm also not successfull with this solution.
> - The box ist not iluminated consistent
> - As the box goes thin like a film the ilumination reduces to zero
> 
> //--------------------------------------------------------------------------
> 
> What else could I do to achiv a screen with backlight?
> 
> 

When using media, when the media get thinner, it need to get 
denser/brighter to compensate.

So, if you reduce the thickness by a factor of 10, you need to multiply 
the colour used by 10.

   interior {
     media {
       emission rgb<1.0,1.0,1.0>*1.75 *10
     }
   }

The media must have at least some thickness.
The brightness will change according to the direction at witch it's been 
seen. When viewed perpendicularly, you look through less media than at a 
shallow angle.

It may be better to use a thin box or a polygon with a finish similar to :
finish{emission 1 diffuse 0}

You may use an area_light.
In this case, you'll need to add the area_illumination option to get 
consistent illumination.
You'll also need to use double_illuminate as an object attribute, or the 
back side illumination option in the finish :

finish{diffuse 0.1 0.9 ambient 0}


Post a reply to this message

From: clipka
Subject: Re: Locking for a solution to create backlight functionality
Date: 21 Mar 2019 14:42:52
Message: <5c93db2c$1@news.povray.org>
Am 19.03.2019 um 00:06 schrieb povray:
> Hi Folks,
> I#m new to this forum. Hi everybody!

Welcome.

You may want to change your username though - it creates the 
(presumably) wrong impression that you are posting in some official 
capacity. Also, since "POV-Ray" is trademarked, it might get you into 
legal trouble.


Post a reply to this message

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