Dev VST image mapping / Knob movement question
- KVRAF
- 7175 posts since 8 Feb, 2003 from London, UK
I just stumbled across this:
http://www.u-he.com/vstsource/archive.php?classid=1
Might be of use (not tried any of the content).
http://www.u-he.com/vstsource/archive.php?classid=1
Might be of use (not tried any of the content).
-
- KVRAF
- 8388 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
-
- KVRian
- 922 posts since 26 Mar, 2003 from Guildford, England
If you are doing alpha blends on bitmaps, you'd pobably use two seperate bitmaps - one with the image, and another black and white one that is the transparency mask. Dev environments like MS VC++ only really 'like' bmp's being imported as resources, and not png's. You could import png's, as custom resources but you'd need to write code to be able to read the format. Much easier the other way.
One thing I tried was to draw a knob in flash, and rotate it using actionscript - then grabbing the images and plonking them into photoshop, which worked OK. It meant that an alpha blended highlight could be used that extended over the 'pointer' on the knob - giving a more photorealistic effect. A damn sight easier & quicker than coding it in C++. Also less cpu hungry, since the images are all pre-processed.
Using a 3D model and rendering is the best option though imo. You can export an animation as seperate bitmaps, and then splice them together easily. In some apps you can export transparency masks too. It also takes very little time to do - compared to drawing each rotation in photoshop, or even the flash method I mentioned above. Yields very smooth operation and you can also apply the same lighting to your front panel, giving a quality gui.
One thing I tried was to draw a knob in flash, and rotate it using actionscript - then grabbing the images and plonking them into photoshop, which worked OK. It meant that an alpha blended highlight could be used that extended over the 'pointer' on the knob - giving a more photorealistic effect. A damn sight easier & quicker than coding it in C++. Also less cpu hungry, since the images are all pre-processed.
Using a 3D model and rendering is the best option though imo. You can export an animation as seperate bitmaps, and then splice them together easily. In some apps you can export transparency masks too. It also takes very little time to do - compared to drawing each rotation in photoshop, or even the flash method I mentioned above. Yields very smooth operation and you can also apply the same lighting to your front panel, giving a quality gui.
-
- KVRist
- 296 posts since 30 Dec, 2003 from Denmark
This is not really a solution, unless you can live with flat and dull looking knobs, with no specific light source. A nice looking 3d-knob has a obvious light source that gives the knob highlight and shadow. If you rotate the entire image via code, the light source rotates along with the knobs. It's the knob (+shadow) that's supposed to rotate, and the light should bounce on the shape, but otherwise be still.ArneyS wrote:Wouldn't it simply be much easier to have 1 knob graphic that's rotated via code, instead of 'rendering' out an animated sequence?
![Upside Down :ud:](./images/smilies/icon_ud.gif)
You can do this in Photoshop. I have made some actions to automate the hard process of rotating, sizing and stitchting/stacking.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Download "RLH's Knob Render v2 - Action Set" on my website: http://otiumfx.mirrorz.com/
Also check out this thread: http://www.kvr-vst.com/forum/viewtopic.php?t=32069
Rune
-
- KVRist
- 378 posts since 28 Jul, 2002 from Somewhere in between
I'm quite sure a lot of older vst's work that way. They have a static kob image and rotate a small circle around. The rotation is aliased of course and it doesn't look too great but it does works.Wouldn't it simply be much easier to have 1 knob graphic that's rotated via code, instead of 'rendering' out an animated sequence?