System Information
Operating system: Windows-8.1 64 Bits
Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 4.5.0 NVIDIA 466.47
Blender Version
Broken: 3.0.0 Alpha, branch: master, commit date: 2021-07-22 22:44, hash: fafd21b14c23
Worked: --
Short description of error
There are two issues with geometry created directly inside the nodes. The first could be by design, the second doesn't seem to be.
- Geometry created directly inside the nodes doesn't behave as expected. It's created with the attribute material_index of 0, while it'd more sense for it to be assigned to the first material slot of the object by default (which when it comes to the material_index attribute is 1 for some reason). The lack of a valid default index leads the generated geometry to have no material upon creation, unlike hand-modelled geometry, which is assigned the first material by default. This could be by design, but...
- Assigning a valid material_index to fully procedural geometry doesn't work. It only works when joined to the original geometry, even if the original geometry is nothing at all.
I've attached a test file with the following node tree. All objects have the same material, the ones on the right use the workaround 2 tree while just a material_index fill. The original mesh in top objects row is empty (has no vertices), the second row has a cube.
Exact steps for others to reproduce the error
- Create a primitive in Geometry Nodes.
- Add a material to the object.
- Assign a material_index attribute of 1 to the new geometry.

