HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Changing the location of lighting?

01-25-2003, 03:05 AM#1
FyreDaug
The sun is always at the far right, is there a way to relocate it? I want it directly above the middle of the map.
01-25-2003, 03:28 AM#2
ph33rb0
Try setting the time to noon and lock it there?
01-25-2003, 03:33 AM#3
Ari
The good news is that this is changable. I believe the information is in one of the miscdata.txt files (can't remember which of the two, but it's commented clearly). You can alter the coordinates that lighting is coming from. Bad news, of course, is that neither of those files is loaded in multiplayer. So if you'd like to make a single player map, go for it, but in multi, it's impossible until the next patch (hopefully).

PS, far more cool than a shadowless map, imho, is one at sunset, with a *very* slight red filter applied and super-long shadows leaving most of the map in the shade.
03-11-2003, 05:03 AM#4
Ari
ok, got it figured out. You'll all gonna love this one :)
Today, we're going to move the sun.

Extract, and go into miscdata.txt (the UI one)

when you get to this line:

[Light]
// Vector from light to world

change the direction as you see fit:

Direction= -0.3, 0.3, -0.05

It's really simple. The coordinates are x,y, -z (in other words, negative values indicate a sun above the horizon). Low z values give shallow angles (as in, sunset). The values above give the image below.

Finally, copy this into the "Units" directory, and open plain WE (it must be closed before this). For some reason everything will appear darker than usual, but we don't care about that. Calculate shadows and save. Exit, and resume your editing in usmwe. The beauty, of course is that shadows are saved as part of the map, so they'll persist no matter what you do, and they're readily seen by people in multi, of course.
03-11-2003, 12:43 PM#5
FyreDaug
You can't import miscdata.txt for bnet.
03-11-2003, 01:34 PM#6
rwxr-xr-x
Very nice. I'm just curious though, will units created while the game is in play take on the shadow effect based on information saved with the map (calculate shadows) or will they have shadows applied based on Blizzards information?
03-11-2003, 02:08 PM#7
Ari
Quote:
Originally posted by FyreDaug
You can't import miscdata.txt for bnet.

It turns out that that's irrelevent in this case, since shadow data is generated and saved with the map as a separate file. In practical terms, it works like removing the height and slope restrictions: once the map is saved, the miscdata settings aren't of any concern.

BTW, yeah, it turns out that unit shadows remain that same. Each building shadow (since those are the onces that would appear most messed up) exists as a blp (though it's in some weird format, or something - open them in viewer to see what I mean). Perhaps these files can be rotated and/or stretched as needed.
03-11-2003, 09:01 PM#8
FyreDaug
So the terrain would have the correct shadow effects, but the unit would remain the same? damn.

EDIT: Ari, that pic you posted, around the taller terrain parts its white pixelated, why?
05-03-2003, 02:48 AM#9
Ari
Too late to matter, perhaps, but I think it's because I goofed somehow when I cropped the tga file and converted it to a gif. It has nothing to do with gameplay - that's certainly not visible in-game (or for that matter, in the original screenshot - odd).
05-03-2003, 12:38 PM#10
kharma
Unit and building shadow data is in the unitui.slk file. Almost every unit and most buildings work off a single shadow blp which is simply resized depending on the relative size of the unit. Ari and I had a brief discussion on whether or not unitui is map implantable, but neither of us have had the need to try. Perhaps someone else has experience with it.

That may not be necessary however, as several earlier enhanced World Editors (Blink was one of them, I believe) allowed you to edit shadow size through the unit editor. If you added the details into the unitmetadata.slk it may work on the same priciples as the map shadow data saving if implantation seems a less-appealing solution/just plain doesn't work :P.

~kharma
05-03-2003, 05:08 PM#11
FyreDaug
Wow, old post. Anyways, once TFT comes out we won't have any problems with this :D