Longtime pixelblaze user, seriously new to trying to understand mapping. Help?

Alright folks. I’m posting today with a goal, to get my rectangular matrix working correctly, but i’ve run into a serious amount of long-term frustration and stress, because for the life of me I can’t figure out some real basic things about the pixelblaze mapper. And yes, I really really have read all of the docs, had “world units” explained to me a dozen times (I still don’t fully get it in the way where I don’t know what to write, or where, even if I get the concept), and while I haven’t worked intimately with mapping before on any platform, I do understand LEDs and javascript pretty ok.

I think I’m stuck because of a few basic questions that I think I can finally articulate, that I think the docs could seriously benefit from.

I know that I’ve tried to explain some of this to people I teach the pixelblaze to, and they get stuck on these same things.

But this is really vulnerable, because these aren’t the kind of questions I’ve ever heard asked. And I really hate feeling dumb.

But this is where to start if I want to learn, damnit! I do know that. And I have the energy today. And I think this might benefit Ben (who might not think of these sticking points) And any folks who are at my level who don’t know how to ask these things.

(Btw, hey Ben, it’s Claire :blush:)


Ok, so, first context. I own several LED matrixes, so lets talk about 2D stuff. I can get anything from the dropdown list in the mapper tab to work just fine. I can choose matrix. I can punch in the width. Sure. It works for square things. But I have a rectangular thing, so I need…something new. And I don’t just want to ask for or find the answer. I also want to finally understand this.

First question: So, the code the dropdown menu generates, is that what the docs (the mapper docs below the editor) refer to as a “Generated Map Using Javascript”? Seems like. And if so, I get the idea that this is not the same as THE pixel mapper…code? Or, in the docs, they are referred to as separate things.

(This took me a while to see)

Y/N?

Second question: If this is true, then I want to use the actual Pixel map…function… to…give world units? Instead? I guess?

Y/N?

Third question: So…this is where I can sense I’m missing things. Big swaths of things. But I try pasting

export function render2D(index, x, y) {
    hsv(x, 1, y)
}

into my mapping tab editor anyway.

It does not like that. I try punching some numbers (between .1 and 1) into x and y. Nothing.

The questions here are…many. Is my impulse to change the code entirely correct? If so, what the hell am I missing? (whatever this answer is, I wish it was in the docs). I understand that the actual pattern code is over in the pattern tab, I’ve poked at it a lot. So the code that goes here, in the mapping tab, is just supposed to define the shape of the thing, yes?

So what am I missing? And HOW is that part so clear to so many other people and not to me?

I really feel like if this bit gets sorted, it might help a lot of users who give up right here.

And yes, I am studying this intro to mapping guide with everything I’ve got, but I apparently need a bit more.

Again, just want to be able to map a 10px by 30 pix matrix with the PB by myself and really, really understand it.

Thank you all for your time and energy in answering. I will endeavor to keep asking questions until I understand and can teach this myself. I think that will benefit a lot of people.

:sparkling_heart:

2 Likes

Hi Claire! I couldn’t somehow figure out how to DM you on Discord, but if you are interested in a video chat session where I may be able to answer some of your questions (certainly a lot faster than writing them down), let me know. I love working with 2D Pixelblaze animations and have mapped all kinds of different layouts in the mapper.
-Debra

1 Like

I would love to do that sometime. I think DM would work on mastodon or twitter, to figure out a good time and what I’ll need to set up beforehand? <3 Thank you!

1 Like

I DM’d you on Mastodon.

Hi @SlumberParty !
Thank you for asking these questions! I’m stoked that @GeekMomProjects is offering to help 1:1!

I figured I should add in some replies here too. Hopefully they help you, and also help the next person that finds this thread looking for these same answers.

The width variable is there so that you can do rectangular things. But the simple code assumes your pixels are wired left to right in rows, arranged top to bottom. If so, you could change width to be 10 or 30 or whatever, and along with the total pixelCount (configured on the Settings tag, passed in to the function), it should work. With a few modifications, it can generate other matrix layout styles too.

Yes! That examples dropdown:

Screen Shot 2023-04-08 at 3.02.16 PM

Will load example JavaScript that generates pixel maps.
The Pixel Mapper (as referenced in the docs) is the whole system that lets patterns work in 2D/3D.
The Mapper tab is where you configure and preview the pixel map.
The editor on the Mapper tab is where your map coordinates or map coordinate generator code goes. This is often referred to as your "pixel map.”

Your pixel map can be a function that generates coordinates, or some coordinates in JSON array format. These coordinates can be in any unit you like. Pixels, inches, whatever is convenient. Positive, negative, small fractions or giant integers. The example generators spit out integers that could be in “pixels” but it doesn’t really matter too much.

After your map coordinates are provided, THEN the system normalizes it to values between 0-1. So you don’t have to work in world units in your pixel map. You can, but it will re-normalize to 0-1, squishing or stretching as needed.

Oh I see the problem! Imagine that whole section is moved to the end and retitled “ok, now that I have a pixel map configured, how do I use it in patterns?”

That render code example works in pattern code (editor tab), and can’t be used in the pixel map itself (not on the Mapper tab).

I hope some of the above helps? If not let me know! And if you and @GeekMomProjects sort it out I really want to know!

1 Like

Thanks bud! In the back of my head I’m thinking that if I can understand this all well enough I could possibly add to your docs, or help with a few clarifying tips. Only if you are interested in that.

It generates the length, by itself, based on the pixel count. Ahhhhh. That is what I didn’t grok. I often overestimate pixel count by some or a lot, when I don’t quickly know it. So, when I’ve don’t matrixes quickly in the past, it often doesn’t show the center correctly, and I’ve been assuming the cause is because it couldn’t actually do rectangles (I’ve had so few to try). Huh. How clever it works, and for me, how non-intuitive :rofl:

And I did actually figure out the zigzag thing, even if it took a minute. That made sense to me.

Imagine that whole section is moved to the end and retitled “ok, now that I have a pixel map configured, how do I use it in patterns?”…That render code example works in pattern code (editor tab) and can’t be used in the pixel map itself (not on the Mapper tab).

Ahhhh yes, THIS is wildly confusing. This is the conclusion I was 99% of the way to as well. Thank you for validating.

Thank you bud!

I’ll check in at some point after talking with @GeekMomProjects

That would be awesome!

I took a stab at reworking the mapper docs to clarify some of this stuff on a branch here. Comments / edits welcome!

1 Like

Thank you for the feedback and explaining what’s been confusing!

Question - Have you seen Debra’s screencast where she goes through the mapper?

I’d love to hear if you think that content/format would have helped with the points of confusion you listed! I’d like to make a new, focused “Intro to mapping” video in the future and I really appreciate you explaining what was confusing. That feedback is gold, and 99% of it is never expressed by folks.

I have not seen this video! I’ll watch it and see if it addresses everything.

I’ll keep thinking it over and keep in touch for sure.

I sincerely appreciate all the warmth and help!

1 Like