[GRASS-dev] Weekly reports #4 wxNviz

Hi,

1) What do I have completed this week?

I added new nviz features in workspace (light, view, constant planes). It took quite a lot of time to make it work properly.
I will add other features continuously.

2) What am I going to achieve for next week?
It seems that thematic points will be postponed. So I will follow the project plan (update nviz_cmd) and I will keep fixing bugs.

3) Is there any blocking issue?
No

Anna

Anna,

I just tested the latest updates and everything (light sphere, fringe, constant elevation, cutting planes) works great on Mac.
Looking at the wxnviz wiki http://grass.osgeo.org/wiki/WxNviz it seems that you have now resolved all known issues
(and it is only june!) so you can cross them out. Lot of the features (such as draping color, changing elevation of the constant plane, etc.)
are now much easier to use and faster as well.
I still need to test the volumes and the decorations that you might not have looked at yet.

One thing that came to mind when I was doing some figures for publications was the possibility to add ticks with
coordinates to the fringe x,y,z axes - I am wondering how difficult it would be.

Helena

On Jun 24, 2011, at 10:48 AM, Anna Kratochvílová wrote:

Hi,

1) What do I have completed this week?

I added new nviz features in workspace (light, view, constant planes). It took quite a lot of time to make it work properly.
I will add other features continuously.

2) What am I going to achieve for next week?
It seems that thematic points will be postponed. So I will follow the project plan (update nviz_cmd) and I will keep fixing bugs.

3) Is there any blocking issue?
No

Anna
_______________________________________________
SoC mailing list
SoC@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/soc

Hello,
adding coordinates can be a tricky task, as there's no single
"de-facto" OpenGL text rendering library and such one is required to
not reinvent the wheel. I was playing a bit around with some of them
last spring, still had not enough time to find fast to implement and
easy solution (and I'm not an OpenGL coder). We will have to decide
which one to use to get text into NVIZ scene (FTGL?).

If getting some text to be displayed is not that hard task, still I
would strongly suggest to go for more. And by more I mean - unicode
and TTF (or similar) font support for any text rendering to allow
later on work on vector labels, user placed labels and signs.

Just my 0.02 and no code :frowning:
Maris.

2011/6/29 Helena Mitasova <hmitaso@ncsu.edu>:

Anna,

I just tested the latest updates and everything (light sphere, fringe, constant elevation, cutting planes) works great on Mac.
Looking at the wxnviz wiki http://grass.osgeo.org/wiki/WxNviz it seems that you have now resolved all known issues
(and it is only june!) so you can cross them out. Lot of the features (such as draping color, changing elevation of the constant plane, etc.)
are now much easier to use and faster as well.
I still need to test the volumes and the decorations that you might not have looked at yet.

One thing that came to mind when I was doing some figures for publications was the possibility to add ticks with
coordinates to the fringe x,y,z axes - I am wondering how difficult it would be.

Helena

On Jun 24, 2011, at 10:48 AM, Anna Kratochvílová wrote:

Hi,

1) What do I have completed this week?

I added new nviz features in workspace (light, view, constant planes). It took quite a lot of time to make it work properly.
I will add other features continuously.

2) What am I going to achieve for next week?
It seems that thematic points will be postponed. So I will follow the project plan (update nviz_cmd) and I will keep fixing bugs.

3) Is there any blocking issue?
No

Anna
_______________________________________________
SoC mailing list
SoC@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/soc

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Hello,

I recently implemented the north arrow in WxNviz but I have problems with displaying text. You seem to have some experience so I wonder if you could help me. The problem is in the fontbase variable which is needed but I really don't understand what it is and how could I get it. It is calculated in [0] in Togl_LoadBitmapFont function. The north arrow can stay without text but scalebar and legend not, so I need some solution.

Thanks for any help.

Anna

[0] http://trac.osgeo.org/grass/browser/grass/trunk/visualization/nviz/src/togl.c

------------ Původní zpráva ------------
Od: Maris Nartiss <maris.gis@gmail.com>
Předmět: Re: [GRASS-dev] Re: [SoC] Weekly reports #4 wxNviz
Datum: 29.6.2011 18:22:15
----------------------------------------
Hello,
adding coordinates can be a tricky task, as there's no single
"de-facto" OpenGL text rendering library and such one is required to
not reinvent the wheel. I was playing a bit around with some of them
last spring, still had not enough time to find fast to implement and
easy solution (and I'm not an OpenGL coder). We will have to decide
which one to use to get text into NVIZ scene (FTGL?).

If getting some text to be displayed is not that hard task, still I
would strongly suggest to go for more. And by more I mean - unicode
and TTF (or similar) font support for any text rendering to allow
later on work on vector labels, user placed labels and signs.

Just my 0.02 and no code :frowning:
Maris.

2011/6/29 Helena Mitasova <hmitaso@ncsu.edu>:
> Anna,
>
> I just tested the latest updates and everything (light sphere, fringe,
constant elevation, cutting planes) works great on Mac.
> Looking at the wxnviz wiki http://grass.osgeo.org/wiki/WxNviz it seems that
you have now resolved all known issues
> (and it is only june!) so you can cross them out. Lot of the features (such as
draping color, changing elevation of the constant plane, etc.)
> are now much easier to use and faster as well.
> I still need to test the volumes and the decorations that you might not have
looked at yet.
>
> One thing that came to mind when I was doing some figures for publications was
the possibility to add ticks with
> coordinates to the fringe x,y,z axes - I am wondering how difficult it would
be.
>
> Helena
>
> On Jun 24, 2011, at 10:48 AM, Anna Kratochvílová wrote:
>
>> Hi,
>>
>> 1) What do I have completed this week?
>>
>> I added new nviz features in workspace (light, view, constant planes). It
took quite a lot of time to make it work properly.
>> I will add other features continuously.
>>
>>
>> 2) What am I going to achieve for next week?
>> It seems that thematic points will be postponed. So I will follow the project
plan (update nviz_cmd) and I will keep fixing bugs.
>>
>> 3) Is there any blocking issue?
>> No
>>
>>
>> Anna
>> _______________________________________________
>> SoC mailing list
>> SoC@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/soc
>
> _______________________________________________
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>

Maris Nartiss wrote:

adding coordinates can be a tricky task, as there's no single
"de-facto" OpenGL text rendering library and such one is required to
not reinvent the wheel. I was playing a bit around with some of them
last spring, still had not enough time to find fast to implement and
easy solution (and I'm not an OpenGL coder). We will have to decide
which one to use to get text into NVIZ scene (FTGL?).

Text rendering in OpenGL normally uses glCallLists() and glListBase().
This requires a "font" in the form of a contiguous sequence of display
lists, one for each glyph. The individual glyphs are arbitrary display
lists, i.e. sequences of rendering commands: bitmaps, lines, filled
polygons, textured polygons, whatever. Each glyph needs to update
either the current point (for bitmaps) or the current transformation
matrix (for vector primitives) so that subsequent glyphs are
positioned correctly.

The platform-specific APIs (glx, wgl, agl) provide functions to create
suitable display lists from a system font: glXUseXFont, aglUseFont,
wglUseFontBitmaps.

Creating (bitmap- or texture-based) display lists from a FreeType font
is relatively straightforward, given the existing FreeType code in the
display drivers (lib/driver/text3.c). Stroke fonts would also be
straightforward, and would probably look nicer if arbitrary scaling is
required. Filled vector fonts are significantly more complex due to
the need to tessellate the shape into convex polygons.

--
Glynn Clements <glynn@gclements.plus.com>

Hello,
I'm sorry to disappoint You. I have no idea about X or OpenGL
programming. All I know is that XLoadQueryFont() returns NULL on valid
font names. On my Gentoo system xfontsel also doesn't work. (Are other
programs using different method to find system fonts for X?)

I would suggest to use Michaels suggestion - render legend on top of
the canvas by other means (if it's possible - no idea how 3D works in
wxgui). Leave north arrow as-is till somebody comes up with a solution
for text rendering in OGSF.

Maris.

http://trac.osgeo.org/grass/ticket/1216

2011/7/8 Anna Kratochvílová <KratochAnna@seznam.cz>:

Hello,

I recently implemented the north arrow in WxNviz but I have problems with displaying text. You seem to have some experience so I wonder if you could help me. The problem is in the fontbase variable which is needed but I really don't understand what it is and how could I get it. It is calculated in [0] in Togl_LoadBitmapFont function. The north arrow can stay without text but scalebar and legend not, so I need some solution.

Thanks for any help.

Anna

[0] http://trac.osgeo.org/grass/browser/grass/trunk/visualization/nviz/src/togl.c

Maris Nartiss wrote:

I'm sorry to disappoint You. I have no idea about X or OpenGL
programming. All I know is that XLoadQueryFont() returns NULL on valid
font names. On my Gentoo system xfontsel also doesn't work. (Are other
programs using different method to find system fonts for X?)

XLoadQueryFont() and xfontsel only work for X11 fonts. They don't work
for client-side fonts (which is what most modern toolkits and
applications use).

Most modern GUI toolkits rely upon high-level libraries such as Pango,
FontConfig and/or FreeType for text. Use of X11 fonts is now
sufficiently uncommon that some Linux distributions don't install any
X bitmap fonts by default.

--
Glynn Clements <glynn@gclements.plus.com>