Making a functional Numeric Digital Display using only 1 Material (well almost...)

Having a lot of objects just to have a functional, digital numeric display seemed unnecessary to me with how simple it should work, by just turning on or off the sections of the digit needed to produce the desired numeric value.
As such I was able to create a single digit display using only 1 material, it’s able to “turn on or off” any section of the digit as desired and with drivers I am able to output any number between 0 and 9 with a custom property.
This was achieved by having a texture for the digit that separates each section of the digit using a unique color, that texture is then separated by color into 7 layers (because there are 7 sections in the digit to individually identify) where every section but the one with the unique color in the layer is blacked out while also having the unique color turned white.

There’s still some optimizing / quality of life improvements I’d like to do with this such as removing the need for a texture, being able to alter the mesh, and perhaps allowing actual text. However I’ve hit a roadblock with this whole concept, to add a second digit you’d need 2 different materials to allow both digits to have individual values. Now I figure a work around could be to use more unique colors and to expand the texture for the digit, however that would be very tedious as digit amounts increase along with the need for more groupings of digital displays in a scene, it would also be counter productive for trying to remove the need for a texture in the first place.

So I ask out to anyone interested;

  • Is it possible to add more digits while still only using one material with the method I’m using?
  • Is it possible to identify the individual sections of the digit without the need of a texture?
  • Am I mad for thinking that using more objects is unnecessary when using such a method is straight forward to setup using the mask modifier?

To sum what I’m after; one object per digit, one material per group of digits, and the ability to add more digits in a grouping of digits.

I’ve included the blend file and a video overview below.

Thanks in advance.

Digit Base.blend (968.3 KB)
Video Overview: https://youtu.be/KJFWlhZ1XBA


1 Like

Yes, but you need some way to control each individual digit. So while you can use a single material, you’re just trading it off to use, say, a vertex group limited UV warp modifier to control that digit instead.

Yes. There are 7 segments. That can be coded into UV or even vertex color.

I’ll do you better: one object per group of digits.

Start with a 10x7, 1 bit texture. This isn’t really an image. It’s an array, data. It encodes whether, at a certain number (U) a particular segment (V) is lighted (texture color). Segments aren’t UV unwrapped in a traditional fashion; instead, verts of each segment are placed at a particular V coordinate, with a U of 0. In order to increment the digit, you move U (in increments of 0.1).

Each digit gets its own vertex group, which is used to modulate a UV warp modifier. That means each digit gets its own controller empty. (If you want, you can use drivers to control these controllers, or you could probably make do with 0.1 influence copy location constraints running down the length, although that would be a different setup than what I’m describing.)

To add a digit to a number, duplicate a digit mesh and move it, add a new vert group and fix the digits grouping, add a new UV warp modifier and empty.

But if you want, each digit can still be its own object. It works fine like that too.

Edit: for a simple counter, it’s even simpler than that. One UV warp modifier, one empty, one vertex group. First digit gets weight 1.0. Next digit gets weight 0.1. Next digit gets weight 0.01. Etc. Move the empty and the counter displays its local space transform *10.

1 Like

You could unwrap everything, collapse the individual faces to points, and position the points in the UV layout such that a modulo function could ID them.

1 Like

If you need a counter, you can also make use of these free add-ons, although they’re text object based, not material based:

Blender Text Counter


———————

Randomiser (typewriter [with or without a cursor], time and digit counter, scrolling text and sequential object swapping)

1 Like