mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.5K
active users

I'm working on a tool that attempts to tweak the parameters of my creature parametrization to match the look of a reference 3D model. It does this solely by looking at the silhouettes and executing the parameter changes which make the silhouettes match more closely. 🧵

It's not very fast, the above video is playing at 20x speed. There's 106 parameters that need to be tested in both positive and negative direction each iteration before the algorithm chooses which changes to actually keep. (It's Gradient Descent in 106-dimensional space).

The gradient descent is based on a penalty function which looks at the pixels around the reference silhouette outline and checks how far away the outline is in the corresponding silhouettes of the parametric model. It adds all the distances together, and that's the penalty. That's why the legs is the first thing to glow here. This reduces the most distances at once, and after that the neck length provides the most bang for the buck.

Currently the algorithm doesn't produce as nice results as I can do by tweaking parameters manually, but I hope I can get it close with some further algorithm tweaks. Tweaking parameters manually to try to match a given reference model is quite slow and tedious, which is why I'm attempting to automate it.

Why do I need to match reference 3D models in the first place? In order to have more data about what combinations of parameter values are realistic, so I can make better informed decisions about how to further refine the parametric model and make it more high level without accidentally restricting it too much.

A bunch of tweaks later, and the creature converges way faster and to a better result. The ears look funny but I think it's because they are pulling double duty as both ears and horns, since the parametrization can't create horns currently. Would probably be fixed if I could hide the horns on the reference model.

Rune Skovbo Johansen

I also tried implementing the 'Adam' optimization algorithm based on this guide (machinelearningmastery.com/ada) but, uhh, the results are not so good. Maybe I'm doing it wrong.