Light play

It’s time we add some visual effects to our 3D sketches.

Before I go into details, let me show you some screenshots which will speak for themselves.

The first screenshot in each pair is with the default lighting that you have always seen. The second screenshot manipulates the light to suite some specific ambience.

Dinner table (Based on fredbob5’s dinner table)

Pirate Ship in twilight (Based on fumanchu64’s Pirate Ship)

Kitchen at night (Based on xkeeperx’s estudio)

Bridge under street-light (Based on StormingJupiter’s Bridge)

Home theater with ambience (Based on fumanchu64’s Surround Sound)

So how to play with light?

Simple. You will see a new icon in left bottom panel (provided your browser supports WebGL)


Hover over that icon and you will see a light panel open.

In any scene there are total 3 kinds of light that are working simultaneously. The light panel lets you manipulate them independantly.

1. Directional light (Sun)


This is the kind of light that has always been there in 3DTin sketches. It represents a light source that is far away from your scene, far enough that the rays coming from it are parallel to each other when they hit your objects. Best example: Sun. Until now this was the only light present in 3DTin sketches and it had a hard coded color and was coming from a fixed direction. Now you can change these two parameters from the light panel displayed above. Click on the color box and you will be presented with the familiar color picker to choose the color of directional light in your scene. The 3 delta coordinates along the principal axes define the direction of light. For instance, dX=0, dY=-1, dZ=0 is the light travelling straight down the Y-axis. As you change these dials, the lighting in the scene will immediately change to give you better idea.

2. Point light (Bulb)


A point light is a source of light that is within finite distance from your objects. Therefore the rays coming out of it are scattered in all directions. Best example: A light bulb on your table. When such light falls on your objects it gives rise to interesting patterns. What you can change with this light is its location in your scene. When you change the dials, you’ll see a hollow cursor in your scene moving around. It indicates the location of the virtual point light source. (Note that, the light source is virtual. It will appear to emanate light, but there won’t be anything at its location. If you want to show as if the light is coming from a lamp, then you will have to draw a lamp object using cubes) Again, you can change the color of this light too. It changes independent of other light sources.

3. Ambient light


In real life there is always some ambient light. It’s the light that travels in no particular direction and appears to come from everywhere. In the night after you turn all the lights off and as your eyes get used to the dark, you can still see some objects in a faint light. That’s the light we are talking about. It results from several directional and point light sources in your vicinity, but it is what has remained of them after several reflections and refractions. Such light is typically very small. In our case it comes with one adjustable value, its color.

By playing with various combinations of these three light sources, you can create compelling scenes out of your 3D sketches. You have already seen some examples above. Click on their links to see them in action.


  1. This feature is WebGL only. When sketches with special lighting are loaded with non-WebGL browser, the default old settings for light are used.
  2. Shadows not implemented (yet). So if you try to put a wall between a point light source and an object, don’t be surprised to see both the object and the wall getting illuminated
  3. Shininess of the surface is not yet customizable. So the kitchen walls will reflect the light in the same way a mirror can. This will be fixed in future.
  4. There are some artifacts due to multiple instances of color picker. I am aware of them and will be fixing them in future.

Apart from this you are all set to bring light to your scenes.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s