It is currently Fri Mar 29, 2024 2:54 am


Speckled drawknobs

Using the CODM to create your own organ definitions, exchange CODM organ definitions, ...
  • Author
  • Message
Offline
User avatar

megafisc2

Member

  • Posts: 101
  • Joined: Wed Dec 31, 2008 9:49 am
  • Location: Erie, PA

Speckled drawknobs

PostThu Jan 05, 2012 9:03 pm

Hello All and Happy New Year!

I've written another CODM. Things have gone very well this time around with one annoying problem. I have created new draw knob images that are 100 x 100 pixels. I created a 100 x 100 pixel mask. I left the images as .jpg, including the mask. I have some "speckling
" showing up in the draw knob images. They appear to be individual pixels. They appear in both the on image as well as the off image. I thought it might ba a problem with the mask since it appears in both images - that is the common factor, so I changed the mask to a .bmp. No change. I have not tried changing the jpg images to bmp yet.


https://picasaweb.google.com/lh/photo/GT2vK_-eJLrsg6QaOz5oYnofs8Fv7GDMPvcmcFIzz-U?feat=directlink

The jpg's themselves show no evidence of having a problem. Ideas??
Offline
User avatar

mdyde

Moderator

  • Posts: 15444
  • Joined: Fri Mar 14, 2003 1:19 pm
  • Location: UK

Re: Speckled drawknobs

PostFri Jan 06, 2012 7:30 am

Hello Mark,

Assuming nothing's being displayed on top of the images, I know of no reason that could happen except for those pixels being set incorrectly in the images, e.g. those pixels being set to a value other than the opaque value so that an underlying black background is showing through the 'holes'.

It's probably easiest and quickest just to avoid masks altogether and use PNGs instead, since the PNG format (which Hauptwerk supports) supports transparency (and partial transparency) natively.

If you don't want to do that, make sure that your mask BMPs are genuine 1-bit (i.e. true black-and-white, not grey-scale) image files, since Hauptwerk doesn't support partial transparency via masks (only via PNGs) and may treat any value other than the 'opaque' value as transparent.

In general, you should probably avoid partial transparency anyway, since Hauptwerk intentionally doesn't redraw the screen background when redrawing a control (for performance reasons), so partial transparency could lead to accumulation of density on the screen as controls are redrawn repeatedly.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline
User avatar

ldeutsch

Member

  • Posts: 628
  • Joined: Tue Mar 04, 2008 12:02 pm
  • Location: Chatsworth, California, USA

Re: Speckled drawknobs

PostFri Jan 06, 2012 10:35 am

I agree with Martin. If you are going to use masks, it is critical that the black pixels are truly black. By saving the images as jpegs, your computer is applying a compression algorithm that is likely resulting in approximate values (not quite black) being used within the mask. The speckling you describe is likely caused by this effect.

I use masks - but I save them as PNGs to ensure the pixel values are maintained as I have set them.

Les
Offline

MPiercey

Member

  • Posts: 124
  • Joined: Fri Sep 03, 2010 3:59 pm
  • Location: Sacramento, CA;

Re: Speckled drawknobs

PostFri Jan 06, 2012 2:40 pm

Hi Mark, I have seen this before (I'm in the graphics business). It occurs when you use a 'magic wand' to select colors that you want to remove from an image (and then cut/crop and image). If there is a color sensitivity level on the 'magic wand' I would lower it so it does not include as wide a gamit of colors, and then see if that fixes it. What you are actually seeing is a 'hole' or more accurately a tranparent section of the image, with the black of the mask showing underneath the transparent section.
Offline
User avatar

megafisc2

Member

  • Posts: 101
  • Joined: Wed Dec 31, 2008 9:49 am
  • Location: Erie, PA

Re: Speckled drawknobs

PostFri Jan 06, 2012 5:03 pm

I've corrected the problem. I took the original jpg images and saved them as png images and made the background transparent. I eliminated the mask file. Everything looks perfect!!
https://picasaweb.google.com/lh/photo/hqSMFIsdYJJC8shVq1-ACHofs8Fv7GDMPvcmcFIzz-U?feat=directlink

Thank you for the help.
Offline
User avatar

megafisc2

Member

  • Posts: 101
  • Joined: Wed Dec 31, 2008 9:49 am
  • Location: Erie, PA

Re: Speckled drawknobs

PostFri Jan 06, 2012 5:07 pm

I just looked a little closer - I need to move the top of text binding box for the couplers down a couple pixels.
Offline
User avatar

megafisc2

Member

  • Posts: 101
  • Joined: Wed Dec 31, 2008 9:49 am
  • Location: Erie, PA

Re: Speckled drawknobs

PostFri Jan 06, 2012 5:09 pm

LOL - I also need spaces before the 4 on the Harmonic Flute, the 2 on the Flute and the 8 on Gedeckt. Details.....
Offline
User avatar

mdyde

Moderator

  • Posts: 15444
  • Joined: Fri Mar 14, 2003 1:19 pm
  • Location: UK

Re: Speckled drawknobs

PostSat Jan 07, 2012 8:12 am

Thanks, Mark.

You're welcome and glad to hear it's resolved.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline
User avatar

chr.schmitz

Member

  • Posts: 374
  • Joined: Sun Aug 25, 2013 11:49 pm

Re: Speckled drawknobs

PostSat Sep 26, 2015 4:30 am

Hello,

mdyde wrote:In general, you should probably avoid partial transparency anyway, since Hauptwerk intentionally doesn't redraw the screen background when redrawing a control (for performance reasons), so partial transparency could lead to accumulation of density on the screen as controls are redrawn repeatedly.


Please allow me to pick up this old discussion again.

Does Hauptwerk 4 still does not redraw the screen background, when redrawing a control?

Background of the question (a little bit hard to explain): when creating 3D controls with different shapes for ON and OFF, does the background, which has been covered by one control, has to be redrawn (restored) by the other control, when the state changes?

Best, Chris
Offline
User avatar

mdyde

Moderator

  • Posts: 15444
  • Joined: Fri Mar 14, 2003 1:19 pm
  • Location: UK

Re: Speckled drawknobs

PostSat Sep 26, 2015 4:37 am

Hello Chris,

chr.schmitz wrote:Does Hauptwerk 4 still does not redraw the screen background, when redrawing a control?


That's correct. It's (still) done that way for performance reasons.

chr.schmitz wrote:Background of the question (a little bit hard to explain): when creating 3D controls with different shapes for ON and OFF, does the background, which has been covered by one control, has to be redrawn (restored) by the other control, when the state changes?


You need to include any relevant portions of background for '3D' controls within their images. Likewise (i.e. to avoid the need to redraw underlying objects) no two controls must overlap in any way (not even their shadows), as covered in the sample set creator's guide.

Have a look at the draw-knob images for the main St. Anne's organ for examples of 3D-style controls.
Best regards, Martin.
Hauptwerk software designer/developer, Milan Digital Audio.
Offline
User avatar

chr.schmitz

Member

  • Posts: 374
  • Joined: Sun Aug 25, 2013 11:49 pm

Re: Speckled drawknobs

PostSat Sep 26, 2015 4:46 am

Martin,

thanks for the lightning fast answer! I am doing it exactly the same way, but I was hoping that there is a smarter way. I am copying the corresponding part of the background behind each control, which is lots of work.

Best, Chris

Return to Custom Organ Design Module (CODM)

Who is online

Users browsing this forum: No registered users and 3 guests