hi @mootari this is such cool notebook! is this how you've made this https://twitter.com/mootari/status/1249819566156533769 ? I'm wondering how would be to feed a live camera into that effect, and once the frames are not changing you run the effect.
> this is such cool notebook!
Thank you!
> is this how you've made this https://twitter.com/mootari/status/1249819566156533769 ?
Generally speaking, yes. This notebook has been simplified, but I have 3 or 4 others which all explore different directions and variations. You can watch me prepping an image in https://twitter.com/mootari/status/1250057972010663945
> I'm wondering how would be to feed a live camera into that effect, and once the frames are not changing you run the effect.
I can't quite imagine it yet, because you'd need to replace the image contents as soon as you have some movement. An alternative might be to feed new pixels "from above", i.e., only add them if there are no other pixels above that position. But with all the noise in a video feed it might be difficult to determine what should count as movement.
I'd suggest to draw inspiration from Andreas Gysin (https://twitter.com/andreasgysin/status/1258072198889299969) and use the facial features detection in Max Bittker's https://shaderbooth.com/
Another alternative might be to use a still frame, run the sim across it, track every displacement and then create a displacement map that you apply to the live feed. Perhaps again with facial feature detection, to map source and target locations more accurately and dynamically. :)
With mouse/touch controls, the direction is currently derived from the angle relative to the image center, but the description states "by dragging across the image". I think that the current behavior is not very intuitive. My suggestion:
- Use pointerdown position as origin,
- on pointermove, determine angle relative to drag origin and update direction,
- stop movement on pointerup
Thoughts?
I've implemented the change in this fork for testing: https://observablehq.com/compare/280ce4bb17526598@771...6816bac6d990238b@771
The drag origin gets updated on every pointer move (that results in an unambiguous direction). I'd appreciate it if someone could test the fork and give some feedback!
(E.g., it might require a deadzone, but I'm not sure on which metric that should be based. dpr?)
great to see this update!! I've tried to add other directions but I wasn't that fast! playing with the Cutout area using the mouse/touch is a lot o fun!
There's now a steps slider in the Config section, if you're getting impatient and want to speed things up. I've left it out of the top area because it's already pretty clobbered there. :)