Working LED Display

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Working LED Display // Interactive Artwork

1  2  |  

Post by ProfessorKhaos // Dec 31, 2006, 7:23am

ProfessorKhaos
Total Posts: 622
pic
Here's something I've been working on that might be of use to some of you.


A 4 line x 20 character LED display using 16 segment LEDs for alphanumeric capabilities. Might enhance some of those "dashboard" projects.


The displays are chainable so if you need a 40 character line, etc you can take the output strings and feed them into the input strings for the next stage.


Font is built in via script and supports alphanumerics plus some symbols. Also properly handles a period or comma as a decimal point without wasting a whole digit to do so.


http://img382.imageshack.us/img382/6012/leddisplay003nv7.jpg


Almost ready to distribute. Can be dissected quite easily to obtain a single 20 digit line, a 5 digit line, and a single character. All levels are chainable the same way.


P.K.

Post by ProfessorKhaos // Dec 31, 2006, 8:23am

ProfessorKhaos
Total Posts: 622
pic
A few more examples on use...


http://img171.imageshack.us/img171/1646/leddisplay004xp9.jpg

http://img171.imageshack.us/img171/7185/leddisplay005fq4.jpg


P.K.

Post by trueBlue // Dec 31, 2006, 8:58am

trueBlue
Total Posts: 1761
pic
Very Cool there ProfessorKhaos!:jumpy:

Post by Johny // Dec 31, 2006, 9:16am

Johny
Total Posts: 672
pic
looking great! :)

Post by ProfessorKhaos // Dec 31, 2006, 9:43am

ProfessorKhaos
Total Posts: 622
pic
Thanks guys...


Ok... gonna see if I can upload this thing... it's a 3.2 meg zipped library file containing a single digit display, a 5 digit display, a 20 digit display and a 4 line 20 digit display.


Decidedly a beta product with reasonable usefulness. Wasn't able to get the ambient light term to work. Was hoping to make the numbers glow in the dark but no such luck yet. It works fine in a normally illuminated room though.


Might be useful for creating dashboard textures or some interactive projects. Tested in both lightworks and vray...


To use the file, unzip it to a directory of your choice (about 22 meg when unzipped). Bring up your libraries tab and right click on the background of one of your library groups. Select import library and browse to the file. It will take a little time to bring the library in.


Moving marquis (sp?) and other projects should be easily accomplished with a little supporting scriptwork.


Any issues let me know of course.

Post by hemulin // Dec 31, 2006, 10:32am

hemulin
Total Posts: 1058
pic
Nice stuff! This is really good.

Post by ProfessorKhaos // Dec 31, 2006, 10:44am

ProfessorKhaos
Total Posts: 622
pic
Thanks!


By the way, if you downloaded the above file it will import into your System library directory but not directly into your object library directory... something to do with the way each one is treated when exported.


Here's one that can import directly into your objects library. Otherwise, it's not terribly difficult to manually move them over.


P.K.

Post by trueBlue // Dec 31, 2006, 4:33pm

trueBlue
Total Posts: 1761
pic
Thanks again Professor Khaos. This is great!
Now we have a digital clock. Try Post Process on it works great.

Post by ProfessorKhaos // Dec 31, 2006, 9:32pm

ProfessorKhaos
Total Posts: 622
pic
Great idea TrueBlue! You're a quick study! That's just the kind of thing I like to see happen with the displays. :) Post process is a good idea too!


I'll let this version sit for a while before making more modifications. Already have one in mind though. The decimal point is a bit hard to read owing to it's small size.


Happy new year folks!


P.K.

Post by ProfessorKhaos // Jan 1, 2007, 4:57pm

ProfessorKhaos
Total Posts: 622
pic
Ok... so much for walking away from this one for a bit :)


This version of the library contains the same displays as before but the decimal point is much bigger for visibility and I've removed the "ambient" light setting from the interface. It didn't do much anyway. I've also thrown in a moving text script to drive your displays with. Just add a clock and you'll be good to go!


This will probably be the final version. Not too difficult to disassemble if the need arises. Just a note though. Gluing to other objects doesn't work so well as using encapsulate. Glue tends to erase internal code for some reason.


P.K.

Post by trueBlue // Jan 1, 2007, 5:28pm

trueBlue
Total Posts: 1761
pic
Must have been reading my mind. I was just working on this idea for scrolling text. I have two 20 letter displays Encapsulated in 3D which is the same a Glue as Sibling and it seems to work fine here. Will check it some more though. What part is removed? Thanks again!

