Hi Egon,
I have normalized the height values (correctly? snippet below) to values between 0 - 1. How do I set the texture using these values? I understand the u/v as texture coords but how do I assign values from the single texture?
for (Object3D obj : models) {
PolygonManager objPolyManager = obj.getPolygonManager();
Logger.log("Max poly ID " + obj.getName() + ": " + objPolyManager.getMaxPolygonID());
// for each polygon set texture according to vertex elevation
for (int i = 0; i < objPolyManager.getMaxPolygonID(); i++) {
Logger.log("Poly num: " + i);
for (int j = 0; j < 3; j++) {
SimpleVector height = objPolyManager.getTransformedVertex(i, j);
float tempMin = (float) 2.7523;
float tempMax = (float) 555.413025;
float normHeight = (height.z - tempMin)/(tempMax - tempMin);
Logger.log("Normalised vertex height #: " + j + " - " + normHeight);
}
Thank you for your help with this task. I will endeavour to repay you some way, some day...