RenderPhongImage
RenderPhongImage ImageNumber, Xpos, Ypos, LightColour, Brightness, FallOffRate
 
Parameters:

    ImageNumber = The Index of the image that you wish to render to
    Xpos = The X position from where the illumination centers
    Ypos = The Y position from where the illumination centers.
    LightColour = The RGB colour of the light
    Brightness = The Brightness (at the center) of the illumination
    FallOffRate = The rate the brightness falls away from the center
Returns: NONE
 

      RenderPhongImage renders a illumination pattern to an image. The way it works, is that each pixel is illuminated based on it's position to the origin point, which is considered to be light source. If you set the lights origin to the center of an image, It will creates a nice a shaded half sphere style image..



FACTS:


      * none.



Mini Tutorial:


      This example creates an Image, render an illumination pattern to it from the center, then displays this on the screen.

  
  
; Create a variable called size an assign this variable the value 256.
  Size=256
  
; Create a image using the Ball and size variables
  Ball=NewImage(Size,Size)
  
; Render a phong map styled shading to the image
  RenderPhongImage Ball,Size/2,Size/2,$ffffff,200,2.0
  
; Render Our Created image to the center of the screen
  DrawImage ball,(GetScreenWidth()/2)-Size/2,(GetScreenHeight()/2)-size/2,1
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  




 
Related Info: FadeImage | GrayScaleImage | LightImage | MirrorImage | RGBmaskImage | SaveBitmap | ScrollImage :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com