Post by ProfessorKhaos // Jan 1, 2007, 5:44pm

ProfessorKhaos
Total Posts: 622
pic
Here's a screenshot of the new display and interface. Only thing removed was the "inAmbOn" setting. The idea with that entry was to control the lightworks ambient lighting in the dark but apparently it doesn't work that way. Lightworks shaders seem a bit fussy in that regard.


Anyway, the best reason to move to this library is visibility of the decimal point has been improved. The moving text script I've included is kinda basic and you may have to dial back the timer speed a bit if your system is slow or you'll miss seeing updates.


http://img411.imageshack.us/img411/6137/leddisplay007gj1.jpg

http://img411.imageshack.us/img411/2241/leddisplay008zh6.jpg


I think the new one should pretty much hook up the same way as your old scripts without issues.


As far as glued objects go the original object won't lose code but the new object joining the group does *IF* you use the modeller's glue as sibling tool. Far easier to manage if you use the LE to insert it.

Post by trueBlue // Jan 1, 2007, 7:01pm

trueBlue
Total Posts: 1761
pic
I am having a lot of fun with this one! I used the Bend tool on this one.
Gotta love trueSpace7 for being able to see this animate in real time.
No more long test renders! Thanks again Professor Khaos and of course Caligari.
:jumpy:

Post by trueBlue // Jan 1, 2007, 7:12pm

trueBlue
Total Posts: 1761
pic
Here is a Date and Time script to use with the LED Display. The Timer Event is inside the Date and Time panel and so just hook up the Control Out to the Control In as shown below. Then hook up either the Date, Time, or Today to inString.

Date = Tuesday, January 02, 2007
Time = 6:30:23 PM
Today = Tuesday, January 02, 2007 6:30:23 PM

Post by ProfessorKhaos // Jan 1, 2007, 8:08pm

ProfessorKhaos
Total Posts: 622
pic
Very cool addition TrueBlue!!! :) Had it running in less than 2 minutes including download!

Post by Norm // Jan 2, 2007, 7:25am

Norm
Total Posts: 862
pic
Very cool addition TrueBlue!!! :) Had it running in less than 2 minutes including download!



Gee, I take a couple of days away from forums and now I check it out!


You live up to your nick Prof! This is cool-Kaos though :jumpy:

Post by ProfessorKhaos // Jan 2, 2007, 5:38pm

ProfessorKhaos
Total Posts: 622
pic
Aww shucks Norm.... :)


I have your cool clock tutorial to credit with giving me the idea to interactively change the element colors. The rest was a little modelling and some brute force coding.

Post by peterma // Jan 3, 2007, 1:00am

peterma
Total Posts: 48
Looks cool ! Can imagine this component can fit well into many other intercative projects (games, first of all :) )

Post by Norm // Jan 3, 2007, 8:45am

Norm
Total Posts: 862
pic
I am having a lot of fun with this one! I used the Bend tool on this one.

Gotta love trueSpace7 for being able to see this animate in real time.

No more long test renders! Thanks again Professor Khaos and of course Caligari.

:jumpy:


Would be cool if there was a way to slim the scenario down for use in truePlace. Anyone have any ideas on how to make the object size smaller? I can see signage in truePlace with this type of information display.

Post by trueBlue // Jan 3, 2007, 9:00am

trueBlue
Total Posts: 1761
pic
I think the Professor is cooking something up in this area.
Here is an example of a Flashing LED.

Post by ProfessorKhaos // Jan 3, 2007, 9:32am

ProfessorKhaos
Total Posts: 622
pic
Working on something like that Norm!


Having a bit of difficulty getting the modeller side to update with my latest attempts at assigning colors to polygons but the player side works fine. Not sure what I did right the first time 'round nor what exactly I'm doing wrong this time around. Not an issue for a truePlay version.


One thing I was thinking was that the fewer scripts and interfaces the better. Also, the model itself makes use of extruded (inwards) elements to give a sense of relief (thus the reliefCol param). I could get rid of that and it should cut down the polygons quite a bit as well as the somewhat unnecessary color assignments. The 20 digit line could be improved by creating the whole set at one level instead of encapsulating 4 sets of 5 digit displays which in turn encapsulate 5 digits, etc...


