Texturing up in a voxel engine

In the end, I found using texture arrays and storing data using an extra textcoords for voxel data - or rather - the array index of sorts in vector.x and whatever else in vector.y - makes life easier. If memory serves, the world location is also stored - as much for noise if anything else. Quite a useful bit of data. And as always, a noise texture for speedy noise lookups and you’re pretty much set up to go.

I don’t know how heavy it is using meshes as a sort of database, but don’t go nuts doing things like that.

Except I didn’t understand your question because the answer is obvious to me and I didn’t see what the confusion was.

vertex = position, texture coordinate, whatever other vertex attribute you have. color, size, etc.
1 to 1 to 1 to 1 to 1

It’s obvious to you, but not to me. And I haven’t read it in all the documentation about textures and custom mesh. Please, next time tell me also the obvious answer: it may be useful anyway

But I didn’t know it was the answer because I didn’t understand the question.

I don’t remember ever reading in any of your posts “how do I know which texture coordinate goes with which position?”

That’s an easy answer. Coordinate 57 goes with position 57. Coordinate 15616 goes with position 15616… and so on.

This is a case where new users may make something way more complicated than it is but then that also confuses asking the question. It’s not your fault but it never occurred to me that:

…had anything to do with “which texture coordinate goes with which position?”. Edit: because you don’t use any vertex positions in the texture buffer… or you use all of them. No matter how that question is interpreted.

But sometimes it helps if you assume the simplest thing first. Because to my mind, what else would it be but one to one? Is there any code example in all of JME where it looks like that it is not one to one?

I’m not implying anything about your intelligence. It’s an easy mistake to make, I suppose… as people do that sort of thing all the time. Never assume there is more magic than there is until you find the magic.