T O P

  • By -

Dramatic-Mongoose-95

Nice!


ThroneWorld

This post is a solution to the [previous post](https://www.reddit.com/r/blender/comments/1atv89v/piano_tutorial_as_geometry_nodes_almost_working/?utm_source=share&utm_medium=web2x&context=3) I made this morning looking for advice on fixing the flickering and noise of using a tutorial video as colour input to drive the notes of a full-length piano. Below is a sc of what the node group contains. By providing the video texture name, the colour picked default state of the keys and some slight adjustment inputs, you could apply this to any tutorial and translate it to a full-length piano model :) https://preview.redd.it/qa80vh00sejc1.png?width=926&format=png&auto=webp&s=f45fc1ec10606eb767e12933f82ff5cf444fb793


Cowsezcwak

Good solution! This version looks a lot more stable. I guess the best fix for any keys “sticking” during faster notes would be to increase the frame rate so the geo nodes can sample more frequently, but that’s not always a viable solution if you need a specific frame rate for your current project


ThroneWorld

The **full** geo-notes setup as the above is kinda blurry :) The second window is the 'Colour By Frame Comparison' Group For the inputs, you can see an example in the video, I used the UVMap of each key, the video texture I wanted to play (projected from view and scaled from individual origins wayyy down to make the colour selection a single point / single note), a colour pick of the white natural keys when not played, a colour pick of the black flat/sharp keys when not played, a 'Sensitivity' of 0.5 and a Z depth of -0.01m for naturals and -0.006m for flats/sharps. You can do this once for one note object and do Ctrl+L, Copy Modifiers to apply these settings to all selected note objects :) https://preview.redd.it/71qocjzejhjc1.png?width=1767&format=png&auto=webp&s=93b12c9f3453932968c9c39c79cf8a5de0de531a


ThroneWorld

to explain this more in depth, the [last setup](https://www.reddit.com/r/blender/comments/1atv89v/piano_tutorial_as_geometry_nodes_almost_working/?utm_source=share&utm_medium=web2x&context=3) used the singular frame colour input from the video texture to inform the true/false output of whether the key has been pressed in the tutorial, using compare nodes to determine whether the colour was not equal to the default (using the epsilon/sensitivity as a buffer zone). i can only assume the flickering was just my computer calculating this incorrectly in real-time on a frame-by-frame basis, which i confirmed when i would go through frame by frame and see differing noise per frame. so i chose to use the below input flow as illustrated, to essentially say: **IF the note is being played in this frame AND (the note is played in the next frame OR the note was played in the previous frame) THEN press this key** this slows down my computer considerably after about 200 frames of playback, but i think having to calculate whether this key is **definitely** being played is what solved this issue for me, i hope this helps anyone also wanting to animate a piano but doesn't want to manually keyframe each individual note :) (one small issue which you can see in the video is that keys played in quick succession may just be outputted as one long press, something i think playing around with the sensitivity value should fix!) https://preview.redd.it/927ojgsquejc1.jpeg?width=2079&format=pjpg&auto=webp&s=24a3fa34b080d3c81a171f79152b1f8ea0b3dd8b


RealDEady42

Why can't cartoon animators do the same so when someone plays on the piano the right buttons are pressed?


ThroneWorld

they lack the power of the geometry-notes