use of org.fxyz.utils.NormalMap in project FXyzLib by Birdasaur.
the class TriangleMeshHelper method getMaterialWithColor.
public Material getMaterialWithColor(Color color, String image) {
PhongMaterial mat = new PhongMaterial(color);
if (image != null && !image.isEmpty()) {
Image img = new Image(image);
mat.setDiffuseMap(img);
NormalMap normal = new NormalMap(img);
// normal.setIntensity(10);
// normal.setIntensityScale(2);
mat.setBumpMap(normal);
}
mat.setSpecularPower(32);
mat.setSpecularColor(Color.WHITE);
return mat;
}
Aggregations