I can also make the display have no volume (i.e. instead of a box it's just a plane with polygon faces for the elements. That would save 5 4-sided polygons per digit (which for the 4 line display is 400 polys alone).


We'll trim it down a bit for "optimum trueplay performance" :)

Post by ProfessorKhaos // Jan 3, 2007, 4:23pm

ProfessorKhaos
Total Posts: 622
pic
Flashing text looked pretty cool TrueBlue! As alway very creative use of the displays!


I've reduced the file sizes a little bit and managed to rid myself of so many levels of encapsulation. Not going to add a 4 line display like before because this new method is "developer intensive" and quite frankly my hands are starting to ache from the linking.


I did however add a colon-specific display digit (wasn't room on the other display) so that clocks can be made to match their counterparts in real life.


I attempted to minimize polygon count so the displays are now infinitely thin and you can't see them from behind unless you've got double sided rendering enabled.


Attached is the Object library (zipped RsLibObj file) and separately just the digital clock (.rcd file viewable in truePlay). The big file includes the clock so you don't have to download it twice if you don't want.


File sizes will hopefully be a bit more manageable this time.


http://img243.imageshack.us/img243/9333/leddisplay009od5.jpg


P.K.


P.S. Thanks for the help folks!!! Think I finally figured out what was going on with the modeller side not updating or at least a workaround... not 100% sure yet but I'm getting better results now.

Post by Norm // Jan 3, 2007, 4:26pm

Norm
Total Posts: 862
pic
Is very cool how we can collaborate like this on forums with trueSpace7.


This is going to be one cool year :banana:

Post by trueBlue // Jan 3, 2007, 4:43pm

trueBlue
Total Posts: 1761
pic
Wow what a difference in file size and optimization.
Thanks for sharing your great project!
:jumpy:

Post by ProfessorKhaos // Jan 3, 2007, 5:01pm

ProfessorKhaos
Total Posts: 622
pic
Some of the reduction in file size is a product of not including a 4 line display in the library file. I figure that's an easy one for folks to make on their own if they really really need it. Even if they build it from 4 20-line displays themselves it should run smoother now and download faster than the old version.

Post by Vladimir // Jan 3, 2007, 11:37pm

Vladimir
Total Posts: 11
The only problem with the LED display is the speed, as it is "only script". I'd consider to remove some connectors. If you want more speed, then try to reduce number of materials, you can replace them by scripts even it means you will need use activities.


Anyway, this is one of the best script and LinkEditor implementation I have ever saw yet.

Post by Johny // Jan 4, 2007, 1:27am

Johny
Total Posts: 672
pic
Thanks for smaller file size version!
Now I can download it :banana:

Post by ProfessorKhaos // Jan 4, 2007, 4:10am

ProfessorKhaos
Total Posts: 622
pic
Thanks Vladmir!


I know I could reduce the number of links by eliminating some of the color choices for starters. Must admit I'm not quite sure what you mean about replacing materials with "activities" but I'll look into it. I've thought about a version that moves objects from within to reveal and cover up the digits which would basically take it down to 3 materials but was worried that polygons would be too close to each other to show well if the display is significantly reduced in size. I may be able to use explicit "callouts"(?) in the scripts to modify each digit directly instead of going through links. I seem to remember a chapter on that in the Procedural animation course. Is that what you mean by "activities" or do you mean using the items from the Activities library since they are precompiled?

Post by ProfessorKhaos // Jan 4, 2007, 9:25am

ProfessorKhaos
Total Posts: 622
pic
Ok, had yet another idea but I'm not sure how to implement it code wise. I assume material selection is on a per polygon basis as defined in the mesh. If the mesh polygon materials can be redefined "on the fly" via script then I may be able to turn on/off segments by modifying the mesh. That would only require 3 materials instead of 18 per digit.


Other idea I had which might be a bit more difficult would be to create a custom shader who's only job is to forward the right color for the right location on a UV map. That would cut down the materials required to one.


Speed improvement with either technique might be questionable but I may as well try it.


Been looking at the terrain mesh object to see how meshes are defined but unfortunately there's no example of material definition within the mesh generation. Can one of you "educated folk" post an example in an appropriate scripting forum if it's possible?

Post by tomasb // Jan 4, 2007, 9:40am

tomasb
Total Posts: 261
Ok, had yet another idea but I'm not sure how to implement it code wise. I assume material selection is on a per polygon basis as defined in the mesh. If the mesh polygon materials can be redefined "on the fly" via script then I may be able to turn on/off segments by modifying the mesh. That would only require 3 materials instead of 18 per digit.


Can one of you "educated folk" post an example in an appropriate scripting forum if it's possible?


material indices are defined per triangle. check Material Index Stream Data inside triangle stream group of the mesh.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn