POV-Ray : Newsgroups : povray.general : Locking for a solution to create backlight functionality : Locking for a solution to create backlight functionality Server Time
18 Apr 2024 10:06:09 EDT (-0400)
  Locking for a solution to create backlight functionality  
From: povray
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

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