Re: weirdness when mapping to RGB

  • To: Tennessee James Leeuwenburg <tjl@xxxxxxxxxx>
  • Subject: Re: weirdness when mapping to RGB
  • From: Tom Whittaker <tomw@xxxxxxxxxxxxx>
  • Date: Tue, 22 Jul 2003 09:42:38 -0500
This may be a limitation of your graphics card and/or OpenGL. On my PC (Windows) I cannot use a texture mapping with any domain dimension > 1024 or I get a solid gray rectangle displayed instead of a nice "image". The only way around this I've found is to resample the object into a domain with fewer samples. Snippet (of python code) used to facilitate the resampling:

  dom = getDomain(imagedata)
  xc = dom.getX()
  yc = dom.getY()
  xl = len(xc)
  yl = len(yc)
  if xl > 1024 or yl > 1024:
    imagedata = resample(imagedata, makeDomain(dom.getType(),
                         xc.getFirst(), xc.getLast(), min(xl, 1024),
                         yc.getFirst(), yc.getLast(), min(yl, 1024) ) )

The "1024" value seems to be system dependent, however -- there is at least one other PC here where "512" is the value needed. On other machines, 2048 is the "magic" value.

Hope that helps.

tom

Tennessee James Leeuwenburg wrote:

Hi all,

I'm working on a VisAD application, and found a problem when adding a
ScalarMap of (rng->RGB). I see not a coloured field, but a grey-brown
solid colour where there should be graded colour.

I was baffled, but found that on other machines, the code worked as
expected. One of the other programmers in my group suggested it might be
related to my video card or configuration in some way, and that there
was a discussion on something similar at one point here.

Can anyone give me some pointers on what causes this issue, and what the
resolution might be?

I can post screenshots if people think it would be helpful, but I don't
want to clutter your inboxes.

Thanks,
-Tennessee



--
Tom Whittaker (tomw@xxxxxxxxxxxxx)
University of Wisconsin-Madison
Space Science and Engineering Center
Cooperative Institute for Meteorological Satellite Studies
Phone/VoiceMail: 608.262.2759


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: