Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Tutorials
#1

Tiny, visible digital numbers in create mode

Archive: 16 posts


So one of the first things I did when I got to create mode in LBP2 was make my own signal strength meter. Rather than use the game-provided 7-segment number stickers, I made my own 7-segment display out of individual pieces of holo. Looking at the other logic probe devices online this seems to be the common approach.

Using the game's 7-segment number stickers has a few apparent disadvantages - you can't change the color of the display, and if you actually create a fully working digital readout (i.e. stack 10 pieces of holo with different digit stickers on them) the stack becomes unreadable in create mode - because even when they're "off" in create mode, each piece of holo puts out some light. On the other hand, one big advantage of a sticker-based display is that you can scale it down very small and it's still readable. (The 7-segment display I made myself can scale down to about 2.5 small grid squares before the holo segments start losing vertices. The stickers, however, can scale down to less than 1 small grid square high and still be perfectly legible.)

So, anyway, I found a way to make sticker-based 7-segment displays legible in create mode. I suppose it's probably already been discovered, but I haven't seen it anywhere, so...

Basically, when the holo is "off" in create mode, its color is its "off" color, but a bit brighter. The default "off" color is 0% white, so in create mode the "off" holo is a dim white (which shines through the sticker, and with 10 pieces of holo stacked on top of each other you start to lose the ability to read the display.) So the trick is to change the "off" color to something that won't shine through the (mostly green) 7-segment number sticker: anything from the left side of the color spectrum will work.

That takes care of the "create mode" glow coming from the holo itself, but there's still the problem of any wired connections - to deal with that, the wired connections to the holo must be on a microchip or similar device - tweak it, turn on "hide outgoing wires when circuitboard is closed" and set the microchip color to something from the left edge of the color spectrum. The connections will still cast a glow over the holo even with the wires hidden - so if you're making a small display this color has to be something that won't interfere with the green of the stickers. Red will make the display look yellow in create mode (kind of like an old VFD display, actually...), purple will make the digits look white, and blue will make the digits look cyan. (These effects only apply to create mode - though you could probably replicate them via other methods.)

So hopefully that's helpful - personally I plan to take advantage of this, so the next version of my logic probe can be scaled down much smaller than the current one and still work... And if I create other objects that use the stickers to create a small (dynamic) 7-segment display, I'll make sure to make the display legible in create mode via this method...
2011-02-23 06:04:00

Author:
tetsujin
Posts: 187


Wouldn't it better to just use preview?

Or just separate the holos from each other so no wires are misplaced?
2011-02-23 06:11:00

Author:
Devious_Oatmeal
Posts: 1799


Wouldn't it better to just use preview?


Wasn't aware of that feature, honestly. But if you can make something in such a way that you can see it clearly without going to preview mode, why not?


Or just separate the holos from each other so no wires are misplaced?

The holos have to be stacked, in the same place, or the effect is wrong.

If you've got a number that counts from 0 to 9 repeatedly - to do that with the game-provided digital number stickers you need 10 pieces of holo. To provide the illusion that it's a single digital readout, you put all of them in the same place and just switch which one is "on".
2011-02-23 06:54:00

Author:
tetsujin
Posts: 187


All you do is press start, down 3 times, X, start. Doing what you were talking about takes too much work tbh.

I meant separate them, test, then stack.
2011-02-23 06:58:00

Author:
Devious_Oatmeal
Posts: 1799


All you do is press start, down 3 times, X, start.


Yeah, after you mentioned it I looked for it - turns out it was, as you say, in the obvious place. I'd just always scanned right over it - every time I hit start it was to toggle grid or front view. It's become automatic. I tend not to look at the start screen.



Doing what you were talking about takes too much work tbh.


You have a strange definition of "too much work"... Change the "off" color of the holo as you're creating it, change the chip color and hide the wires. And for that, you get a display that's not obscured by extraneous glow in create mode.

Admittedly it's kind of a specialized thing - how many people even use dynamic 7-segment displays for anything to begin with? Now how many need one that's small, and legible in create mode without the preview option? Not many, I'm sure. Still, it has its uses.



I meant separate them, test, then stack.

And you thought setting the holo color and hiding the wiring was too much work? Yeesh!
2011-02-23 07:11:00

Author:
tetsujin
Posts: 187


lol. Yesh, my definition for "WORK" is strange. Uhh... Well, if you think about it, you have to do more "key strokes" to keep changing the colors of holos....

idk, I'm just weird. <(^w^<)
2011-02-23 07:55:00

Author:
Devious_Oatmeal
Posts: 1799


lol. Yesh, my definition for "WORK" is strange. Uhh... Well, if you think about it, you have to do more "key strokes" to keep changing the colors of holos....

Box select and group tweak is fun
2011-02-23 09:16:00

Author:
rtm223
Posts: 6497


Have you tried using holo-stickers? Put a black sticker on a piece of holo, and sticker whatever you want on it and change the brightness to your liking.2011-02-25 05:05:00

Author:
Unknown User


Have you tried using holo-stickers? Put a black sticker on a piece of holo, and sticker whatever you want on it and change the brightness to your liking.

Yes, that's exactly what I'm talking about. I ran into this because I was experimenting with creating numerical displays with the digital number stickers (because creating your own 7-segment display out of holo, while fun, is somewhat limited in terms of how small you can scale it down and still have it work right.)

The issue with that is that a piece of holo in create mode, even if it's off, will still emit a bit of light (so that you know where it is, basically). If you put ten pieces of "off" holo in the same spot, the "create mode glow" accumulates to the point that it's hard to see anything else.

So the solution, basically, is make the thing glow one color when "on" and another color when "off" - that way, even if you still see that create-mode glow, it won't interfere with seeing the "on color".
2011-02-25 06:05:00

Author:
tetsujin
Posts: 187


On the other hand, one big advantage of a sticker-based display is that you can scale it down very small and it's still readable. (The 7-segment display I made myself can scale down to about 2.5 small grid squares before the holo segments start losing vertices.

If the problem is just losing vertices, there's a way to avoid that.

Every block of material in your level has a hidden attribute which represents the relative "scale factor", which is applied to the X and Y coordinates of each vertex before rendering. This is the attribute you need to reduce to create "invisible materials (https://lbpcentral.lbp-hub.com/index.php?t=17759-Creating-Editable-Invisible-Material-In-Seconds)", or increase to create the "mirror glitch (https://lbpcentral.lbp-hub.com/index.php?t=22161-How-to-make-any-material-be-like-a-mirror)".

There are effectively two ways to resize pieces of material:-

Select it, and move the right stick up and down
Use the corner editor to move its vertices, cut into it, or extend it with a brush of the same material.

The difference between these is that the former will only change the scale factor, and the latter will only change the vertex coordinates.

The reason the game works this way is that any number system used to store coordinates has finite resolution (LBP uses single-precision floats for almost everything), so if the game directly adjusted the coordindates when you resized an object, you'd very quickly start losing precision to the extent that the shrinking then re-enlarging an object would cause the vertices to change their relative values, and your object would end up looking really weird.

Even with this system in place, as you're shrinking an object, and the scale factor approaches zero, you still end up with strange results where vertices seem to disappear, but they are in fact just being calculated to end up as the same value as those nearby*, so the key to avoiding losing precision is to keep the scale factor high enough to prevent this from occurring.

Whenever you create a new piece of material, regardless of the size, the scale factor is set to a default value. There's no way to know what it actually is, so let's just call it 1.0, which is a good place to keep it in most cases, and in order to keep it there...

Create a piece of material around the size you want your seven-segment display to end up as, say, one small grid.
Enlarge the piece of material with the right analog stick by, say, 10 times, which makes the scale factor 10.
Create all the parts of your seven-segment display out of that piece of material, or copies of it, and assemble using the grid.
Once you have it the way you want, you can now reduce the whole thing by 10 times, so the scale factor for each piece is back to 1.0.


The end result should be that you can create a seven-segment display which fits into a single small grid square, without losing any vertices.


* This is all very speculative, but this bit I'm particularly uncertain about. The strange thing about this is the material's outline seems to have the correct coordinates, but the texture-mapped portion doesn't, so I'd guess there's a bug/misfeature where something in the texture-map calculation is losing precision.
2011-02-26 21:16:00

Author:
Aya042
Posts: 2870


If the problem is just losing vertices, there's a way to avoid that.

Every block of material in your level has a hidden attribute which represents the relative "scale factor", which is applied to the X and Y coordinates of each vertex before rendering. This is the attribute you need to reduce to create "invisible materials (https://lbpcentral.lbp-hub.com/index.php?t=17759-Creating-Editable-Invisible-Material-In-Seconds)", or increase to create the "mirror glitch (https://lbpcentral.lbp-hub.com/index.php?t=22161-How-to-make-any-material-be-like-a-mirror)".

There are effectively two ways to resize pieces of material:-

Select it, and move the right stick up and down
Use the corner editor to move its vertices, cut into it, or extend it with a brush of the same material.

The difference between these is that the former will only change the scale factor, and the latter will only change the vertex coordinates.

The reason the game works this way is that any number system used to store coordinates has finite resolution (LBP uses single-precision floats for almost everything), so if the game directly adjusted the coordindates when you resized an object, you'd very quickly start losing precision to the extent that the shrinking then re-enlarging an object would cause the vertices to change their relative values, and your object would end up looking really weird.

Even with this system in place, as you're shrinking an object, and the scale factor approaches zero, you still end up with strange results where vertices seem to disappear, but they are in fact just being calculated to end up as the same value as those nearby*, so the key to avoiding losing precision is to keep the scale factor high enough to prevent this from occurring.

Whenever you create a new piece of material, regardless of the size, the scale factor is set to a default value. There's no way to know what it actually is, so let's just call it 1.0, which is a good place to keep it in most cases, and in order to keep it there...

