Work with Spot and Point Lights

Lighting affects the appearance of all the geometry in a scene, which is why we’ll take a closer look now at the various lighting options we have in Processing. Let’s create a sketch using three colored spotlights, as shown in the figure.

images/Mobile3D/SpotLights.png

We use the basic colors red, green, and blue, because, as the figure shows, when mixed together they create white light in the additive color space.[269] We’ll keep the geometry simple and continue working with our basic sphere shape. But to get a more accurate sphere geometry, we’ll increase the render detail of the sphere using the sphereDetail method.[270] It defines the number ...

Get Rapid Android Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.