Change Light intensity, how?

Advanced game related topics
Ground0
User
User
Posts: 41
Joined: Fri Jun 09, 2006 10:20 pm
Location: Stilli, Schweiz
Contact:

Change Light intensity, how?

Post 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 :)
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post 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?
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

He wants to set the light-range or light-attenuation.
bye,
Daniel
Ground0
User
User
Posts: 41
Joined: Fri Jun 09, 2006 10:20 pm
Location: Stilli, Schweiz
Contact:

Post by Ground0 »

thx Darkdragon... i mean what you say :)

(Sorry he and you are not the same ^.^)
Last edited by Ground0 on Fri Jun 16, 2006 9:30 am, edited 1 time in total.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Then the German forum was right.
Ground0
User
User
Posts: 41
Joined: Fri Jun 09, 2006 10:20 pm
Location: Stilli, Schweiz
Contact:

Post 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
Post Reply