static shadows lightmap

Hi, i’m now turning my self to a day and night system. From the look of that other post, it seems like “real-time” shadowing is the nexts big thing. Butt… I’m going to try and go the cheap route and bake static shadows to a lightmap. I’m just not sure on how to go about adding my lightmap to my world. I’m using Deled that will make a lightmap but i’m not sure on how to add the files(20 pic of shadows) to the world, unless theres a easier way of doing this?

panda directly supports models with multi-uv-mapped and multi-textures.
i dunno what exactly deled can export but there should be a way to more or less directly load whatever it outputs. if the images are correctly specified in the modelfile (and thus the egg) panda will find them if they are in place.
or do you have 20 differnet lightmaps you like to switch between during daytime?. if so check the manual’s “texture replacement” chapter

Just a little background on how I do things: When I go about adding my models into using panda 3d I have to go and turn my deled map into a .x file, then from there I turn the .x file into a .egg file. I have alot of my models in one map not several files.

See, when Deled output its lightmap(s) it does this in several files, about 20-50 pic of them. From there i’m not sure on how to add them to the model du to the modelfile not even knowing about them because I have to take the lightmap off befor I can export my model into a .x format, other wise I get alot of textures with names equaling “something (1)” witch causes my x2egg to thow errors out.

hm… so deled can save a lightmap-only x-file but with broken filenames for textures?
guess in that case you’d need some workaround.
like a small script which first fixes the names in your lightmap.x aswell as the names of the corresponding texture-files.
then you should have a x-file for lightmaps and a x-file for the usual textures. both with the exact same geometry in it. (if thats the case)
you can now convert both into egg. and then merge material and UV-data. again this could involve writing a small script if you dont like tons of manual work.
can you make a minimal example? like creating a lightmapped level with just 2 planes or so. so we have the file some files to look at(if possible including some dummy-textures).something small enough to allow manual editing of the modelfiles without too much work.

I think Deled is bugged in the way it’s writing the x files with parens in the names like that, but this is somewhat debatable, since Microsoft’s spec (such as it is) doesn’t actually state which characters are allowed in names.

I’ve just checked in a workaround to Panda’s x parser to allow parens. This is now available in the cvs version, or it will presumably become part of the 1.6 release.

David

Hmm should I just wait then till 1.6 comes out?

ThomasEgi:
I’ll work on a example for you to see after work when I get home.