[Bf-committers] Icon scaling

Campbell Barton ideasman42 at gmail.com
Tue Nov 8 04:08:03 CET 2011

Hi Stephan, generally this would be nice to have and look much crisper
of course.

Firstly I think the main issue with getting this into blender is
finding someone with the time who wants to work on this.

Regarding implementation -
Even if the icons render fast, we would still need to pass them to
OpenGL, while probably not _really_ slow doing this every draw, its a
step backward from using a textures which are fast. I'd expect we
would end up doing something similar to fonts where the vector data
generates a texture at different sizes.

However at this point we can probably just get away with using larger
icons - 32x32 for eg - and it will be `good enough`,

Something else to consider when updating the icon system is to allow
addons to use their own icons.

btw -  With SDL1.3 you should be able to run blender, though I'm not
sure how far along the SDL1.3 port is.

- Campbell

On Sun, Nov 6, 2011 at 8:53 PM, Stephan Aßmus <superstippi at gmx.de> wrote:
> Hi all,
> this is my first post to the list. My name is Stephan Aßmus and I am a
> contributor to the Haiku project, www.haiku-os.org. I stumbled over a
> tutorial about using Cycles and this has renewed my interest in Blender.
> Blender is pretty powerful, but I think it is still not approachable
> without doing Internet searches and following Tutorials (for example I
> had to look up how to close views, or stumbled across Shift-A in a video
> tutorial after wondering how I even create new objects). However,
> awesome features such as Cycles makes potential users more willing to
> take these steps, such as in my case. :-)
> One thing I really like about the interface, is that it is scalable by
> providing a device DPI value in the preferences. The only problem with
> this approach is that icons are scaled up and look blurry. Maybe a
> solution would be to store all icons in a bigger resolution, but it
> won't be perfect.
> For the Haiku project, I have developed a scalable vector icon format
> which takes extremely little disk space to store, and is very fast to
> render without artifacts, since it is using single pass compound shape
> rendering based on Anti-Grain Geometry. Some of you may be familiar with
> this awesome 2D graphics framework.
> I have tried to search for previous discussion on this subject in the
> Blender world, but nothing has shown up. Maybe I didn't look in the
> right places.
> My icon rendering as such would not solve the blurriness as is. But it
> has the potential to achieve this. Just as text rendering uses glyph
> hinting to align the shapes of glyphs to device pixels, a similar
> technique could be used for rendering scaled vector icons. But it should
> be difficult to do it with a general purpose vector format such as SVG,
> versus a dedicated icon format in which meta information can be given to
> shapes. For example, my icon format already contains a mechanism for
> making shapes disappear or appear in certain ranges of global scale. The
> format and renderer could be extended to support tagging shapes for
> being pixel aligned at render time.
> One post I stumbled across suggest that the original format of the
> Blender icons is SVG. The one editor which exists for creating icons in
> my format does support SVG import (and export), but the import is quite
> limited. One drawback of the idea is that all icons would have to be
> worked over to make use of all the features of my format (sharing of
> paths and styles) to benefit from the possible small disk size. And my
> icon editor only exists for Haiku at the moment. :-)
> But is there even some general interest in this idea? To learn more
> about the format, I just found out there is even a Wikipedia page (while
> looking up my articles):
> http://en.wikipedia.org/wiki/Haiku_Vector_Icon_Format
> Best regards,
> -Stephan

More information about the Bf-committers mailing list