Jigsaws and the Inventory
I believe that I described in last week's post the new jigsaw puzzle minigame, and showed the (work-in-progress) instance of it that appears in the first level. A major task of this week just past, then, was determining just how the player would access this puzzle.
Most of the minigames in A Door to the Mists are naturally associated with single objects within the levels: Ideograms are found painted on the walls, translations are drawn from written pages, lockpicking is done at locks, and so on.
Not so the jigsaw puzzle minigame (or this instance of it, at least): being associated with a collection of items, there is no natural single place or object associated with it.
Instead, it seems to me far more natural to access it from the inventory, by collecting together the relevant items and then using this collective "item". In keeping with the fairly simple mechanics of the inventory thus far, there's no manual item combination to be done: some items now simply group together automatically.
As to the jigsaw minigame itself, it has been modified to use 3D models instead of flat paintings. While this perhaps sacrifices a little bit in aesthetics, I hope that it will reduce duplication of effort in future jigsaw puzzles by allowing me to re-use the in-level models (or parts thereof) within the minigame.
Locked by Key and Magic
Moving on from the jigsaw puzzle, the second major piece of progress made in the week just past was in creating the double-lock that seals the door shown above. That door--and two others like it--are found in the upper level of the tomb, each requiring a physical key and a magical one.
For two of those doors, the keys can be found via exploration--and indeed, the symbol that serves as magical key to one of those doors is the same that is acquired via the jigsaw puzzle mentioned above. The third door, I'm afraid, remains closed, its keys perhaps lost.
You may recognise the mist effect used above for the magical lock: it's the same that I made for the cutscenes; I think that it works fairly well here, too.
One problem that I encountered was that, both here and in cutscenes, I found distortions occurring in tight curves. This seems to be caused by the significant difference between the lengths of the outer- and inner- edges along such curves. Simply put, the shader was being applied as though they were of the same length, with the same amount of "image" being stretched over them. This is fine while the curve is shallow, and the difference is thus relatively small. However, in tighter curves the difference is great, leaving the "image" far more bunched up on the inner- than the outer- edge.
While thinking on the problem this week, an answer came to me: Simply adjust the UV-coordinates such that they're more bunched up on the inner edge. This results in the inner edge covering less of the "image", thus reducing the bunching in the final result. It's likely not a perfect solution, but I find the result to nevertheless be a significant improvement!
The Texture of Stone
The final piece of significant progress from this week just past was in the modelling and texturing of the twice-locked door--and perhaps most saliently the approach that I took to texturing it.
Specifically, I've decided to start creating re-usable textures--and especially normal maps--rather than painting new textures for each object with only opportunistic re-use. While this may reduce the degree of uniqueness between textures, my intent is that it also reduce duplication of effort. I don't intend to front-load this process; instead, my thought is to create them as called for.
As suggested above, I've started with the stone texture used for the twice-locked door. The biggest challenge there, perhaps, was in determining how to create a normal-map that worked with the "somewhat-painted" aesthetic that I'm going for.
I've taken a few approaches to this in previous normal maps, as I recall, but none seemed to work for me here. Painting heights and then applying GIMP's normal-mapping plugin produced contour bands, and while these might work elsewhere (I have them in mind for use in normal-mapping wood), I didn't like them here. In addition, I think that I found it difficult to produce quite the shape that I was aiming for. Directly painting normals simply didn't quite work: the result looked more like sheets of mica than rises and dips in the surface.
Instead, what seems to have worked for me--after a few attempts--is the following:
First, I generated simple cloudy noise via GIMP's "Solid Noise" filter. This served as a height-map, and, run through GIMP's normal-mapping plugin, produced a base normal-map. As it stood, I felt that this was a somewhat-reasonable semi-realistic normal map for stone.
To make it a little more painterly, and to further define the shape that I was aiming for, I then went over this with the smudge tool. I smeared out flat surfaces, but left the joints between them somewhat sharp, thus producing a field of relatively flat surfaces and sharp edges. When applied as a normal map, I feel that this produces a decent "chiselled stone" effect.
Since this is intended to be re-usable, I made the normals quite deep: I feel that it's easier to make a deep normal map shallow than vice versa, thus making it easier to produce a range of depths from an initially-deep map. Specifically, to make the normal map shallower I simply add a layer filled with the colour that normal mapping interprets as pointing in the direction of the underlying surface--the "no change" colour, so to speak--and adjust its opacity as desired. The higher the opacity, the less intense the normals, and thus the shallower the map.
Miscellaneous
One relatively minor point that may be worth mentioning is that I tweaked the player-light shaders a little, primarily in how they handle "highlights" (i.e. specular light). The new version should, I think, be a little less prone to over-lighting some surfaces, show normals a little better, and produce a slightly more metallic look at high levels of "shininess". Conversely, the prologue level's interior is somewhat dark; I'm tempted to go back and lighten the stone there a little...
As to the critical path for the first level, that's not quite done yet: there's a little yet to be made, and I still haven't made a decision regarding my lockpicking minigame.
That's all for this week--stay well, and thank you for reading! ^_^