I am trying Evolves Advanced Lighting. I tried to make sense of the code and even read some of the post alike, but with no success because it seems everyone else seems to get at least that part lol but Im thinking it has to do with the textures or lighting. Even after I MAKE OBJECT BOX it won't color anything!!!
here is the code:
(pardon the mess!!)
`====================================================
` Terrain
`====================================================
` By EVOLVED
` www.evolved-software.com
`====================================================
`Setup display
load dll "user32.dll",1
Sw=call dll(1,"GetSystemMetrics",0)
Sh=call dll(1,"GetSystemMetrics",1)
delete dll 1
set display mode Sw,Sh,32
sync on : sync rate 0
hide mouse
autocam off
if Sw>1920
Sw2=Sw:Sh2=Sh
else
Sw2=1920:Sh2=1080
endif
`Setup advlighting
#include "Include/Advanced Lighting.dba"
AdvLighting_Setup(Sw,Sh,Sw2,Sh2,0)
`Setup post processing
PostProcessing_SetUp(1,1,0,1,1,1,0)
`Set camera,fog and ambient
AdvLighting_SetCamera(1,64000,75,0)
AdvLighting_SetFog(64000,2,0,0,0,0,0,0)
AdvLighting_SetHeightFog(1000,10000,6,25000,1,0,0,0,128)
load image "Textures/Lighting/Ambient.dds",100,2
AdvLighting_SetAmbientTexture(100)
position camera 25000,2500,25000
`Water
` Water_Create(1,1,1,1,1,1)
`Create sky
load image "Textures/sky/Stars.dds",101,2
load image "Textures/sky/Sun.dds",102
load image "Textures/sky/Moon.dds",103
load image "Textures/sky/Clouds.dds",104
load image "Textures/sky/Cloud Noise1.dds",105
load image "Textures/sky/Clouds 3d.dds",106
Sky_Create()
Sky_SetTexture(101)
Sky_SetSunTexture(102)
Sky_SetPlanetTexture(103)
Sky_SetCloudsTexture(104,105)
Clouds_Setup()
Clouds_SetTexture(106,105)
TimeOfDay_SetUp()
`Create directional light
DirLight_Create(1,0,2,1024)
DirLight_SetAngle(15,40,0)
DirLight_SetRange(27500)
DirLight_SetColor(255,255,255)
Sky_SetPlanetAngle(45,0,50,0.125)
Sky_SetSunAngle(15,40,0,0.125)
`Create directional light lens flare
Flare=LensFlare_Create(11)
LensFlare_SetSubFlareAtlas(Flare,0,1):LensFlare_SetSubFlareScale(Flare,0,0.2,0.2,1):LensFlare_SetSubFlareOffset(Flare,0,0,0,0):LensFlare_SetSubFlareFalloff(Flare,0,0,1,2):LensFlare_SetSubFlareColor(Flare,0,10,10,10,0)
LensFlare_SetSubFlareAtlas(Flare,1,10):LensFlare_SetSubFlareScale(Flare,1,0.06,0.06,1):LensFlare_SetSubFlareOffset(Flare,1,0.475,0,0):LensFlare_SetSubFlareFalloff(Flare,1,0,1,2):LensFlare_SetSubFlareColor(Flare,1,60,100,80,0)
LensFlare_SetSubFlareAtlas(Flare,2,11):LensFlare_SetSubFlareScale(Flare,2,0.025,0.025,1):LensFlare_SetSubFlareOffset(Flare,2,0.5,0,0):LensFlare_SetSubFlareFalloff(Flare,2,0,1,2):LensFlare_SetSubFlareColor(Flare,2,40,100,60,0)
LensFlare_SetSubFlareAtlas(Flare,3,12):LensFlare_SetSubFlareScale(Flare,3,0.02,0.02,1):LensFlare_SetSubFlareOffset(Flare,3,0.6,0,0):LensFlare_SetSubFlareFalloff(Flare,3,0,1,1):LensFlare_SetSubFlareColor(Flare,3,160,160,100,0)
LensFlare_SetSubFlareAtlas(Flare,4,10):LensFlare_SetSubFlareScale(Flare,4,0.075,0.075,1):LensFlare_SetSubFlareOffset(Flare,4,0.79,0,0):LensFlare_SetSubFlareFalloff(Flare,4,0,1,2):LensFlare_SetSubFlareColor(Flare,4,130,100,40,0)
LensFlare_SetSubFlareAtlas(Flare,5,12):LensFlare_SetSubFlareScale(Flare,5,0.02,0.02,1):LensFlare_SetSubFlareOffset(Flare,5,0.82,0,0):LensFlare_SetSubFlareFalloff(Flare,5,0,1,2):LensFlare_SetSubFlareColor(Flare,5,130,80,60,0)
LensFlare_SetSubFlareAtlas(Flare,6,10):LensFlare_SetSubFlareScale(Flare,6,0.1,0.1,1):LensFlare_SetSubFlareOffset(Flare,6,0.85,0,0):LensFlare_SetSubFlareFalloff(Flare,6,0,1,2):LensFlare_SetSubFlareColor(Flare,6,120,60,80,0)
LensFlare_SetSubFlareAtlas(Flare,7,12):LensFlare_SetSubFlareScale(Flare,7,0.02,0.02,1):LensFlare_SetSubFlareOffset(Flare,7,1,0,0):LensFlare_SetSubFlareFalloff(Flare,7,0,1,1):LensFlare_SetSubFlareColor(Flare,7,160,160,100,0)
LensFlare_SetSubFlareAtlas(Flare,8,11):LensFlare_SetSubFlareScale(Flare,8,0.04,0.04,1):LensFlare_SetSubFlareOffset(Flare,8,1.1,0,0):LensFlare_SetSubFlareFalloff(Flare,8,0,1,1):LensFlare_SetSubFlareColor(Flare,8,160,160,100,0)
LensFlare_SetSubFlareAtlas(Flare,9,10):LensFlare_SetSubFlareScale(Flare,9,0.1,0.1,1):LensFlare_SetSubFlareOffset(Flare,9,1.2,0,0):LensFlare_SetSubFlareFalloff(Flare,9,0,1,2):LensFlare_SetSubFlareColor(Flare,9,120,40,160,0)
LensFlare_SetSubFlareAtlas(Flare,10,12):LensFlare_SetSubFlareScale(Flare,10,0.05,0.05,1):LensFlare_SetSubFlareOffset(Flare,10,1.3,0,0):LensFlare_SetSubFlareFalloff(Flare,10,0,1,2):LensFlare_SetSubFlareColor(Flare,10,80,60,160,0)
LensFlare_SetToDirLight(Flare)
`Start timer
global FrameTime#=0.0
global StartTime=timer()
global Timer#
` remstart
load image "Textures/floor/grass.dds",1107
load image "Textures/floor/grass_n.dds",1108
load image "Textures/floor/grass_s.dds",1109
load image "Textures/detail/detail.dds",1110
load effect "Shaders/surface/rigid motion blur/normalmap.fx",200,0
Effect_Add(200)
Effect_SetDetailMapping(200,1)
make object box 200,2000,1,2000
position object 200,25000,1905,25000
scale object texture 200,0,10,10
Object_Add(200)
set object effect 200,200
color object 200,rgb(200,0,0)
`texture object 200,0,1107
`texture object 200,1,1108
` texture object 200,2,1109
`texture object 200,3,1110
` texture object 2,4,1
`remend
` load object "C:\Program Files (x86)\dark basic\dbpro_7.7\dbpro_upgrade_7_7_RC7\The Game Creators\Dark Basic Professional\Projects\3dtesterNEW\objects\vehicles\airplane\airplane.dbo",3
` position object 3,25000,1500,25000
`Start loop
do
`Update timer
FrameTime#=(FrameTime#*0.5)+((timer()-StartTime)*0.5)
StartTime=timer()
Timer#=FrameTime#*0.06
if Timer#<0.05 then Timer#=0.05
if Timer#>10 then Timer#=10
`Control camera
cr#=0:cf#=0:cu#=0
if keystate(32)=1 then cr#=-10
if keystate(30)=1 then cr#=10
if keystate(17)=1 then cf#=10
if keystate(31)=1 then cf#=-10
if spacekey()=1 then cu#=10
if shiftkey()=1 then cf#=cf#*2:cr#=cr#*2:cu#=cu#*2
cx#=cx#+mousemovey()*0.2
cy#=cy#+mousemovex()*0.2
ncr#=curvevalue(cr#*Timer#,ncr#,4/Timer#)
ncf#=curvevalue(cf#*Timer#,ncf#,4/Timer#)
ncu#=curvevalue(cu#*Timer#,ncu#,4/Timer#)
if cx#>88 then cx#=88
if cx#<-88 then cx#=-88
ncx#=curveangle(cx#,ncx#,1/Timer#)
ncy#=curveangle(cy#,ncy#,1/Timer#)
move camera ncf#
rotate camera 0,wrapvalue(ncy#-90),0
move camera ncr#
rotate camera 0,wrapvalue(ncy#+90),0
rotate camera ncx#,ncy#,0
position camera camera position x(),camera position y()+ncu#,camera position z()
`Set camera to terrain
h#=Terrain_GetHeight(camera position x(),camera position z())
if camera position y()<h#+100 then position camera camera position x(),h#+100,camera position z()
`Set sun angle
if controlkey()=1 then Sky_SetSunAngle(-camera angle x(),180+camera angle y(),camera angle z(),0.125)
`Cloud Density
Clouds_SetDensity(AL_CloudsDensity+mousemovez()*0.005)
`Set MotionBlur to timer
` if AL_Blur>0 then set effect constant float PostFilter_GetRenderTargetEffect(AL_Blur),"MotionBlur",0.05/Timer#
`Advlighting Update
AdvLighting_Update()
AdvLighting_Debug()
`Loop
loop
If your familiar with the Advanced Lighting, this seems to be the older one. I have the newer one but I am afraid if I don't get this one then I probably won't be able to understand the update... Please help!!!
- Infinity is Simplicity -