Re: Texture Mapping

From: OKUMURA, Akira <oxon_at_ceres.phys.s.u-tokyo.ac.jp>
Date: Mon, 26 May 2008 09:39:58 -0700


Hello Matevz,

> 1. What is your image format and size?

In most of my cases, image format will be FITS HEALPix. http://healpix.jpl.nasa.gov/
But I am not planning to map FITS images on spheres directly. At first I will read a FITS image using CFITSIO,
http://heasarc.nasa.gov/docs/software/fitsio/fitsio.html and convert it to a usual 2D image array (r, g, b, alpha) on memory. And then I will map the array on a sphere.

> 2. Is it a single texture in Mercator projection or you have several
> images that need to be applied (usually 6, one for each side of an
> encompassing cube)?

2D array will be Mercator projection.

My application has very strong connection to FITS format. Thus even if you would implement new official ROOT classes for textured sphere, I have to implement classes by myself. So at first I will try to start implementing something like TTexturedSphere/GL as you suggested.

SkyViewer
http://lambda.gsfc.nasa.gov/toolbox/tb_skyviewer_ov.cfm is the basic idea of my application. Its main feature is to plot FITS HEALPix image using OpenGL texture mapping. But it has no function to analyze cosmic gamma ray images. That's why I am interested in implementing more powerful viewer.

Of course, if ROOT supports my requirement officially in a month as you wrote, I will move to official classes.

Thank you so much.

Regards,

OKUMURA, Akira oxon_at_ceres.phys.s.u-tokyo.ac.jp Department of Physics, The University of Tokyo 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
TEL/FAX +81 3-5841-4173/4059
Skype : okumura.akira

On 2008/05/26, at 7:50, Matevz Tadel wrote:

> Hi Akira,
>
> OKUMURA, Akira wrote:
>> Hello ROOTers,
>> I would like to show a sphere of which surface is a texture mapping
>> of an all-sky image of cosmic gamma rays. Is there any ROOT
>> function to create such sphere using OpenGL? If not, which ROOT
>> classes are good starting point?
>
> Support for textures in OpenGL is in our development plan but hasn't
> very high priority at the moment. If you express keen interest for
> it we could start working on that in about 3 weeks and have
> something in about a month.
>
> After that implementing a textured-sphere will be breeze.
>
> If you know ROOT OpenGL well, something could be done even without
> central support for textures by implementing a pair of classes, e.g.:
> TTexturedSphere - holding the image data and sphere parameters;
> TTexturedSphereGL - doing actual rendering.
>
> This paper/talk should give you the general idea:
> http://indico.cern.ch/contributionDisplay.py?contribId=445&sessionId=28&confId=3580
>
> I can help you prepare the skeleton classes and basic functionality
> in about a week's time. Let me know what's your time-scale and
> desired involvement for the task.
>
> I also have two questions :)
>
> 1. What is your image format and size?
>
> 2. Is it a single texture in Mercator projection or you have several
> images that need to be applied (usually 6, one for each side of an
> encompassing cube)?
>
> Best regards,
> Matevz
>
>> I know that OpenGL itself has functions to handle texture mapping
>> but I am not an expert of OpenGL. So I am wondering if I can easily
>> access OpenGL's texture mapping via ROOT system.
>> Regards,
>> OKUMURA, Akira oxon_at_ceres.phys.s.u-tokyo.ac.jp
>> Department of Physics, The University of Tokyo
>> 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
>> TEL/FAX +81 3-5841-4173/4059
>> Skype : okumura.akira
>> </div>
Received on Mon May 26 2008 - 18:40:11 CEST

This archive was generated by hypermail 2.2.0 : Thu May 29 2008 - 23:50:01 CEST