How to make grid with a texture

I need to make a hexagonal grid, can somebody show me how can I stamp a texture of a hexagon on the floor? Or is there a better way to do this? Because I want to generate grids that have a lot of hexagons.

Well, hexagons have the advantage of tiling, so you could perhaps build your grid out of hexagonal meshes, each textured as appropriate, and then use “flattenStrong” to merge them together (for speed of passing to the graphics card).

[edit] Of course, if you have only one hexagonal image to tile, then it may be even easier: just make a repeating texture and apply it to your surface, possibly with an appropriate scale and/or offset applied.

I will need to remove some tiles, change their color etc. so I cant just use repeating texture. I think, I need to combine the texture but in the manual there are no examples and even then I think it changes the color of the texture everytime (makes its lighter/darker) so that would be also problem I guess.

Then I’d suggest going with a modified version of my first suggestion: instead of flattening them together, perhaps use the RigidBodyCombiner, or perhaps MeshDrawer.

(And perhaps group them into “clusters”, allowing you to limit the number of hexagons that are affected by any one change.)

I’m not sure of what you mean by this. If you just want to tint various tiles, with the same underlying texture, then my suggestion above should work, I think. After all, you would be tinting the geometry, not the texture.

And how do I change the texture on a tile after flatten?

Seems I would have to figure out how to change the uv coordinates on the vertices.
I tested the RigidBodyCombiner and it costs a little bit too much but still improvement.

That’s why I suggested either the Rigid Body Combiner or MeshDrawer: they allow you to keep your data separate, and rebuild as called for.

Fair enough! MeshDrawer may yet work, however.

That’s another option–you could employ custom geometry, which would allow you to modify things like UV-coordinates within the parts of a single mesh. This is a relatively-complex approach, but it’s powerful, I believe.

If you search the forum you should find various posts by Epihaius that might illustrate in general how you could go about this.