godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.04k stars 21.18k forks source link

MultiMeshInstance2D is missing a useable populate feature similar to MultiMeshInstance3D #85326

Closed thisthrowaway closed 11 months ago

thisthrowaway commented 11 months ago

Godot version

4.1.3.stable

System information

Godot v4.1.3.stable - Windows 10.0.19045 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 1080 Ti (NVIDIA; 31.0.15.3742) - AMD Ryzen 7 5800X 8-Core Processor (16 Threads)

Issue description

MultiMeshInstance2D's is missing its "populate" feature which works similar to it's 3D counterpart. Adding any number of instances adds random PackedFloat32Array data to the buffer property. Although I reckon I can write code to manipulate the buffer to get the desired outcome, I don't think this is an intended way to use this node as populate exists in 3D. Also it hampers the user's ability to test things out in the editor as changing the instances randomizes the buffer.

Godot Bug Report

Steps to reproduce

  1. Add a MultiMeshInstance2D in the scene, set texture to godot icon and mesh to QuadMesh.
  2. Add n number of instances

Minimal reproduction project

N/A

kleonc commented 11 months ago

Adding any number of instances adds random PackedFloat32Array data to the buffer property. (...) Also it hampers the user's ability to test things out in the editor as changing the instances randomizes the buffer.

That's a bug, already reported/tracked in #75485.

MultiMeshInstance2D's is missing its "populate" feature which works similar to it's 3D counterpart. Although I reckon I can write code to manipulate the buffer to get the desired outcome, I don't think this is an intended way to use this node as populate exists in 3D.

I think that's a material for a proposal, not for a bug report. See https://github.com/godotengine/godot-proposals#godot-improvement-proposals for more info. Also you'd need to provide more details as it's not clear/obvious what options such 2D populate tool would need, how exactly it should work, etc.

thisthrowaway commented 11 months ago

Also you'd need to provide more details as it's not clear/obvious what options such 2D populate tool would need, how exactly it should work, etc.

Hey! There already exists a populate feature within Godot's MultiMeshInstance3D! If you change any of the buffer values on MultiMeshInstance2D you can see that it corresponds to a Transform2D, serialized as a PackedFloat32Array, so clearly there is functionality already there, it's missing the connectors/a tab maybe for 2D.

Here is the tab/button that activates the feature in 3D populateMultiMeshInstance3D

The options of the populate and how it works in 3D populate in action - MultiMeshInstance3D

Would it still be a proposal if this already exists for 3D?

Calinou commented 11 months ago

Would it still be a proposal if this already exists for 3D?

Yes, as the feature needs to be designed differently. It should hopefully be done in a fasion that makes it more generally useful, as the MultiMeshInstance3D populate dialog lacks flexibility and is mostly meant for experimentation as a result.