Create a piece of material around the size you want your seven-segment display to end up as, say, one small grid.
Enlarge the piece of material with the right analog stick by, say, 10 times, which makes the scale factor 10.
Create all the parts of your seven-segment display out of that piece of material, or copies of it, and assemble using the grid.
Once you have it the way you want, you can now reduce the whole thing by 10 times, so the scale factor for each piece is back to 1.0.


The end result should be that you can create a seven-segment display which fits into a single small grid square, without losing any vertices.


* This is all very speculative, but this bit I'm particularly uncertain about. The strange thing about this is the material's outline seems to have the correct coordinates, but the texture-mapped portion doesn't, so I'd guess there's a bug/misfeature where something in the texture-map calculation is losing precision.

Wow no way man! I have to go try that! You must be a CS major or something to know that what gives? haha
2011-02-26 22:36:00

Author:
Krondelo
Posts: 136


The end result should be that you can create a seven-segment display which fits into a single small grid square, without losing any vertices.


There is still a visibility problem with the wire connectors getting in the way unfortunately. They don't scale with the object; when you have a big display it's not an issue because it's just a small dot; but when you have a small display, it covers most, if not all, of the segment. (Of course that is only a problem in create mode.)
2011-02-28 20:21:00

Author:
Tygers
Posts: 114


There is still a visibility problem with the wire connectors getting in the way unfortunately. They don't scale with the object; when you have a big display it's not an issue because it's just a small dot; but when you have a small display, it covers most, if not all, of the segment. (Of course that is only a problem in create mode.)

Make the dots a color that doesn't interfere with the visibility of the display, and it should still be legible.

Good to know about that scale factor thing. Next time I try making a 7-segment display I'll give that a try. At present, I'm playing around with stickered, stacked holo instead. Right now what I'm going for is something that looks kind of like a Nixie Tube. (Not with the glass around it, just in terms of the way the numbers look...)
2011-03-01 18:47:00

Author:
tetsujin
Posts: 187


I tried making a nixie tube display (Also not with glass, and yes I also called it that on my own) and it was hell on the thermo having all those shapes... Then I realized yesterday I could have made it with stickers of the shapes rather than actual shapes.2011-03-01 19:38:00

Author:
Tygers
Posts: 114


I tried making a nixie tube display (Also not with glass, and yes I also called it that on my own) and it was hell on the thermo having all those shapes... Then I realized yesterday I could have made it with stickers of the shapes rather than actual shapes.

Yep, that's the approach I took, using stickers.

I'm still not sure of the impact on the thermo (I haven't really instantiated the resulting meter enough times yet) - and once, I think, after capturing the meter and re-instantiating it, some of the stickers disappeared (not sure what happened there, seems like an isolated incident...)

Based on the testing I've done so far I have some concerns about the reliability of this approach (stickers disappeared!) - so it may not be the best choice for a meter, which I'd want to operate reliably regardless of how much stuff is in the level or on-screen at any given time... Also I think I made my numbers too thick (when I drew them, the lines making up the digits were 3 small grid squares wide, while the gaps between lines were usually 3 or 4 small grid squares wide - next time I make a set of numbers for a sticker I'll make 'em thinner) I think part of the problem is I made the numbers out of holo, probably should have used neon to avoid the "glare"... I'll keep messing around with it I guess. I may ultimately go back to using 7-segment, (especially now that I know about the scaling factor thing) - I'm not really sure.

This is the third iteration of my "build a signal meter" project, and I think I've finally come up with a pretty good one. Full-featured analog/digital probe like Balorn's, calibrated to match a score giver, handles super-normal signals (doesn't scale them down and display them like yours - it just indicates that they're out of range. My previous versions of the logic probe pretty much just barfed when given super-normal signals) - and if an analog signal is too small for the meter to display it'll still indicate that it's non-zero positive or negative... Three digits, so not the level of precision that Phort's or your meters have, but compact and adequate for most situations...

Legibility can still be a problem with it when it's scaled down small, though: the digits are OK (mostly) but the sign indicators can be hard to see. It can be hard to read player color sometimes, too - turn the holo up too bright and it washes out, turn it down too low and it's hard to see... <sigh>
2011-03-01 21:00:00

Author:
tetsujin
Posts: 187


It can be hard to read player color sometimes, too - turn the holo up too bright and it washes out, turn it down too low and it's hard to see... <sigh>

Use microchip as player color indicator. Just make it same way as microchip relay, sticker it white and set it to player color.

If you want even better indicator put down two microchips: one with NOT-gate and wire going trough and other firsts notNOTed wire going trough. This way both lights up if the signal affects to its destination and only first if it goes only trough.


I had idea of making probe myself and I have already made 10 bit ADC with Gray Code using two sequencers running together producing only one frame of latency.

I tried to make 12 bit but sequencer don't have enough length for it.
2011-03-02 05:46:00

Author:
waD_Delma
Posts: 282


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.