Re: Texturing with large image file

Apparently, due to hardware limitations, OpenGL will fail to correctly render texture maps with dimensions larger than can be accomodated. The symptoms manifest themselves on Windows by showing just a gray image. I note that DirectX does not correct this issue, but emits a console warning message and renders part of the image. (In my opinion, Java3D should provide an automatic resampling...)

On my machine, the limit is 1024 in either X or Y. On one other Windows machine here, however, the limit is 512.

The only solution I know of is to resample your data to a smaller size before rendering it. If you're using Python, then:

a=load("my.jpg")
d=getDomainSizes(a)
nd=makeDomain(getDomainType(a), 0, d[0], 200, 0, d[1], 200)
b=resample(a,nd)
image(b)

would resample into a 200 x 200 domain.

tom

Trung Tran wrote:
Hi, I'm new to this list. I just have a problem with texturing images using Java3d (running with jdk 1.4.0_03 under both windows and linux). I try to load the demo/java3d/TextureText TextureImage program with the provided earth.jpg in the images directory and this works fine. When I run it with another earth.jpg I have which is larger (354kb instead of the demo's 13k) I get a blank screen. If I create a sphere and try doing the same thing I get a white sphere with the 354k earth.jpg and it does work with the 13k earth.jpg. I've also tried other earth.jpg's > 13k and gotten the same result, a blank screen or white sphere. Does anyone know what I'm doing wrong or how I can fix this? It seems like something pretty basic. Thanks.



--
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: