Using Bump Map

Bump Map uses colors in the image to imitate small displacement on the surface of a 3D object. It's a great way to add small texture details to 3D objects. It saves you the great effort of describing them in 3D terminology.

For example, take a look at the next bump map image and the 3D object affected by it:

 

To achieve that, you need to call material.setBumpMap(Image bumpImage):

PhongMaterial material= new PhongMaterial();
material.setBumpMap(new Image(
"https://upload.wikimedia.org/wikipedia/commons/8/86/IntP_Brick_NormalMap.png"));

Box box = new Box(100, 100, 100);
box.setTranslateX(250);
box.setTranslateY(100);
box.setTranslateZ(400);
box.setRotate(50);
box.setRotationAxis(new Point3D(100, 100, 0));
box.setMaterial(material);
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.134.198