L3DT users' wiki
Large 3D terrain generator

Scripts > BakeLightOntoTexture

Description A script to bake the light map onto the texture map.
Author Aaron
Created 2010/05/24
Requires L3DT v2.9 beta 2 or later.
Download BakeLightOntoTexture.zs

Script contents

// check lightmap
hvar hLM hTX
set hLM <GetMap "LM">
set hTX <GetMap "TX">

assert <map.GetWidth hLM> "Light map is not initialised!"
assert <map.GetWidth hTX> "Texture map is not initialised!"

// store a backup
L3DTio_Backup.ExtBackupMap "TX" "Bake LM onto TX" 0 "view.ShowMap \"TX\""

// apply the overlay
ZeoImage.StretchDrape hTX hLM 80

// show the texture
view.ShowMap "TX"



scripts/bakelightontotexture.txt · Last modified: 2017/08/31 05:48 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki