Geoff Bunza geoffb

Model animation—bringing models to life—adds enormously to the interest and enjoyment of any layout or individual model! We notice things when they move, and we often notice things only when they change. But change can also be sensed in light intensity, patterns, color, and sound. Let’s see what can bring an otherwise static building to life.

llage800.JPG 

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
Geoff Bunza geoffb

Scale Model Animation 5 – Building Building Animation

Building Animated Characteristics—A Matter of Timing

What makes one think that there is life in a building (or structure if you want)? Movement is always the most obvious thing to me. But movement within a building may be too small for all but foreground buildings that can be closely scrutinized. There is, after all, limited visibility inside a building, particularly older buildings that likely have smaller windows. Movement at the window could include movement of the window itself, shades, shadows, silhouettes, or figures at or near the window. Roof vents, some large fans, and door movement would also apply.

But for any building near or far, lighting changes really can stand out. Lighting a building is easy enough… or is it?

The effect of a single light to illuminate an entire building renders it toy-like to me. The light usually appears to be a point source for multiple rooms, if not multiple floors. The illumination falls off in an unrealistic way. So, we can shift to multiple light sources -- lamps and/or LED (Light Emitting Diodes). Multiple lamps in an enclosed volume, especially a sealed volume, generate heat that can deform plastic and age wood and paint. Thus, for building illumination of all sorts, LEDs are the light source of choice. They also can generate more light per milliampere of current. LED color can be a problem, but white LEDs and liberal use of Tamiya Clear acrylic paint can yield most any color you might want.

But just lighting up windows isn’t good enough. Observation of real buildings shows light turn on and off over time as the day moves on. So turning lights on and off is the key—realistically, of course. When I first started switching lights for effects, it was with a rotating drum and a set of contacts for each light, something like a player piano roll. But the sequence was short and eminently predictable. Later, I learned to use a “shift register” which is an integrated circuit which simply shifts bits in one direction. A simple variation is next:

0Shifter.jpg 

You can use the QA, QB,- -,QH outputs  to drive the cathode (minus (--) side) of a LED in series with a resistor. The 74LS30N  is used to insure that there is only one light on (“Qx” bit Low). By leaving some other LEDs always on, you can use this circuit to turn others on and off. The sequence, however, is entirely predictable, and that always bothers me. The next circuit below uses exclusive OR’s in the shifter return (feedback) path to “scramble” the sequence. It is still predictable but adds “disorder” to the sequence, disguising it somewhat. The circuit is incomplete, meant only for illustration.

enerator.jpg 

If you use the following outputs (from the 74LS164 to the 74LS86 Exclusive OR) for feedback you will get sequences that will not repeat for 255 cycles:

[QH, QG, QF, QA]

[QH, QG, QE, QC]

[QH, QG, QC, QB]

[QH, QF, QE, QD]

[QH, QF, QE, QC]

[QH, QF, QE, QB]

Long sequences that do not repeat up to their maximum length are sometimes used as “pseudo-random number generators.” These are better for non-obvious lighting sequencers but, even if slowed down, they can generate sequences for building lights that look more like Christmas tree lights, than a scale model building animation. Why? Typically, people don’t really randomly turn lights on and off. Once we might enter a room and turn a light on, the light tends to stay on for a while—it has a distinctive “dwell time.” Shift registers like the ones above, and mechanical timers have difficulty simulating the equivalent effects. Generally, I enjoy the lights better if they stay on for about 70% of the time. They still cycle on and off, but they are mostly on. Lighting changes are also time-of-day-based. One would expect to see flurries of activity in early morning, at dusk, and perhaps 10 PM to midnight, depending on the nature and characteristics of the building.

Building Animated Characteristics—More Timing Issues

Now you might say that room lights simply turn on, and turn off some time later—well… yes, sort of! Incandescent room lights would follow this pattern, but there are other kinds of light in a room. Candlelight, for one, flickers quite slowly, if at all. So would the light from a fireplace. They are likely dimmer lights too, and lower to the floor. Fluorescent lights are typically overhead, and are usually quite bright. But older fluorescent lights come on with a quick flicker before they steady up; they also turn off instantly. Television sets can sometimes be the primary lighting in a room and also flicker over time, but in bursts, unlike a candle. Decorative lights and special function lighting might exhibit other effects. Mechanical devices, like the interference of a fan blade with a point source of light can create special effects. Figures placed between a light source and a window can create silhouettes. Working machinery and tools can create sparks, flashes, etc. within a building. The changes that all the effects achieve can add life to an otherwise static building.

Building Animated Characteristics—A Matter of Color

Change can also occur based in part or in whole by color. A television can obviously fill a room with an array of colors, and changing colors could indicate a TV’s presence. An old black and white TV usually cast a blue tint to a room, and would be appropriate for a late 1950’s-1960’s setting. Fluorescent lights very often have a blue tint, especially with industrial lighting. Gas lamps when turned down created a light with more red and orange, than a brighter white/yellow when fully turned on. Sparks from machinery could be yellow, blue, white, etc. and welders often generated a bright white light with flickers of blue. Like allot of other modeling details, it takes some practice looking for the details that we often just take for granted in the world around us. I constantly pick up more examples and more variations too. Here are some variations, simulating incandescent, fluorescent, and party ceiling lights.

windows1.jpg 

windows2.jpg 

Here’s the welder close-up and a real building example:

der-Bldg.jpg 

Building Animated Characteristics—Sound Concerns

Where there is life, one usually notices sound of some sort. When I look to build any animated scene, I always consider sound in two ways: background sound, and point sounds. Since I am explaining how I approach this, let me also explain that there are other points of view, and they may even achieve more, but this is how I do it. I think about background sounds as the sound of the unseen and indirectly seen. That is, if there is some action creating the sound, it is hidden in the scene. This would include sounds of the wind, rain, crickets, birds chirping, dogs barking, some machinery, voices, etc. I often think of these sounds as setting the mood or creating the ambiance of the scene. These sounds are typically not loud, and for modeling may be barely noticeable. In fact, many argue exactly that. I have noticed that I enjoy these sounds much more if they are generated with great fidelity- the better the quality of reproduction the better I enjoy it.

What I call point sounds are those which can be easily and clearly identified by an animated (read moving/changing) source. While I really crave higher quality sound for the background, I tolerate noticeably poorer sound for point sources. Why? I’m actually not sure, but it likely has to do with control, duration, and cost. Point sounds need to be cued in synch with movement and change. This can be done within programmable DCC decoders, like the Digitrax SDN144PS that I have used in other animations (like

and
). In the building animation, I am starting to experiment with a new (for me) sound module, the WTV020-SD-16P. A Google search will yield multiple sources, many in China. It comes in a version that is computer (Arduino) controlled, uses 1GB micro SD memory cards, and handles up to five hundred, 16-bit 32KHz sampled, mono sound files on a memory card, and play them back in any order.

Many aspects of building life into buildings require the simple, but programmable control I use. Everything including a desktop, laptop, Arduino microcontroller, PIC microcontroller, and TI Launchpad microcontroller could be used. Use whatever is comfortable, available, and affordable. All can be made to work. A $6 Arduino Pro Mini together with a $5 WTV020-SD-16P is a good combination for me, and is quite small. You can see the early results below of a building I put together as a teaching aid for a clinic I’ll be giving on animation control at the National Narrow Gauge Convention in August in Pasadena.  You could try to see if you can notice any repeating patterns… but you won’t be able to find them. The sequences don’t exactly repeat at the rate currently set, for something like 14 hours or so, and the video isn’t nearly that long! There are four sets of six audio tracks: two voices, one party track, and one background track. In theory, that would generate 6 X 6 X 6 X 6 (1296) combinations before repeating! Next time I’ll get more into the construction details. See if you can spot some of the Building’s features in the video, built specifically for animation. Remember, this is another “project in progress!”  All the sounds you hear are generated by the animation, and not edited or dubbed for the video.

I hope you enjoy any surprises you may find along the way—remember model railroading is FUN! and so is scale model animation!  More to come…

Have fun! 
Best regards,
Geoff Bunza

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
Dave K skiloff

Great Stuff Again!

Love it.  Can't wait to see more.

Dave
Playing around in HO and N scale since 1976

Reply 0
jay_cunnington

Simulating TV

Out walking at night, the thing I notice through curtains or blinds is you can tell who has the TV on and the lights off. The light coming out is bluish, and it frequently changes intensity. My neighbor next door was a great one for this. His TV room was opposite my son's bedroom, and before I got the garett finished off, my bedroom. I'd frequently see the TV on until the small hours. Even with curtains drawn, it was easy to see the change in light intensity as the scenes shifted randomly every few seconds.

Reply 0
Geoff Bunza geoffb

Simulating TV

You bet Jay!  --More signs of life! (as it is!)

I would really enjoy hearing from others, what observable things could be animated in the (building) context. That is, what do you observe when you look at a building that tells you something is going on? And yes, I build such lists for possible future projects-- it adds to the fun of it all.

Best regards,

Geoff

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
Prof_Klyzlr

Signs-of-life = Rave Party?

Dear Geoff,

It's not a TV, but does a smoke gen, scale moving lights, and a dance-party laser-show count?

Looking great, and sounding even better...

Happy Modelling,
Aim to Improve,
Prof Klyzlr

PS remember that for decades now, some european model structures were offered with a central lightsource and rotating gobos which simulated people walking about, and even dancing within the structure...

Reply 0
Geoff Bunza geoffb

Rotating Gobos?

John,

What are Rotating Gobos?

Geoff

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
coxy

Great post! Very good

Great post! Very good microcontroller application.

Here's a timelapse clip of building lights.

 

[Not seeing this clip on preview so here is the link as well 

A few things stand out. One is that many lights just stay off, the other is as you mentioned, when lights come on, they typically stay on for a while.

Lots of lighting effects are possible. You could even have something funky like this up your sleeve...

 

 

Cheers,

Steven

Reply 0
Geoff Bunza geoffb

Building Videos

Thanks Steven!

I didn't find the videos before. Now I will search for more. More views and animation ideas are always welcome!

Best Regards,

Geoff

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
Bernd

Animation

Hi Geoff,

At swap meets I've seen a portable layout were somebody built a drive-in-movie theater. They used back projection to project the movie on a scale size screen. I don't know what they used to do that. That would fit in nice with a 50's or 60's theme layout.

Bernd

New York, Vermont & Northern Rwy. - Route of the Black Diamonds - NCSWIC

Reply 0
Geoff Bunza geoffb

More Animation

Hi Bernd,

The first such screens I saw for the very same "drive-in theater" application used Sony miniature TVs as video monitors! Now, you can get 1.5" to 4" color LCD displays that can display a picture slide show or even limited video driven by an Arduino microcontroller. I can attest to this as I have tried them, and there are libraries available to help the experimenter. I have also experimented with obsolete TOM-TOM GPS units to do the same.  Why? Because these tiny displays have a processor running the Linux operating system which can be reprogrammed as well. I bought two different versions locally for $10 and $20 each.

Now for the problem: I wasn't looking to use them for a Driver-in screen, but rather as the "moving interior" for a store in a building (more Building Building Animation !!). My giant problem was finding video that would "scale" correctly and have the same (and constant) viewing perspective for this to succeed. I think I can come close to this for a "slide show" that would show the same basic scene changing over time, but video would really be a hoot! Nonetheless, it is the video/slide material itself that is holding me back right now.

If you notice, the left-most rooms on the ground floor of the building in the animation are empty. This is where this video animation was targeted.

Suggestions are always welcome!

Best Regards,

Geoff Bunza

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
bear creek

Challenges

But can you do a working disco mirror ball?

How about a simulated nerf-war?

I remember a lot of strange stuff at Eagle Technology, but I don't think we were ever blasting Cream's "Glad".

Charlie

Superintendent of nearly everything  ayco_hdr.jpg 

Reply 0
Geoff Bunza geoffb

Challenge Taken

That's funny that you should bring up the disco ball-- I did look into that! You can build it with a faceted polished bead, a small gear motor (like those I used for the spindle drives in the crane article in the August 2012 MRH), and a focused LED (the larger kind that concentrate their light in a spot. There are also low power, visible laser leds that would work too-- but they are unnecssary.

There are six music selections, randomly played. I keep waiting for the ones I prefer the most but have no control of the order sequencing (by design)!

Glad you enjoyed the video.

Best Regards,

Geoff

 

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
Prof_Klyzlr

Mirror balls are soo old-school...

Dear Charlie,

No, no mirror ball, but I have HO scale laser lightshow + smoke/fog generators...

http://www.carendt.com/scrapbook/page87/

(scroll down to "Animated Lighting" section, 7/8ths of the way down)

Happy Modelling,
Aim to Improve,
Prof Klyzlr

Reply 0
Prof_Klyzlr

Mirror ball : refined

Dear Geoff,

You're on-the-ball as always

Here's some possible shortcuts:
- use a readily-available headlight "jewel" as the bounce/refractor (cheap, simple)
- use heatshrink to form "barndoors" or a "projector hood" on a superbright cool-white 3mm LED to get the "pin-spot" lightsource you need for nicely-formed "mirrorball beams"

Very do-able, esp if the scene calls for a wedding dance or period "social"/"danceparty"...

Happy Modelling,
Aim to Improve,
Prof Klyzlr

Reply 0
ed.radz

hotel animation arduino code

Hi Geoff

I'm having an issue with the code for the hotel. I copied it as was shown in the Nov 2014 issue of MRH. I did a compile before uploading to the mini & returned this error.

16 byte ledpins [ ] =    this line in yellow

sketch_16leds:2: error: expected unqualified-id before numeric constant
sketch_16leds.ino: In function 'void setup()':
sketch_16leds:5: error: expected primary-expression before ';' token
sketch_16leds:6: error: 'ledpins' was not declared in this scope
sketch_16leds:9: error: a function-definition is not allowed here before '{' token
sketch_16leds:13: error: a function-definition is not allowed here before '{' token
sketch_16leds:16: error: expected `}' at end of input

 

I'm not software guy. Any help would be appreciated 

 

Thanks 

Ed Radz

Reply 0
Geoff Bunza geoffb

Corrected code from the Nov 2014 Article

Hi Ed,

It looks like the final page editing dropped some characters. Try this:

#define numleds 16
byte ledpins [ ] = { 0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 } ;
void setup( ) {
  for ( int i=1; i < = numleds; i++ ) {
  pinMode ( ledpins [ i ], OUTPUT) ;
  digitalWrite ( ledpins [ i ] , HIGH) ;
  }
}
void loop( ) {
  digitalWrite ( ledpins [ random ( 0, numleds+1 ) ], lightsw ( ) ) ;
  delay ( 900 ) ;
}
boolean lightsw ( ) {
  if ( random (0,100)> 40 ) return LOW ;
  else return HIGH ;
}

I just checked this sketch-- it does compile without errors.

This animation is one of the easiest and most satisfying one I've used. I hope you enjoy it too.

Best regards,

Geoff Bunza

Geoff Bunza's Blog Index: https://mrhmag.com/blog/geoff-bunza
More Scale Model Animation videos at: https://www.youtube.com/user/DrGeoffB
Home page: http://www.scalemodelanimation.com

Reply 0
BruceNscale

TV Glare Animation

Hi Geoffb,

I use blue and white leds to get the "black and white TV glare" in one of my houses.

By using random numbers and pulse width modulation, you can simulate the picture intensity changes.

I hope to do a TV/Radio storefront with multiple sets using the same signal.

ignature.jpg 

Happy Modeling, Bruce

Reply 0
Reply