Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiMesh does not change color of instances #10217

Closed
curly-brace opened this issue Aug 10, 2017 · 3 comments
Closed

MultiMesh does not change color of instances #10217

curly-brace opened this issue Aug 10, 2017 · 3 comments

Comments

@curly-brace
Copy link

Operating system or device - Godot version:
windows, e8192d4

Issue description:
i'm using this code

    var mm = MultiMesh.new()
    mm.transform_format = MultiMesh.TRANSFORM_3D
    mm.mesh = test
    mm.color_format = MultiMesh.COLOR_FLOAT
    mm.instance_count = 1
    mm.set_instance_color(0, Color(1,0,0,1))
    var mmi = MultiMeshInstance.new()
    mmi.multimesh = mm
    add_child(mmi)

but it changes nothing at all
actually there was the same issue for 2.1, but it was not confirmed for 2.1
#5565

Link to minimal example project:
https://www.dropbox.com/s/qn6nhhjs60n0m1x/multimesh.zip?dl=0

@kubecz3k
Copy link
Contributor

kubecz3k commented Sep 6, 2017

I'm able to confirm in 6efd777 build

@henkz1
Copy link
Contributor

henkz1 commented Sep 12, 2017

There's no bug. The color is vertex color so you need set vertex color->use as albedo in your SpatialMaterial to see any change.

@kubecz3k
Copy link
Contributor

@henkz1 wow you are right! Thank you very much! 🍺
I was putting some time recently into looking at MultiMesh code because of this issue recently :)
I'm attaching working sample for anyone interested:
multimesh_color.zip

rcorre added a commit to rcorre/godot-docs that referenced this issue Feb 26, 2019
Just calling set_instance_color will do nothing unless you have set
color_format and vertex_color_use_as_albedo. This is really confusing,
and I only discovered my error by finding
godotengine/godot#10217 from another confused
user.

The docs should call out these requirements.
akien-mga pushed a commit that referenced this issue Feb 27, 2019
Just calling set_instance_color will do nothing unless you have set
color_format and vertex_color_use_as_albedo. This is really confusing,
and I only discovered my error by finding #10217 from
another confused user.

The docs should call out these requirements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants