Wintermute Engine > Scripts, plugins, utilities, goodies

Lightmap DLL

<< < (2/2)

Right, lof

To each scene you just have to make a lightmap. If you change to another scene, the corresponding Lightmap is used automatically.

Normally you define a region and when actor enters this region you can specify a color.

With the lightmap the actor changes color continuously (gradient) as he walks around.

The following code manages this

//Infinite loop

  //examine not every pixel movement of actor
  if (loop_counter > 40)
     //Build the path to the lightmap according to the current scene
     filename = Directory.CurrentDirectory +  "\Lightmaps\" + Scene.Name + "_LM.bmp";
     //Get actors color corresponding to lightmap
   if (GetActorColor(filename, actor.X,actor.Y, strRGB.Capacity,strRGB) == 0)
           //split to result in an array
      arrRGB = strRGB.Split(";");
          //set the actors alpha-color with values from lightmap
     actor.AlphaColor = MakeRGBA(ToInt(arrRGB[0]),ToInt(arrRGB[1]),ToInt(arrRGB[2]),255);

   loop_counter = 0;
  else loop_counter = loop_counter + 1;

I know this is a bit old topic, but i´d love to try this, is it possible to upload the .dll file somewhere or even some demo project? And if maybe the creator is no longer active in this forum, does anybody else uses this? Thanks


[0] Message Index

[*] Previous page

Go to full version