[Bug] Multi-qb models fail to completely render


I’m making horses to put in the game, complete with many appearance variants. However, some of the model elements fail to render when multiple pieces are provided variants.

I currently have a bay horse in the game (as a static tree repalcer, not a moving critter) with a common body and eight pieces that have appearance variants: head, mane, tail, forelock, and all four feet. The whole thing loads without throwing errors, but when I get in… three of the feet are missing from every horse. Only the right back hoof renders.

Problem solving data:

This isn’t a case of individual items disappearing randomly. The same body part(s) is invisible on every horse in a given world generation. Which part disappears seems to be reproducible, but I haven’t tested this extensively.
This isn’t a problem with the hoof qb files. If I delete the instructions to show a right back hoof variant, only the right front hoof shows up. If I delete the instructions for both right feet, a left hoof shows up, and so on.

This isn’t a strict upper limit on how many qb files can be involved in a given model. Thinking it might be, I tried ditching the individual-hoof files in favor of set-of-matching-hooves files, but then things got even weirder: everything but the manes and tails disappeared.

This bug occurs independent of whether the mod is formatted as loose files or as an smod.

The feet are saved as single matrices, unlike the body and tail which are multiple matrices each, but that isn’t what’s triggering this. The head, mane, and forelock are each single-matrix qb files, and they don’t seem to be having the same problem.

Steps to reproduce:

Load the game with my mod, quickstart, observe weirdness.

To test the matching-feet case, rename bay_horse_matching_hooves.json to bay_horse.json. To return to the individually-chosen-feet case, rename bay_horse_independent_hooves.json to bay_horse.json.


My mod.

Versions and Mods:
Version r42; only my mod is loaded.

System Information:

OS: Windows 7 Professional 64-bit
CPU: Intel Core i7-3720QM CPU @ 2.60GHz
Memory: 8 GB
Graphics Card: GeForce GT 650M
Trivia: This computer is physically a MacBook Pro, but I’m dual-booting Windows on it because games.

certainly one of the more visually comical bugs we’ve seen… :smile:

from your description, it would seem as though you have, but just to be sure: have you loaded your mod with only a single variant in place (the tail, one hoof, etc)? and then successively add a new variant after each test?

Yep yep. Although, I’d say with a single variable and multiple variants per test. I have gotten the other feet to show up fine.

Did you rename all the piece of the horse in qubicle?

Uh, what? The matrices do all have names, but since this isn’t an animated model, the names shouldn’t matter. And the names definitely shouldn’t make them phase in and out of existence. Am I missing something?

Maybe but I think you need a file which descrive the position of each part if there are multiple parts on your model (like the skeletons.json for the human).

That would be true if they were animated, but they’re not. It turns out the information about position is in the qb files themselves. I learned this making a tree mod; if the tree model wasn’t centered in the space when I exported it to qb, I’d find it hanging out over open space or half-buried in a hillside in-game. When I centered them before exporting, they stood on solid ground like normal trees.

The same idea is holding up fine with my horse models. All the pieces - when they appear - appear in the right places. And all of them can appear sometimes. They just… don’t show up sometimes.

The skeleton file, incidentally, isn’t describing the location of the pieces, only the location of their pivot points (I am 90% sure on this). It isn’t needed unless you’re actually animating.

1 Like

I can confirm this. The skeleton does not hold information on positions, just locations. Also I can confirm that the position data should be taken from your .qb-files… that’s my understanding, too.

1 Like

I didn’t use the skeleton so I just was thinking that it was used to say the positions of the body’s parts. But for me the bug seems to come from the different parts of the horse. Maybe you should try to animate and add to the game as a critter.

What do you mean by the different parts of the horse?

I’d love to animate them as critters, but one problem at a time, here. If something goes wrong when I try to animate, I won’t know whether this bug caused it or something else. I’m still working on making the art for the animations and stuff, but actually getting them in the game will have to wait.

Okay I understand. And I saw on your mod and find different parts for the horse like the back, the head, etc. Maybe it’s the way you implement the horse as a tree which bug.

I will see what is not working.

@Asterai have you tried to reproduce this by overloading one of the existing critters? Somehow I have the feeling that the engine might handle the environment different than critters, humans, etc. E.g. as we see only tails on one of the screenshots, this might mean that the engine is overwriting all .qb-files you are defining with each other and ends up with displaying the last one which was called. Just a wild guess.

I think too it’s a problem of engine the type:“one_of” doesn’t seem to work with the tree maybe you should try to add the horse as a critter but without animation. I didn’t see errors in your file.

Well, I tried doing multi-variable sheep. Just two variables (front end, back end), and nothing that looked pretty, but it worked and they moved around as expected.

But that was just two qb files per sheep, and the horse has eight variable files and one common file. I’ll do the experiment at some point with the sheep, adding on variations until something breaks.

It’s not last-loaded wins, though, not if Stonehearth is loading them up in the order my json file describes the parts. The very last thing loaded/chosen/whatevs should be the head; mane and tail should be first and second, respectively. This is true in both individual and matching hooves cases. Yet one of the hooves and the head both show up in the individual hoof case (middle listed items disappear); all the hooves and the head disappear in the matching hooves case (all but first listed items disappear).

The problem of your first bug is the naming. Try to give them a unique name. like leftbackfoot.
I think the game read bay_left as a variant of bay_right.

Same for second bug. The problem are the hoofs as well. Give the modelnames inside qubicle a unique word for each hoofmodel without “_” (the f2 name in qubicle). And a unique word for the .qb file itself (like leftbackfoot), and the same naming in the json of course.


@Miturion: That sounds plausible. I will try that tonight, thanks.

@Didis: The oak trees have three variants for each size, and use one_of to choose between the models.