Hello, I’m trying to use vertex color within a nodes material to dictate which areas of the map receive which texture. I want the ability to “spray” the desired grass over the rock for cliffs and such.
This is an entry level procedure in Internal, or Cycles, but for a reason I don’t understand, I can’t achieve it in BGE. In the viewer, the cliff looks fine, but when I run the game, only one or two areas have the desired grass texture, and the rest is rock, as if the vertex map’s contrast spiked.
I’ve included a blend if anyone want’s to take a look.cliffA.blend (852.4 KB)
Definitively an option, and I very much appreciate the blend link, but I do apologize as I should have mentioned earlier that I’d not looking for a stencil image, as it’s not efficient for large environments. If there’s no practical way to use vertex color, then I’ll definitively use this, but vertex colors just seem so much more efficient at the moment.
Oh, I apologize. XD
You very clearly said that, and I completely missed it.
A very simple solution, and one quite appreciated. Thank you for your time!
So, the solution was not as simple as I thought. I’ve tried working on this and I still can’t get it to render the image when I use vertex color. Even in your original file, when you run the game using vertex color as your input only one texture shows up. This is the same problem I started with.
Thank you again for taking the time to look into this.
I double checked to make sure all materials are disables in the material texture tab.
For debugging, I’m using the exact file you sent me, just hooking up the first geometry node’s vertex color output into the first color node of the node called “texturesplatting”.
It actually occurred to me this might be a hardware issue. BGE is known to be a little buggy in that way. To test, I’ve included the updated blend. simple_texture_splatting B.blend (2.2 MB)
On my PC without editing anything in the above blend, it looks like this in the viewer…
and looks glitched like this when you run the game.
If you chose to download the above blend and it works for you, (looks like pic A when you run the game) then It’s just a hardware issue on my end.
Not much else I can think of at this point… Unless I hooked up the nodes wrong, which is entirely likely.
Hmm… Might be blender version, or might be hardware. My last computer couldn’t run GLSL and it took me a long time to figure out it was a hardware issue. :\