[SOLVED] How can you vertex paint terrain

How can you vertex paint a TerrainQuad?(or any spatial for that matter)

I have a use case where i cannot load a particular texture for my terrain, and it would be plain unhelpful. I have a map of colors for all the vertices of the terrain. How would I go about applying them?
If I need the seperate meshes, I can get them using this:

    public static List<Geometry> getMeshes(Node node) {
        List<Mesh> meshes = new ArrayList();
        for (Spatial s : node.getChildren()) {
            if (s instanceof Node) {
                meshes.addAll(getMeshes((Node) s));
            } else if (s instanceof Geometry) {
                meshess.add(((Geometry) s).getMesh());
        return meshes;
1 Like

is there something the documentation doesn’t explain?


1 Like

Thank you, I didn’t check that part of the documentation.

Please don’t mistake my question for arrogance; the wiki is very much community driven, and sometimes things may be missed due to oversight or assumption. It’s always best to ask :slight_smile:

1 Like

I wont, thanks though, it probably would’ve taken me a week or two to find that :blush:

At the top of each wiki page there is a search box that will search the entire wiki for you.

The link provided by jayfella is the very first link to appear when entering the word vertex…