Summary:
In which rubble proves troublesome, but is (I think) improved; but not much else is done.
Greetings and salutations!
For this week's screenshot, a revised version of the rubble from last week:
The week just past was dominated almost entirely by that rubble (not helped, perhaps, by some lack of sleep):
As I think that I mentioned last week, I wan't entirely happy with the rubble model that I had then. In particular, I think that the pieces of which it was composed were rather too large.
So, in the week just past, I deleted that model and began work on a new one.
But how to approach this? In the original model, the pieces had been placed, rotated, and scaled by hand. But using smaller pieces would result in their total count being rather larger, making for a very slow and tiresome business.
I experimented with a few different options, often a few times over with varying details. Offhand, I recall two:
- Placing a grid of "boxes" which might then be randomly -scaled and -offset, then hand-edited.
- And using Blender's particle effects to randomly scatter pieces (and in some experiments, using Blender's physics system to then resolve their positions and orientations without significant intersection).
I think that I may have tried other approaches, too, but I don't remember offhand what those were.
But none of these produced satisfactory results, I felt.
And in the end, I returned to hand-placement. However, I did make it slightly easier on myself: While I started out performing placement, rotation, and scaling by hand, I soon wrote a short script to randomise a given piece's rotation and scaling. This I eventually improved upon, such that in the end, running it would duplicate one of a set of rubble pieces, apply a random rotation and scale to the duplicate, and then select it, ready to be hand-placed.
It was still slow and tiresome, but the use of that script made it far less so than it might have been, I imagine!
With the visual rubble placed, I turned to its collision mesh. This presented its own problem: I wanted the mesh to broadly match the form of the rubble, but not every nook and cranny.
One attempt at this involved creating a grid, then manually adjusting its vertices to match the rubble. This was not an ideal approach--and I realised that there was a way to make life a little easier:
Blender has a rather neat "shrink-wrap" modifier, which allows one to have the vertices of a mesh conform to the surface of another mesh--just what I wanted! It wasn't perfect, but it provided a starting point, and made manual adjustment a little easier (as the vertices conformed to the underlying surface even when edited).
I did have one rather unpleasant stumble during this: at some point, I managed to accidentally sub-divide the entire collision mesh--and in a way that produced issues in some places. Unfortunately, this went unnoticed for some time--long enough that the operation had fallen off of the bottom of the "undo history".
For a while I wasn't sure of what to do--but thankfully I discovered an automatic backup file that had been made before the incident. It resulted in my re-doing some work that had also been performed after the save, as I recall--but less so, I daresay, than might have been the case!
As things stand, there are some points on which I'm still not quite happy: For two, there are some discontinuities in the rubble's texturing, and I feel that the collision mesh hews a little too closely to the underlying surface, making for an unpleasant walk.
Still, I think that it's likely better than the rubble that I had last week!
A few other minor changes were made (including a little bit of writing), but nothing that seems worth reporting here.
That then is all for this week--stay well, and thank you for reading! ^_^