Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

we'll want NCBLIT_PIXEL plots, of course #1382

Closed
dankamongmen opened this issue Feb 28, 2021 · 23 comments · Fixed by #2087
Closed

we'll want NCBLIT_PIXEL plots, of course #1382

dankamongmen opened this issue Feb 28, 2021 · 23 comments · Fixed by #2087
Assignees
Labels
demo relevant to notcurses-demo documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@dankamongmen
Copy link
Owner

As NCBLIT_PIXEL becomes better integrated, we'll want to supply pixel-based plots. Plug it into nc[ud]plot.

@dankamongmen dankamongmen added documentation Improvements or additions to documentation enhancement New feature or request hax0rs-wanted looking to hack on notcurses? try these labels Feb 28, 2021
@WSLUser
Copy link

WSLUser commented Mar 2, 2021

I've noticed the support you've been adding for Sixel and that's awesome but I thought Kitty used something different and that's what NCBLIT_PIXEL was supposed to represent. Are you simply trying to consolidate logic for running both Sixel and Kitty's graphic protocol? https://sw.kovidgoyal.net/kitty/graphics-protocol.html

@dankamongmen
Copy link
Owner Author

I've noticed the support you've been adding for Sixel and that's awesome but I thought Kitty used something different and that's what NCBLIT_PIXEL was supposed to represent. Are you simply trying to consolidate logic for running both Sixel and Kitty's graphic protocol? https://sw.kovidgoyal.net/kitty/graphics-protocol.html

aye, and also ITerm2's 1337 https://nick-black.com/dankwiki/index.php?title=Notcurses#Pixel_blitters

@WSLUser
Copy link

WSLUser commented Mar 2, 2021

I noticed you added Windows Terminal to the list for Sixel support. It's not quite there yet though there's a working fork for it. I think a better method of its support is coming with being able to pass DCS sequences directly to the client app.

@dankamongmen
Copy link
Owner Author

I don't think this will be very difficult, and now that the z-axis work is coming together (#1388), I know how it'll look in e.g. notcurses-demo, and it's gonna knock people's socks off. We might want to move this up to 2.3.0.

@dankamongmen dankamongmen self-assigned this Mar 26, 2021
@dankamongmen dankamongmen added demo relevant to notcurses-demo and removed hax0rs-wanted looking to hack on notcurses? try these labels Mar 26, 2021
@dankamongmen dankamongmen added this to the 2.3.0 milestone Mar 26, 2021
@dankamongmen
Copy link
Owner Author

including this in the 2.2.4 set, because we've just gotta have it in the demo.

@dankamongmen
Copy link
Owner Author

Alright, time to finally work on this!

@dankamongmen
Copy link
Owner Author

started some initial work in dankamongmen/pixelplots.

@dankamongmen
Copy link
Owner Author

so the question really comes down to: do we draw the plot as one big bitmap, or do each cell as mosaics? this code is very much set up to be cell-based, but it's probably easier to draw as one big thing. hrmm....

@dankamongmen
Copy link
Owner Author

i think when one considers the mechanics of wiping and restoring, what we're going to need here is a generator function in the plot code which spits out an RGBA frame using the appropriate data, which is then treated as a new frame of a multiframe, and encoded like normal using the associated TAM. that's definitely not going to be the fastest possible way, but anything else is madness, requiring deep integration between the encoding and plot layers. with that said, we can use a much smaller region for a pixel plot, due to the much greater resolution, so maybe it won't be so bad?

@dankamongmen
Copy link
Owner Author

we're close to the PoC level here now, after tonight's work. right now we ought be drawing an rgba area at cell granularity. that rgba needs be brought in as a multiframe (to preserve the TAM), and rendered to the target plane.

@dankamongmen
Copy link
Owner Author

we are now generating a (crap-filled) pixel plot in notcurses-input on the branch =]

@dankamongmen
Copy link
Owner Author

i do believe we have it. the first input supplied:

**Butt-Head**
Oooo, huh-huh-huh
Come to Butt-Head

**Beavis**
Heh-heh-m-heh-heh!

**Butt-Head**
Come a little closer (Closer)
Let me touch you, huh-huh-huh (Let me touch you)
That would be cool, huh-huh-huh (Let me feel you)
Let me feel you near me, huh-huh-huh (So near me)

**Beavis**
Heh-heh, yeah! Let me feel you! (Oh yeah)

**Butt-Head**
I would like, do something that really sucks
For your love, huh-huh-huh

**Beavis**
Heh-heh-m-heh-heh!

**Butt-Head**
(For your love) I would like, do homework and stuff

**Beavis**
Wussie. Heh-heh-heh!

**Butt-Head**
For your love

(Come to my love) Come to Butt-Head
(Come closer to my love) Huh-huh-huh!
(Come to my love) Come a little closer

**Beavis**
Heh-heh-heh, yeah. Yeah! Closer. Closer! Heh-heh-heh!

**Butt-Head**
(Say baby) Shut up, Beavis! Huh-huh-huh!
(Baby) Baby, if I like, gave you some money
(Money money money money) Would you make out with me? Huh-huh-huh!
(Money) That would be cool! Huh-huh-huh!

**Beavis**
Yeah! Yeah! Heh-heh-heh! I've got 75 cents! Heh-heh-heh! Yeah!

**Butt-Head**
And I've got like, 50 cents
So that would be... uh... uh... like, uh... ya know, like... like a dollar
(Come to my love) Come to Butt-Head
(Come closer to my love) Huh-huh-huh!
(Come to my love) Come a little closer to me
(Come closer to my love) Huh-huh-huh!
(Hey baby) Hey, baby
(Do you want to) Uh, wanna, uh, do it? Huh-huh-huh!

**Beavis**
Yeah! Heh-heh-heh! Yeah! Yeah, you wanna do it? Heh-heh-heh! Yeah! Heh-heh-heh! That
Would be cool! Heh-heh-heh!

**Butt-Head**
Baby, every part of me
Wants to be touching every part of you

**Beavis**
Hey, Butt-Head, what time is it? I think "Cops" is on. They're gonna show some domestic disputes and stuff

**Butt-Head**
I just wanna feel every part of me
Touching every part of you, huh-huh-huh
Especially your thingies, huh-huh-huh

**Beavis**
Oh yeah, yeah! Heh-heh-heh! Thingies! Heh-heh-heh! Thingies!

**Butt-Head**
That would be cool, huh-huh-huh
(Forever)
(Forever, baby, forever)
(Forever, baby, forever)
Ya know, baby, huh-huh-huh
I just wanna feel myself - uh, huh-huh-huh

**Beavis**
Heh-heh-heh! Yeah, feel myself! Heh-heh-heh! Me too! Heh-heh-heh! Yeah! Yeah! Heh-heh-heh! Yeah! Heh-heh-heh!

**Butt-Head**
(Come to my love) Come to Butt-Head
(Come closer to my love) Huh-huh-huh!
(Come to my love) Come a little closer
(Come closer to my love) Huh-huh-huh!
Uh, I'm like, a doctor, huh-huh
Uh, an orthodontist, huh
I'm gonna have to ask you to, ya know
Take off your clothes, huh-huh-huh

@dankamongmen
Copy link
Owner Author

one more problem: since we're not rewriting all the cells, we end up with too large of values being printed in the legends (as we never scrub the leftmost columns).

dankamongmen added a commit that referenced this issue Aug 22, 2021
dankamongmen added a commit that referenced this issue Aug 22, 2021
dankamongmen added a commit that referenced this issue Aug 22, 2021
@dankamongmen dankamongmen modified the milestones: 3.0.0, 2.4.0 Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demo relevant to notcurses-demo documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants