Thursday, September 6, 2007

Tutorial: Neon Tubing with Object Lights


Come up with a setup for doing Neon Tubing -- complete with the proper look of the neon object itself, and it's illumination.


We're all pretty familiar with what neon lights look like -- self-illuminated tubes of glowing color. Different colors and different effects are created with different types of gases and tubing.

A quick look at a google image search for "neon" provides some good examples and gives us an idea of the variety of looks that neon can have.

The colors are bright but generally pretty flat in terms of how they falloff at the edges of the tube, but in some cases you see an interesting gradient that's a lighter color in the center of the tube and a more saturated tone at the edges.

Here's some examples:

photos: Chris Higgins, Pslawinski & Wikipedia


Overall look/feel: We'll go for an urban, neon bar-sign type of look. The environment will be dark to show off the neon.

Surface: Not much detail except for the example on the far right which definitely has a glass look to it. We'll do a couple examples without the glass look (just straight bright objects), and then we'll do one with the neon-in-glass.

Camera: Nothing fancy about the camera. Standard lens, night shot.

Initial thoughts/plans: I'll just use a simple self illuminated renderable spline of a SplutterFish logo against a brick wall. For the lighting I may or may not use a dim key-light, but I will definitely use ambient occlusion (skylight) to get a nighttime look, and we will be using GI to allow the renderable spline to generate illumination. For the basic neon tubing a Utility material will probably be perfect, giving me simple colors and control of the illumination. As we try different looks, we will be using our trusty Falloff map for the coloring and we'll end up using Brazil 2 glass to construct a neon-in-glass look.


As usual, the following is a step-by-step of what I came up with to achieve this. Do a quick render test between steps to see how things are progressing. Also, go "off-script" and do some experimentation of your own -- try different settings and different materials and see what kind of results you get. The files for this tutorial can be downloaded here (3ds Max 5).

  1. Setup
    1. File|Open... field-guide_neon_start.max
    2. Open the render dialog - assign Brazil 2 -- turn off the material editor lock, and turn off the "Rendered Frame Window" near the bottom of the Common Parameters Rollout.
    3. Render/test to see what we're starting with:

  2. Adjust the Render Settings for the Look we want to use
    1. In the render dialog, Renderer Tab, Luma Server rollout, turn on skylight
    2. Turn on GI
    3. Set GI bounces to 2
    4. Render -- too bright, so...
    5. Select and modify the omni Light: set it's multiplier to .25
    6. In the Luma Server, adjust the skylight for a nighttime look [38 38 58]
    7. In the Sampling Settings rollout, turn up the anti-aliasing sampler to 1 by 2
    8. Render -- a bit slow, so lets...
    9. Turn on the rendercache and render again -- much faster, but now it's antialiased.
  3. Build the first "Neon" material: a flat shape, cyan color
    1. In the Material Editor, replace the "neon fish" standard material with a Brazil2 Utility Material
    2. Set the Utility Material color to neon-cyan [95 250 255]
    3. render. looks good, but not casting enough light, so...
    4. In the Utility Material's Global Illumination rollout, adjust the GI send level to 2
      there's our first neon -- would work well at a distance and renders pretty quickly
  4. Build the second "Neon" material: dark orange with a lighter orange central glow
    1. Add a falloff map to the Brazil 2 Utility Material's color slot
    2. In the Falloff map, change the front color to light orange [255 148 5]
    3. Change the side color to a darker orange [252 74 46]
    4. Adjust the falloff curve to accentuate the brightness in the center
    5. Render. I feel the light being cast by the neon should be brighter, so...
    6. Adjust the Brazil 2 Utility Material's GI send value up to 2.5
    7. render.
      That's a pretty nice looking neon that will work in a lot of different situations without needing a lot of adjustment. By simply changing the two colors in the falloff map, you can create a wide variety of believable neon colors. For example, a color called, "raspberry" is very eye catching and popular -- to create that, just change the falloff colors to pastel-magenta and powder-blue ([255 148 232], [148 148 232])
  5. Build the third "Neon" material: Neon-in-glass -- orange glow inside refractive glass
    1. Put the orange neon Brazil 2 Utility Material into a Blend Material (keep the old as sub...)
    2. Replace the Standard Material in the Blend's "Material 2" slot with a Brazil 2 Glass Material
    3. Put a falloff in the Blend's "Mask Amount"
    4. Edit the falloff curve so that the glow only happens in the center of the sample sphere, but you get a lot of orange spill into the mix with the glass
    5. render. looks good, but the neon looks like it's too dim, so....
    6. Go back up and edit the original Brazil 2 Utility Material in the Blend's "Material 1" slot -- adjust the color map amount to be 200 (we want to blow out the intensity of the glow on this one)
    7. render. Not bad, but I like the warm red glow that we're seeing the the reference photo, so to create that...
    8. Edit the GI send filter color to make give it a red cast [255 33 0]
    9. render.
      This is a really nice looking neon that works very close up and has many of the characteristics we're looking for from the reference photo (reflections, refractions, and a red shift to the illumination it creates).
5:30 screencap video. This follows the steps described above but has no audio. It is also scaled down quite a bit, but I think the main ideas come across.


In this case, my biggest complaint is probably with the geometry. The object itself doesn't sell well as "being neon," because neon is typically not bent in only two dimensions. Look at real neon and how the glass artist has to bend the tubes into the third dimension in order to give the illusion of sharp corners. If you find yourself needing to do photoreal neon, it might be a good idea to actually talk to a neon/glass artist to learn how they'd approach the problem.

Another problem with the geometry is that the extrusion of the object folds in on itself which creates some artifacts in the neon-in-glass example.

Also, the trick I used to do the neon-in-glass actually paints the glowing gas onto the surface of the tube, and relies on the fact that we generally look at the sides of the neon tubes, not down their lengths. The glow in this example doesn't actually exist in the center of the volume of the glass. Some may be compelled to go for a glowing volumetric inside of constructed hollow glass tube, but i think the processing costs and the amount of man-hours spent actually constructing and setting up the scene that way wouldn't be worth the benefits except in very specific cases.

The approach used here is just one of many ideas, but I like the flexibility and control that the b2 utility mtl gives.


Again, this is just one approach. There are different techniques for achieving the same goals, and some maybe better than what I've shown here. Try rendering this with and without the rendercache to get an idea of how much the cache is helping with the R&D process. Try to achieve similar effects using different materials and other advanced rendering features.

As stated before, "There are no rules for this stuff, so experiment, have fun, and keep the goals in mind."

Share what you come up with and we'd be glad to add your techniques to this example.