Python script to automatically create multiple images of a rotating knob #663
dervur
started this conversation in
Show and tell
Replies: 2 comments 3 replies
-
i think we all use knobman for that particular purpose. https://www.g200kg.com/jp/software/knobman.html#nativeknobman NOTE : For retina/HiDPI purpose, always use x2 or x4 size of the knob to avoid jagged lines when scaling up. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Yep. Jknobman is just great! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everybody,
Maybe some of you already have scripts to do this, but on my second day of Ctrlr it became clear to me that if I wanted to use an image modulator for a rotating knob, creating 128 images of a knob at different position would require an insane a mount of time. I thought there had to be an easier way to do it... So I thought about python and wrote a simple script for it.
Right now the script can rotate and saturate the image as it goes, I had this for a knob I wanted to change colour as it was rotated.
Change the values as you please to achieve the result you want. The name of the exported file will also have the frequency and sizes needed for Ctrlr to correctly visualize the figure (just in case you forget these in a second moment).
As an example this was the knob I wanted to change colour to as it rotated. Set at minimum position at 8 o'clock-ish
And these are some position of this image along the line:
You will need the PILLOW library: https://stackoverflow.com/questions/68439152/how-to-install-pil-with-pip
Here is the script:
tile knob for Ctrlr.zip
I don't know if other ways to do these are available, but this is the one I implemented and I wanted to share with you as it might be useful to some, especially people approaching Ctrlr. There are some comments to help you in choosing how to select some values.
It is quite basic but feel free to expand it if you want with more features and feel free to post them here so others can implement them as well :)
Beta Was this translation helpful? Give feedback.
All reactions