The build for the upper deck of the Conrad is mostly done now – I’m letting it sit for a time while I work on how the story will flow through it. I’ve reconfigured it a little and I’ve had to abandon some areas due to land impact issues – when I’ve finished the build I may come back and fill in what I’ve left out if there’s any room.
For the building work I’ve moved on to the lower deck. The lighting effects are going to be stronger and more animated down there – the upper deck should introduce the players to the way the Conrad uses light without overwhelming them; the lower deck turns it up to eleven.
I’ve been working on various props and effects and some fairly cool looking sets are beginning to come together.
One of the things I definitely wanted to have was dangling chains for the industrial-looking parts of the build. This presented a couple of challenges.
Chains are hideously complex shapes that just eat polygons like mad. Even games like Skyrim resort to using a pre-rendered texture on a single flat poly in places. With a bit of poly-bashing in Lightwave I managed to come up with a satisfactory looking chain that will give me about 120 links for an LI of only two – I’m still fiddling with this and may be able to get it down further with a little luck. In any case it’s enough right now to give me a 10m chain that looks heavy without being too oversized.
The second problem was that the chains need to move. Just hanging still really did nothing for the scene. I fiddled with scripts for quite a while and eventually ended up with a system that used llSetKeyframedMotion to add a gentle swaying to them. Several copies of this, moved to slightly different levels and angles, produced a really nice little cluster of subtle motion.
Prior to tackling the Conrad I’d never used llSetKeyframedMotion before so it’s been a little bit of a learning curve but it’s turning out to be a fantastically useful tool.
In the picture above you can see the chains in place in a roughed-out industrial build. What I can’t show you on this blog is the animated lighting in that set (well, not until I get a proper vidcap solution sorted out, but that’s way down my list of priorities at the moment – you’ll just have to wait and see it in-world!). I’ve gone with the old cliche of having light shining into the scene through a ventilation duct with a fan in it. I’ve never understood why anyone would mount a light above a fan like that but I can’t argue with the atmospheric effect it produces.
It took some experimenting to get this effect to look right, though. The obvious solution, and my first attempt at it, was to have a simple light projector shining down from above a mesh fan. This sort of worked but the SL rendering engine is picky about what shadows it renders – if the shadow-casting object is too far away it gets culled from the shadow mapping and all the effects disappear. With the fans mounted on a high ceiling the effect of their shadows rarely made it to the ground.
What I eventually ended up with was a (fairly crude) mesh fan that projected its own shadow map into the scene.
Mesh objects can act as projector lights as well as prims. They will project light along what Lightwave labels as the +Z axis and Blender labels as the +Y axis. This makes it fairly easy to construct a mesh fan that will be able to project a light from its face and a projection texture that will reflect the effect of a light shining from behind the fan.
SL is much more reliable when dealing with light projectors – there’s no awkward culling; they project their light over their configured range reliably.
Add this to a small mesh duct that places a poly behind the fan that I can assign a white fullbright texture to with a little glow and you get a convincing effect of light shining into the scene through a fan.
Each fan has a small script that uses llTargetOmega to set them spinning – the projected light spins with the prim that’s projecting it – and the effect is complete.
This technique adds reliable dynamic lighting to a 14m high room – no problems with shadow culling. The effect seen in-world is great, especially when interacting with normal- and specular-mapped objects.
I’d like to add some volumetric lighting effects to this as well but I’m still working on that and I suspect that I won’t be able to make it work effectively in any case. Still, I’m happy enough with what I have so far 🙂