Later animation of the bed. Looking over it, my priority problem is the screwy UVs on the comforter—I may rebuild it from scratch, but this is definitely progress! As the condition drops, the wood becomes coarse and worn, the mattress and pillow yellows.
Final (I think) animation of the bed in Blender. Much better. The comforter is still hollow, but that's something I can fix in the engine—I kind of like the idea of particle clouds of feathers coming out of it when damaged!
So I *finally* got it working in anaglyphic, and I'm generally happy with the result. There are a couple of minor problems, but nothing that can't be buffed.
If I'm making a survival & crafting game, it's reasonable that there's going to be some sleeping at some point. If the game is following Lovecraft/Weird Tales canon, then dreaming might end up being even more important! So, time to hammer out some beds.
I continue to experiment with adjustable parameters in shaders. First, I make sure it will work in Blender, or whatever I'm using, then I try and get it in my game-engine-of-choice. Here we have a hammock, billowing in the wind, with adjustments for two different overlays (a checker pattern and a cross-hatch) along with hue, saturation, value (which may end up ultimately being lightness, as it makes a little more sense), and sliminess. This is all over a default 1024p square white image, so if I wanted it embroidered with something, I could do that; but rendering with arbitrary images in Blender with key frames is a little finicky.
All of the animation is on a key framed curve it follows; there are no armatures or shape keys on the hammock itself. I've got shifts along positive and negative X, Y, and Z, and rocking along them too; each was placed independently after a curve modifier was applied to the actual mesh. I then added custom properties for bounce, pitch, and roll, with room for others, and set up drivers for each banking to roughly follow the implication of the bounce/pitch/roll properties.
Lastly, I key framed them each at 0.5 and added a customized noise modifier to it. Once I'm dealing with game engine source code, it's likely going to be simplified to an actual wave form, with a controllable amplitude. Additional properties included scales for the checker and cross hatch, hue, saturation, value (as I said), sliminess (something you can cheaply emulate with a clearcoat factor, or go all-out with detail maps), and condition.
Condition was handled with a Musgrave texture (a form of gradient/Perlin noise that's good for terrain generation, but also many other things). I had to preview it with anaglyphics to be sure that it was behaving well with the geometry. I think that as the object is exposed to the elements and other unfavorable conditions, it may make sense to have a condition stat for it, which could be fed to its instanced material parameter.
I did the hammock today and had a good time with it. I did the bed last night, and I think the hammock matt material will work well on the blanket; but the rest of it shows no signs of wear and tear, so it isn't quite finished yet. I guess this is, partially, a WIP.
The thing that made me think of the hammock is that I've already got a system that fits a cable to a spline and maps it to follow the player's hand, initially meant for wiring; but there's no reason I couldn't extend it and have them, say, hanging a hammock up with nearly the same method. It definitely makes more sense early game than trying to build an actual bed...