ol' YAL

Blitz3D Forums/Blitz3D Programming/ol' YAL

stayne(Posted 2008) [#1]
Does anyone have any hints on getting YAL to lightmap a native blitz 512x512 terrain? Here's what I'm using and it's producing less than desireable results (not YAL's fault, but mine of course)...

	If KeyHit(88)
		BeginLightMap(200, 200, 200)
		
		;CreateLMLight.LMLight(x#, y#, z#, r#, g#, b#, range# = 0, castshadows = True, bright# = 10.0, att0# = 0, att1# = 1, att2# = 0)
		CreateLMLight( 128,40,128, 219, 219, 255, 0, True, 4)
		
		;LightMapTerrain(terrain, texsize% = 0, blurradius% = 1, selfshadow = False, TotalInfo$)
		tex = LightMapTerrain(terrain, 0, .5, 1, "Lightmapping...")	
		SaveLightMap(terrain, tex,"_lm.bmp","terrain.luv")
		EntityTexture terrain,tex,0,0
		;ApplyLightMap(terrain, tex)
		EndLightMap()
	EndIf


Here's the output...

http://www.headpile.com/stuff/_lm.bmp


Ross C(Posted 2008) [#2]
YAL, is mind bogglingly confusing i found, when i tried to use it. Good luck!


stayne(Posted 2008) [#3]
You're not joking, and I'm tired of scratching my head on that one :). I'm working on a world builder out of boredom and I'm looking for a way to grab the existing shadow map which has already been applied to the terrain and add object shadows (trees, buildings, etc) after placement. I suppose rotating all the models 90 degrees and burning them into the shadow map would work but I can't figure this one out. Yet.

ps: L3DT is awesome :)


stayne(Posted 2008) [#4]
Finally got YAL working...tried out the version with sunlight implemented. I didn't realize there was 3 different YALs in the code archives :).