Page 1 of 1

Change Light intensity, how?

Posted: Thu Jun 15, 2006 6:46 pm
by Ground0
Hello

I know i have post in the German Forum about that but there says some people that that dont be changable...

I want only know now is that so or gives a way to change the light intensity?

With Greetings Ground0

PS:PB V4.00 and the integrated Ogre 3D Engine :)

Posted: Thu Jun 15, 2006 8:35 pm
by Trond
What do you mean by light intensity? And what light? A light entity or the ambient light? You can make a light lighter by doing this setting a lighter colour for it with LightColor(). Or do you mean range?

Posted: Fri Jun 16, 2006 6:31 am
by DarkDragon
He wants to set the light-range or light-attenuation.

Posted: Fri Jun 16, 2006 7:14 am
by Ground0
thx Darkdragon... i mean what you say :)

(Sorry he and you are not the same ^.^)

Posted: Fri Jun 16, 2006 8:55 am
by Trond
Then the German forum was right.

Posted: Wed Jun 21, 2006 9:30 am
by Ground0
Hello

So i have work on it again, i have found the Engine3D function "LightAttenuation" know's here anyone how to use it in the Source?

My Source in the German Forum:

Code: Select all

InitEngine3D()
InitSprite()
InitKeyboard()
LoadFont(0,"Courier New",22)
Add3DArchive("\3D",#PB_3DArchive_FileSystem)
Parse3DScripts()
OpenScreen(1024,768,32,"Test")
LoadMesh(22,"Test.mesh")
CreateEntity(23,MeshID(22),#PB_Material_None ,0,0,-900)
CreateEntity(43,MeshID(22),#PB_Material_None ,0,-200,-900)
AmbientColor(RGB(0,0,0))
CreateLight(3,RGB(255,255,200),0,100,-900)

OpenLibrary(54,"Engine3D.dll")
;  CallCFunction(54,"LightAttenuation",0,3)

CreateCamera(1,0,0,100,100)
CameraLocate(1,0,0,0)

If IsLight(3)
Else
  MessageRequester("Fehler","Keine Lichter")
  End
EndIf
Licht=-900
Repeat
 
  CallCFunction(54,"LightLocate",3,0,100,Licht)
  ;LightLocate(3,0,100,Licht)
  Licht=Licht--1
  Delay(0)
ExamineKeyboard()
RenderWorld()
StartDrawing(ScreenOutput())
BackColor(RGB(0,0,0))
DrawText(20,20,"Position Licht:"+Str(Licht),RGB(255,255,255))
StopDrawing()
FlipBuffers()

Until KeyboardPushed(#PB_Key_Escape)
CloseLibrary(54)

RenderWorld()
FlipBuffers()

CloseScreen() 
I have test here the Light Locate Commando but that works not... i have the desktop screen after the command CallCFunction and also the CallFunction...

With Greetings Ground0