|
LMXtra
a W3D
LightMapGenerator
calculates
Lightmaps inside Macromedia Director™ Version 8.5
to MX 2004 in autoring mode. A new set of texturecoordinates and the
lightmap images will be stored as members in your cast.
LMXtra
does not bake Textures, it calculates packed Lightmaps
for static models.
Textures can be tiled, scaled, animated, or changed under the Lightmaps.
Whats New
Download How
to install How
to use How
to publish How
to register Legal
Notice Disclaimer
Copyright Contact
|
| How
to install: Close Director,
download
the file <
LMXtra.dcr >
into
your Director / Xtras folder. You
may now run the LMXtra
from the Xtras menu within Director.
How
to use the LMXtra: LightMapXtra
should
run self-explained. But some notes may be
necessary: In the Member Tab choose
a W3D Member and the castLib where you like to store the
Lightmaps. 
- resetWorld():
it is recommended to reset the W3D everytime before starting LMXtra. In
order to be able to consider changes to the scene done by scripting,
there is no reset by default. So if you realize unexpected
results: check if you did the resetWorld() on startup.
- LumelSize / TextureSize: decide wether you want
to render
a fixed Lightmaptexture size (TextureSize), or render with the size of
a pixel (TexelSize) of the
lightmaptexture.
Be careful setting the value of TexelSize too small, this may result in
a very big lightmap and in a long render time. TextureSize
should be a value with Power of 2 [ 16, 32, 64, 128, 256,
512, 1024] LumelSize and TextureSize are global settings,
changing them
will change the Texture/LumelSize settings for all your models.
- pack Lightmaps:
All Lightmaps will be combined in one (or more, if needed) big Lightmap
with the specified maximum Size.
- scale Lightmaps:
supports better use of space while packing Lightmaps.
- use Texture Alpha Channel:
detects Alpha Channels in textures and considers transparency
while casting shadows.
- LightToTexel / TexelToLight:
reverses the rayDirection and will result in slightly different
Lightmaps, especially on the edge of two different objects.
Model
Tab: 
- Select
models
to render Lightmaps
- Excluded models
will not cast shadows
- specify / adjust the
value of
LumelSize / TextureSize.
- force smoothing:
enebles the renderer to force smoothed or flat surfaces.
Light
Tab: 
- select:
Lights can be addet to the calculations inside the Light Tab.
- Color and
Attenuation are not editable yet.
- Blur Amout:
enables a wider blurring on this Light
- Remove From World:
will
automaticly remove the Light from world. They will not be deleted. The
shader.emissive of all effected shaders will be set to white, so there
is no need for any light source in the scene exept you have models in
the scene which should be visible but not lightmapped. For example
animated models. Uncheck this option for Lights you want to keep in the
scene.
- Hotspot and Falloff for spotlights must be defined manually since these values are not included in the w3d format.
Global Illumination:
 - Passes: Number of
Global Illumination loops
- Quality: [1 - 100]
to run a faster test use a Number of about [ 10 ]. Values above 50 will
be very slow.
- Blur:
defines
the blurring for GI Lightmaps
- Ambient: choose a value from 1 to 255.
Low-Lightened scenes would need a higher value.
- Reflection: how
much light should be reflected by surfaces. [1-255]
Render Tab:
Render
button starts the render process on all selected Models and
Lights. The Engine will take 100%
of CPU usage! and
Your System will lock up !
It may happen that
Director seems to hang completely and you dont see the progressbar
working anymore, but rendering is still in progress...
There are 4 ways to come over it : - watch
the progress bar
(if its there)
- press ESC to cancel
the rendering
- minimize Director,
work on some other stuff and come back
when finished.
- go for a big mug of
coffee.....
However if you proved
your patience you will recieve a new
field member called LMX_init. You may change the prefix. This will effect the naming only. All information to restore the
LightmapTextureCoordinates will be placed in Field Members.
You will also find the LightMaps as Image Members. Now
you can reset your
Movie, and press <Map Lightmaps>.
The Lightmaps should be placed correctly on the Models. If
You make changes on some of the models or
create them at runtime, start the movie and render the Lightmaps when
everything is initialized. Be sure to <Map Lightmaps> after initializing your scene as well...
Some copys of Shaders may be created. they use the name
<nameOfTheShader_lmx>. Also some new modelResources
<nameOfTheModel_lmx> may be created if there are not
enough
vertices found in the mesh to create textureCoordinates for the
Lightmapping. How
to publish:
You
will find a LDM,
called < LMXtra_Mapper * .dcr> in the downloaded
LMXtra.zip.
Import this LDM into a castLib. Put it as a Sprite to the stage. Now
call it like:
- LMXMapperSpriteReference = sprite(me.spriteNum)
debug
= FALSE LMX_InitRef
= member("LMX_init")
- tell
LMXMapperSpriteReference
LMXMapper( debug, LMX_InitRef)
end
tell
Thats it.
There is a sample movie inside the LMXtra.zip file, which contains a
Handler which shows the usage more precisely. To test your shockwave
movie on your Hard Disk with a LDM ( like LMXMapper.dcr ) inside, you
need to test it in a folder named <dswMedia>.
Syntax
:
LMXMapper( {debug, initMemberReference} )
- debug:
#boolean
--> turn on and off
error messages in message window.
[default:
TRUE]
or:
#member reference -->
a #text or #field member to
recieve error messages
[default: VOID] - initMemberReference:
#member reference
--> a
#field member created by
LMXtra.
[default: member("LMX_init")]
{optional} contains initial mapping information.
How
to register:
LightMapXtra
is free to use.
You may try and use LightMapXtra
free of charge.
Since this is still a beta, test it carefully.
Warranty Disclaimer:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Copyright:
LightMapXtra
for Macromedia Shockwave 3D
Copyright (c) Gunnar Vagt.
All Rights Reserved. Contact
me for questions. Gunnar
Vagt lmxtra@vagtmedia.de
|