from random import randint
# This is for GRASS like Ground (all Green random tones)
vert.color = (float(randint(0, 255)), float(randint(0, 128)), 255.0, 1.0)
# This is for SEA or UNDERWATER like Ground (all Blue random tones)
vert.color = (255.0, float(randint(0, 255)), float(randint(0, 128)), 1.0)
# This is for LAVA like ground (all Red random tones)
#vert.color = (float(randint(0, 250)), 0.0, 255.0, 1.0)
Add these lines on line 36 of the Python Script “testing.py”, comment the line " #vert.color = m[y][1] ",
add at the beggining of the file at the top " from random import randint ",
des / comment in or out to get one of the 3 group of colors, use just 1 of these each case,
it generates a randomly texture on the floor, so it looks like Grass, Sea, or Lava.
I wonder why he implement rand() function?
Result:
if x < own['verts'] and y < own['verts']:
vert.XYZ = [pos[0],pos[1],m[x][y][0]]
# This is for GRASS like Ground
vert.color = (float(randint(0, 255)), float(randint(0, 128)), 255.0, 1.0)
# This is for SEA or UNDERWATER like Ground
#vert.color = (255.0, float(randint(0, 255)), float(randint(0, 128)), 1.0)
# This is for LAVA like ground
#vert.color = (float(randint(0, 250)), 0.0, 255.0, 1.0)
#vert.color = m[x][y][1]