Ok guys, see if you can break this.
New version of the demo map with the crashing-at-start issue fixed, with faster clouds at an oblique direction so they don't repeat, and with extended areas to demo the second thing I want to test: a single parallel light flooding entire map with moonlight just like ambient world does (earlier discussion here: http://forums.thedar...post__p__338956
). You still start off with 15 seconds of cloud, but overall the speed is tripled.
The moonlight effect looks less natural at this accelerated speed, but having to wait a minute between transitions in a test map is unhelpful. Please take that into account, as well as ignore missing walls.
I've added a big switch near map start that lets you turn off the dynamic moon dimming, and leaves it shining bright cloud or not, to make it easier to test the moonlight propagation.Notes on the single moonlight setup
DISCLAIMER: I have no idea why this method works or whether it will tomorrow. I'm just sharing it because I've not been able to break it yet in 3 maps I've tried it in.
There's a single parallel light in the box high above the map. It's connected up to every exterior visleaf by caulk tubes, and to every interior visleaf that needs moon shadow. The end of each route has a single VP between the visleaf and the moonlight. The big area has a single caulk tube which floods a box that sits over the whole area. If you open up that top ceiling, you'll see lots of little VPs inside the box, one for each visleaf in the big area below.
If you brick up any of the visportals in the ceiling above a visleaf, the moonlight will glitch in that visleaf.
I've found the portals don't need to be open. You can use permanently closed func portals if you want, but I see no need. The extra portals don't open unless the leaf below them is to be rendered anyway.
You need a func static ceiling if you have a VP in the ceiling of a room of course. I've left off the FS ceiling in the building at the top right/northeast of the map so you can see sky through the VPs, and you can see they cast a small square of moonlight on the walls of the room.
The test map: https://www.amazon.c...yRr0shA-cB3zC38
EDIT: Added 2nd image
Update Nov 2014: I know a bit more about how this works now and I don't necessarily recommend it for a big map. It makes all areas in the map "connected" areas which means all the entities in those areas get tested for shadow interactions with the current view. That's not necessarily a big problem -- it's a bounding-box test rather than an expensive test on the exact shadow -- but the technique is disabling a (problematic) performance optimization in the engine so use with caution and if there are performance issues maybe try to break up the exterior into more than one parallel light separated by an indoor section or tunnel to cover the seam between the parallel lights.
Edited by SteveL, 08 November 2014 - 09:33 PM.