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

New app: Noise #2467

Closed
wants to merge 1 commit into from
Closed

New app: Noise #2467

wants to merge 1 commit into from

Conversation

rektdeckard
Copy link

@rektdeckard rektdeckard commented May 16, 2024

This PR adds a configurable Simplex Noise generator app, which makes pretty, ambient, animated textures.

noise

@rektdeckard rektdeckard requested a review from matslina as a code owner May 16, 2024 01:03
@tidbyt
Copy link

tidbyt bot commented May 16, 2024

⚠️ The automated review process is experimental and likely has bugs. Please bear with us as we iron out the kinks and enable you to ship changes at high velocity 🚀

Next Steps

Hello! Thank you so much for your change 🤜 🤛 . There are a few things you need to do:

  • Sign the CLA if you haven't already
  • Ensure your build is green! Any problem will display a proposed solution to try out
  • Get a review, either by Tidbyt Bot or by a Tidbyt engineer

Automated Review Successful

Magical robots have reviewed your change and it looks good to go! 🤖

Test Details
App Dir All files are in a single app directory
Modules Only safe modules, without side-effects, are loaded
Original Author The original author matches the PR author

Sorry, something went wrong.

@tidbyt-bot
Copy link

tidbyt-bot commented May 16, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@rektdeckard
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@rektdeckard
Copy link
Author

rektdeckard commented May 16, 2024

Is the 1 second execution limit really necessary? It runs consistently under 1 second on my machine, and 1.4 seconds on this runner. There's a fair amount of math going on here, and I feel the constraints are quite limiting. In order to get this below 1 second on a runner (very difficult to test from a local machine), I will have to either:

  1. Make the (already short) animation even shorter. I have already done some tricks to this effect, like only generating half of the animation frames, then mirroring to form a loop that effectively doubles the anim length
  2. Somehow optimize a program that is almost entirely unavoidable arithmetic. No matter what, I have to run a per-pixel-per-frame computation.
  3. Instead of painting a Box per pixel, try to generate a GIF on-the-fly, and use that as an Image source (this seems infeasible, and will probably take much more compute to do)

Wondering if there is any flexibility here.

@jmanske
Copy link
Contributor

jmanske commented May 18, 2024

FWIW, it is consistently over a second to render on my laptop. From the point of view of hundreds and thousands of apps rendering with different settings on the servers constantly, it's more an ecosystem-wide scalability problem than it is a single app problem.

For ideas to make it overall faster: Can you use any caching at all? Can "common" calculations be looked up instead of redone on the fly? I haven't looked at the code yet but I am happy to give a review if you are interested.

@rektdeckard
Copy link
Author

rektdeckard commented May 18, 2024

Thanks @jmanske, there isn't anything cacheable. The generative nature of the app means we WANT it to be different every run, and each pixel of each frame is pseudorandom.

I understand the reason for the limit, I just feel a little short-sold on what we're permitted to do here. I honestly wouldn't mind if local apps had access to schemas and could run code, like maybe on your phone, instead of being a glorified GIF.

See also: tidbyt/pixlet#1075

@jmanske
Copy link
Contributor

jmanske commented May 18, 2024

Have you looked into private apps at all? It's $5 a month to be able to run whatever code on their server and works more or less like apps in the community repo. I do not think you're beholden to the 1 second rendering limit for those. I use private apps a ton for pre-releasing stuff so at least I can enjoy it before I'm ready to push or can work out kinks like you might be dealing with here.

Definitely agree that the restrictions are sometimes a bummer.

@stale stale bot added the wontfix label Jun 18, 2024
Copy link

stale bot commented Jun 20, 2024

We're automatically closing this issue because it hasn't had any activity in 30 days. If that seems like a mistake, please feel free to re-open. Thanks!

@stale stale bot closed this Jun 20, 2024
@tidbyt tidbyt locked as resolved and limited conversation to collaborators Jun 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants