3D Lamp Switches On and Off

Details

Introduction Texture Maps Summary

Introduction

This tutorial provides a few details regarding implementation of the Lamp Light Map example.

The lamp rotates and light dims while users swipe. The On or Off buttons instantly switch the light on or off. The Dimmer Switch button returns to interactive control of the light.

Seven Thunder Software modified a prepared model with 3DS Max for this featherweight Web example. The 8 bit indexed texture map includes solid blocks of color. The image was prepared with 3DS Max render to texture, then simplified with Photoshop.

Texture Maps

The image for the light map was generated with Photoshop's lighting effects filter, using Photoshop menus Filter > Render > Lighting Effects > Omni

The amount of light applied from the light map is controlled with a uniform in the fragment shader.

Dimmer Switch Light Map

Light Map for Dimmer Switch

Lamp Texture Map

Texture Map for Lamp

Summary

This tutorial provided a few details regarding implementation of the Lamp Light Map example.

The lamp rotates and light dims while users swipe. The On or Off buttons instantly switch the light on or off. The Dimmer Switch button returns to interactive control of the light.

Seven Thunder Software modified a prepared model with 3DS Max for this featherweight Web example. The 8 bit indexed texture map includes solid blocks of color. The image was prepared with 3DS Max render to texture, then simplified with Photoshop.

See other WebGL lighting examples for the e-book WebGL Lighting. See more free WebGL light techniques.

Copyright © 2015 Seven Thunder Software. All Rights Reserved.