Closed oiblank closed 6 years ago
Doesn't sound like a bug, to use the color param, you need to set it to one of the values indicating how you'll use it:
i.e if done from code:
multimesh.color_format = MultiMesh.COLOR_FLOAT
EDIT: oh wait, missed the part saying you tried that EDIT2: downloaded project, changed the color format manually, no errors, everything looks the same
Yeah, but if you actually refresh the multimesh node after setting the color (change the number of instances) the color mode gets applied and they move to a different formation, and if you don't refresh it and save the scene, saving outputs the same errors for each individual instance. e.g.
edit: Also tried the same thing without using the blender mesh but rather creating a custom plane and a custom quadmesh, still the same result.
what do you mean by refresh?
if you are creating a new instance, it will always default to the Color Format being none, to counter this you can add the script code I posted in the last post to the _ready()
function
If you change the color format via editor it doesn't update straight away (see picture attached before) and at saving still produces the same error of no color, but if you change any other property of the multimesh node e.g. instance count, it updates the properties and changes the color format thus changing the location of instances based on the color format.
Attaching the script to the multimeshinstance node doesn't seem to actually change the color format when inspected through remote inspector at runtime and still outputs the same errors for me.
It's not a convenient thing to get around, but it doesn't sound like an engine issue.
What I would do is create a function, which would change the number of instances and set the color format when doing it, then you can do it at runtime. If you need help with it in more detail, I'm Rokas#0521 on Discord.
Found a thing that worked for me, that is: After populating a target mesh, set the color mode to float, save the scene (produces the no color error), close the scene completely, and open it again, now the color mode is actually float, no error and the locations didn't get messed up. All works fine until I fiddle with the multimesh again, so basically I have to reload the scene everytime after setting up a multimeshinstance.
This seems to be the same issue as #17850, closing as duplicate. I'll add the reproducer project there as additional debug material.
Godot version: 3.0.3
OS/device including version: Windows 10 Nvidia GTX750Ti
Issue description: I used blender to create a plane mesh with set texture to achieve a "billboard sprite" which would work with multimeshinstance (billboard mode on a plane mesh doesn't actually work as it doesn't rotate the mesh only the applied texture but that's for another issue i suppose), and used multimeshinstance to populate a meshinstance terrain, I created multimeshinstance by following the documentation, set the target and source mesh as described, and when running the scene I get a flood of infinite errors:
I also tested it without the billboard material and the error persists.
Also tried selecting a Color Format (either float or byte) which while not giving out any errors makes all my instanced meshes disappear completely.
Steps to reproduce: Already covered that and attached a stripped down project file recreating it.
Minimal reproduction project:
MultiMeshInstance_Error.zip