Summary:
In which a kitchen and toilet are outfitted; decals are a little tricky; a script aligns UVs; and animated models lose tags.
Greetings and salutations!
This week's screenshots, like last week's, show a domestic scene; in this case, kitchen and toilet areas in one of the buildings of level two. As I have three screenshots to show, I intend to scatter them across this post.
The week just past was a fairly busy one, with work done on a number of elements. Most of these were minor, or likely not all that interesting, with a few that I would like to detail:
As (partially) shown in this week's screenshots, I made a few new props for use in level two, such as simple tables, and a kitchen cupboard.
Perhaps more interestingly, I also made some decals for use with them.
One of these is the new animal-sign visible on the cupboard: a spider-like creature, with long, barbed forelimbs.
Along with this, I modelled the creature depicted in the sign; they can be found lying dead beneath cupboards so marked.
The other is a stain used to mark the tables; it's not terribly visible in the screenshots, I'm afraid, beyond being slightly visible in the corner of the first screenshot above. This "stain" uses the same shader as the scratches shown previously near a moveable set of shelves, but darker, and using the same normal-map as the table in order to blend with it.
That last was the tricky bit: how might I align the UVs of an arbitrary decal-mesh with those of the table beneath, such that their normals matched up?
My answer to that was a Blender-script. In short (if I recall correctly): Given a "target" object (in this case a table) with the relevant vertices marked with vertex-colours, the script finds the minimum- and maximum- U- and V- coordinates of the relevant section. Then, for each vertex of the decal-mesh, it finds that vertex's position relative to the "target". From this it then calculates U- and V- coordinates, using the maximum- and minimum values mentioned above.
It's not perfect, but it seems to work well enough, I think!
(If you look closely at the first screenshot, above, you can see that the decal is in fact misaligned. I think that I forgot to re-run the script after resizing the decal! ^^; )
Applying the animal-sign to the kitchen cupboard also incurred some difficulty. In short, Panda3D doesn't handle animated models in quite the same way as it does static models. As a result, I was losing the tags that instructed my game to load and apply the relevant custom shader.
Having discussed the matter on the Panda3D forum, there are, I believe, some workarounds to this issue. However, these, too, come with issues of their own. And it occurred to me that I didn't really intend to keep anything in these kitchen cabinets. (And indeed, the dusty remnants of foodstuffs and yet more dead spider-things seem unlikely to make for interesting exploration.) So I've settled for now on simply having these kitchen cabinets be static.
If this issue with animated models comes up again, then it may be worth revisiting the matter for that new case, starting with the two workarounds that I'm already aware of.
The shader used for animal-signs also saw some tweaks. One of these was simply an update to its lighting: it seems that it hadn't been updated alongside some of the changes to the player-light shaders, resulting in its appearance being visibly different under some circumstances. Perhaps more interesting is that animal-signs should now render a black line-art version of their design at range, making them more visible at a variety of distances.
And alongside the above I made quite a few other changes that don't seem worth detailing here: bug-fixes, tweaks, new textures, and so on. (Although I am quite happy with my new normal-map for metallic objects.)
That then is all for this week--stay well, and thank you for reading! ^_^